Fixes issue SpartanJ/ecode#3
This commit is contained in:
Martín Lucas Golini
2023-01-11 01:52:32 -03:00
parent bc68f4c230
commit b3cf94536e
4 changed files with 12 additions and 5 deletions

3
.gitignore vendored
View File

@@ -38,8 +38,7 @@ external_projects.lua
src/thirdparty/SDL2/include/SDL2
projects/ios/eepp.app/assets
projects/ios/eepp.app/eepp
bin/libeepp-debug.dylib
bin/libeepp.dylib
bin/*.dylib
*.iml
.idea/
eepp.kdev4

View File

@@ -13,15 +13,15 @@
<key>CFBundleIconFile</key>
<string>ecode.icns</string>
<key>CFBundleShortVersionString</key>
<string>0.2</string>
<string>ECODE_VERSION_STRING</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>IFMajorVersion</key>
<integer>0</integer>
<integer>ECODE_MAJOR_VERSION</integer>
<key>IFMinorVersion</key>
<integer>1</integer>
<integer>ECODE_MINOR_VERSION</integer>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSMainNibFile</key>

View File

@@ -4,7 +4,14 @@ rm -rf ./ecode.app
mkdir -p ecode.app/Contents/MacOS/
mkdir -p ecode.app/Contents/Resources/
cp ../../../bin/assets/icon/ee.icns ecode.app/Contents/Resources/ecode.icns
VERSIONPATH=../../../src/tools/ecode/version.hpp
ECODE_MAJOR_VERSION=$(grep "define ECODE_MAJOR_VERSION" $VERSIONPATH | awk '{print $3}')
ECODE_MINOR_VERSION=$(grep "define ECODE_MINOR_VERSION" $VERSIONPATH | awk '{print $3}')
ECODE_PATCH_LEVEL=$(grep "define ECODE_PATCH_LEVEL" $VERSIONPATH | awk '{print $3}')
ECODE_VERSION_STRING="$ECODE_MAJOR_VERSION"."$ECODE_MINOR_VERSION"."$ECODE_PATCH_LEVEL"
cat Info.plist.tpl | sed "s/ECODE_VERSION_STRING/${ECODE_VERSION_STRING}/g" | sed "s/ECODE_MAJOR_VERSION/${ECODE_MAJOR_VERSION}/g" | sed "s/ECODE_MINOR_VERSION/${ECODE_MINOR_VERSION}/g" > Info.plist
cp Info.plist ecode.app/Contents/
rm Info.plist
chmod +x run.sh
cp run.sh ecode.app/Contents/MacOS
cp ../../../libs/macosx/libeepp.dylib ecode.app/Contents/MacOS

View File

@@ -129,6 +129,7 @@ void InputSDL::sendEvent( const SDL_Event& SDLEvent ) {
case SDL_WINDOWEVENT_RESIZED: {
event.Type = InputEvent::VideoResize;
event.WinID = SDLEvent.window.windowID;
mDPIScale = mWindow->getScale();
event.resize.w = SDLEvent.window.data1 * mDPIScale;
event.resize.h = SDLEvent.window.data2 * mDPIScale;
break;