Parcourir la source

Updates const int's so that they include the scale

Brandon Slack il y a 13 ans
Parent
commit
e7a112f4c0
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      gameplay/src/PlatformiOS.mm

+ 3 - 3
gameplay/src/PlatformiOS.mm

@@ -20,8 +20,8 @@ using namespace std;
 using namespace gameplay;
 using namespace gameplay;
 
 
 // UIScreen bounds are provided as if device was in portrait mode Gameplay defaults to landscape
 // UIScreen bounds are provided as if device was in portrait mode Gameplay defaults to landscape
-extern const int WINDOW_WIDTH  = [[UIScreen mainScreen] bounds].size.height;
-extern const int WINDOW_HEIGHT = [[UIScreen mainScreen] bounds].size.width;
+extern const int WINDOW_WIDTH  = [[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale];
+extern const int WINDOW_HEIGHT = [[UIScreen mainScreen] bounds].size.width * [[UIScreen mainScreen] scale];
 
 
 @class AppDelegate;
 @class AppDelegate;
 @class View;
 @class View;
@@ -145,7 +145,7 @@ int getKey(unichar keyCode);
         
         
         _game = Game::getInstance();
         _game = Game::getInstance();
         __timeStart = getMachTimeInMilliseconds();
         __timeStart = getMachTimeInMilliseconds();
-        _game->run(WINDOW_WIDTH*scale, WINDOW_HEIGHT*scale);          
+        _game->run(WINDOW_WIDTH, WINDOW_HEIGHT);          
     }
     }
     return self;
     return self;
 }
 }