diff options
Diffstat (limited to 'backends')
| -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;  | 
