diff options
author | Johannes Schickel | 2012-02-20 00:29:08 +0100 |
---|---|---|
committer | Johannes Schickel | 2012-02-20 00:29:08 +0100 |
commit | 93d80793b459d6567fdd9717e02a3473e5f4fcec (patch) | |
tree | 95d1e7326674fd171ce1104a1bf4b6d499686cc8 /backends/platform/iphone | |
parent | 438bc50115b7d1faf62c5821514d9941792790d0 (diff) | |
download | scummvm-rg350-93d80793b459d6567fdd9717e02a3473e5f4fcec.tar.gz scummvm-rg350-93d80793b459d6567fdd9717e02a3473e5f4fcec.tar.bz2 scummvm-rg350-93d80793b459d6567fdd9717e02a3473e5f4fcec.zip |
IPHONE: Implement cursor visibility change again.
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r-- | backends/platform/iphone/iphone_common.h | 1 | ||||
-rw-r--r-- | backends/platform/iphone/iphone_video.m | 8 | ||||
-rw-r--r-- | backends/platform/iphone/osys_video.cpp | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h index 98d1244054..470c042b0e 100644 --- a/backends/platform/iphone/iphone_common.h +++ b/backends/platform/iphone/iphone_common.h @@ -75,6 +75,7 @@ bool iPhone_isHighResDevice(); int iPhone_getScreenHeight(); int iPhone_getScreenWidth(); void iPhone_enableOverlay(int state); +void iPhone_showCursor(int state); void iPhone_setMouseCursor(short *buffer, int width, int height, int hotspotX, int hotspotY); uint getSizeNextPOT(uint size); diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m index a412945a5e..a18d68e6da 100644 --- a/backends/platform/iphone/iphone_video.m +++ b/backends/platform/iphone/iphone_video.m @@ -55,6 +55,7 @@ static int _mouseCursorHotspotX = 0; static int _mouseCursorHotspotY = 0; static int _mouseX = 0; static int _mouseY = 0; +static int _mouseCursorEnabled = 0; // static long lastTick = 0; // static int frames = 0; @@ -74,6 +75,10 @@ int printOglError(const char *file, int line) { return retCode; } +void iPhone_showCursor(int state) { + _mouseCursorEnabled = state; +} + void iPhone_setMouseCursor(short *buffer, int width, int height, int hotspotX, int hotspotY) { _mouseCursor = buffer; @@ -271,7 +276,8 @@ bool getLocalMouseCoords(CGPoint *point) { if (_overlayIsEnabled) [self updateOverlaySurface]; - [self updateMouseSurface]; + if (_mouseCursorEnabled) + [self updateMouseSurface]; glBindRenderbufferOES(GL_RENDERBUFFER_OES, _viewRenderbuffer); printOpenGLError(); [_context presentRenderbuffer:GL_RENDERBUFFER_OES]; diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp index 4d3d49c552..2c9e5633a4 100644 --- a/backends/platform/iphone/osys_video.cpp +++ b/backends/platform/iphone/osys_video.cpp @@ -332,6 +332,7 @@ int16 OSystem_IPHONE::getOverlayWidth() { bool OSystem_IPHONE::showMouse(bool visible) { bool last = _mouseVisible; _mouseVisible = visible; + iPhone_showCursor(visible); _mouseDirty = true; return last; |