mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
IPHONE: Implement cursor visibility change again.
This commit is contained in:
parent
438bc50115
commit
93d80793b4
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user