diff options
author | David-John Willis | 2012-07-23 22:28:10 +0100 |
---|---|---|
committer | David-John Willis | 2012-07-24 10:08:58 +0100 |
commit | 45354676ebe14df8d382681621f1d994258dbb72 (patch) | |
tree | d98f70af12f0de457d6f577f10c130cd573e0a0b /backends/graphics/openpandora/op-graphics.cpp | |
parent | 3d395545cb1514ba4a07a785e58782462a3b1a94 (diff) | |
download | scummvm-rg350-45354676ebe14df8d382681621f1d994258dbb72.tar.gz scummvm-rg350-45354676ebe14df8d382681621f1d994258dbb72.tar.bz2 scummvm-rg350-45354676ebe14df8d382681621f1d994258dbb72.zip |
OPENPANDORA: Move SDL_CreateCursor hacklet from init to loadGFXMode.
* Fixes a bug that can occur on load.
Diffstat (limited to 'backends/graphics/openpandora/op-graphics.cpp')
-rw-r--r-- | backends/graphics/openpandora/op-graphics.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp index 5f0301a0c8..1a3d7d3e2e 100644 --- a/backends/graphics/openpandora/op-graphics.cpp +++ b/backends/graphics/openpandora/op-graphics.cpp @@ -31,17 +31,35 @@ #include "common/mutex.h" #include "common/textconsole.h" +static SDL_Cursor *hiddenCursor; + OPGraphicsManager::OPGraphicsManager(SdlEventSource *sdlEventSource) : SurfaceSdlGraphicsManager(sdlEventSource) { } bool OPGraphicsManager::loadGFXMode() { + + uint8_t hiddenCursorData = 0; + hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); + + /* On the OpenPandora we need to work around an SDL assumption that + returns relative mouse coordinates when you get to the screen + edges using the touchscreen. The workaround is to set a blank + SDL cursor and not disable it (Hackish I know). + + The root issues likes in the Windows Manager GRAB code in SDL. + That is why the issue is not seen on framebuffer devices like the + GP2X (there is no X window manager ;)). + */ + SDL_ShowCursor(SDL_ENABLE); + SDL_SetCursor(hiddenCursor); + /* FIXME: For now we just cheat and set the overlay to 640*480 not 800*480 and let SDL deal with the boarders (it saves cleaning up the overlay when the game screen is smaller than the overlay ;) */ - _videoMode.overlayWidth = 640; - _videoMode.overlayHeight = 480; + //_videoMode.overlayWidth = 640; + //_videoMode.overlayHeight = 480; _videoMode.fullscreen = true; if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400) |