aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2015-01-24 23:42:12 +0100
committerJohannes Schickel2015-01-25 18:57:38 +0100
commit3a2db0135d93b5f12fd42f04db3b6ad9d40834d3 (patch)
tree5b021b6b70148fb60bcaa08be7f68b427b730d09 /backends/graphics/surfacesdl/surfacesdl-graphics.cpp
parent4e1ffc9434f771d3f43e66104adeea9e0166123c (diff)
downloadscummvm-rg350-3a2db0135d93b5f12fd42f04db3b6ad9d40834d3.tar.gz
scummvm-rg350-3a2db0135d93b5f12fd42f04db3b6ad9d40834d3.tar.bz2
scummvm-rg350-3a2db0135d93b5f12fd42f04db3b6ad9d40834d3.zip
SDL: Refactor WM specific functionality into SdlGraphicsManager.
Diffstat (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.cpp')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 7f3c99fcea..583c85e446 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -235,7 +235,7 @@ void SurfaceSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
break;
case OSystem::kFeatureIconifyWindow:
if (enable)
- SDL_WM_IconifyWindow();
+ iconifyWindow();
break;
default:
break;
@@ -1710,7 +1710,7 @@ void SurfaceSdlGraphicsManager::warpMouse(int x, int y) {
int y1 = y;
// Don't change actual mouse position, when mouse is outside of our window (in case of windowed mode)
- if (!(SDL_GetAppState( ) & SDL_APPMOUSEFOCUS)) {
+ if (!hasMouseFocus()) {
setMousePos(x, y); // but change game cursor position
return;
}
@@ -1720,9 +1720,9 @@ void SurfaceSdlGraphicsManager::warpMouse(int x, int y) {
if (_mouseCurState.x != x || _mouseCurState.y != y) {
if (!_overlayVisible)
- SDL_WarpMouse(x * _videoMode.scaleFactor, y1 * _videoMode.scaleFactor);
+ warpMouseInWindow(x * _videoMode.scaleFactor, y1 * _videoMode.scaleFactor);
else
- SDL_WarpMouse(x, y1);
+ warpMouseInWindow(x, y1);
// SDL_WarpMouse() generates a mouse movement event, so
// setMousePos() would be called eventually. However, the