diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h index 9f7e3e808f5..1f5ed019824 100644 --- a/backends/platform/iphone/iphone_common.h +++ b/backends/platform/iphone/iphone_common.h @@ -72,6 +72,7 @@ void iPhone_updateScreenRect(unsigned short* screen, int x1, int y1, int x2, int void iPhone_initSurface(int width, int height); bool iPhone_fetchEvent(int *outEvent, float *outX, float *outY); const char* iPhone_getDocumentsDir(); +bool iPhone_isHighResDevice(); #ifdef __cplusplus } diff --git a/backends/platform/iphone/iphone_video.h b/backends/platform/iphone/iphone_video.h index daa5e1d18e1..1060a2a223e 100644 --- a/backends/platform/iphone/iphone_video.h +++ b/backends/platform/iphone/iphone_video.h @@ -43,8 +43,6 @@ SoftKeyboard* _keyboardView; CALayer* _screenLayer; - int _fullWidth; - int _fullHeight; int _widthOffset; int _heightOffset; diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m index e8977be2f23..faa0719b6cd 100644 --- a/backends/platform/iphone/iphone_video.m +++ b/backends/platform/iphone/iphone_video.m @@ -29,6 +29,8 @@ static iPhoneView *sharedInstance = nil; static int _width = 0; static int _height = 0; +static int _fullWidth; +static int _fullHeight; static CGRect _screenRect; static char* _textureBuffer = 0; static int _textureWidth = 0; @@ -42,6 +44,10 @@ static UITouch* _secondTouch = NULL; // static long lastTick = 0; // static int frames = 0; +bool iPhone_isHighResDevice() { + return _fullHeight > 480; +} + void iPhone_updateScreen() { if (!_needsScreenUpdate) { _needsScreenUpdate = 1; diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index b151688e4ed..6c26b6ca8dc 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -57,7 +57,7 @@ OSystem_IPHONE::OSystem_IPHONE() : _overlayVisible(false), _overlayBuffer(NULL), _fullscreen(NULL), _mouseHeight(0), _mouseWidth(0), _mouseBuf(NULL), _lastMouseTap(0), _secondaryTapped(false), _lastSecondaryTap(0), _screenOrientation(kScreenOrientationFlippedLandscape), - _needEventRestPeriod(false), _mouseClickAndDragEnabled(false), _touchpadModeEnabled(true), + _needEventRestPeriod(false), _mouseClickAndDragEnabled(false), _gestureStartX(-1), _gestureStartY(-1), _fullScreenIsDirty(false), _fullScreenOverlayIsDirty(false), _mouseDirty(false), _timeSuspended(0), _lastDragPosX(-1), _lastDragPosY(-1), _screenChangeCount(0) @@ -65,6 +65,7 @@ OSystem_IPHONE::OSystem_IPHONE() : _queuedInputEvent.type = (Common::EventType)0; _lastDrawnMouseRect = Common::Rect(0, 0, 0, 0); + _touchpadModeEnabled = !iPhone_isHighResDevice(); _fsFactory = new POSIXFilesystemFactory(); }