From 521dfaa980c56524990dbf743fe6a94aeaeec9b9 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Tue, 9 Aug 2011 11:19:18 +0200 Subject: DINGUX: fix compilation --- backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'backends') diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 2fd22c4e80..5493929bb9 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -122,7 +122,7 @@ void DINGUXSdlGraphicsManager::initSize(uint w, uint h) { if (w > 320 || h > 240) { setGraphicsMode(GFX_HALF); setGraphicsModeIntern(); - _sdlEventSource->toggleMouseGrab(); + _eventSource->toggleMouseGrab(); } _transactionDetails.sizeChanged = true; @@ -516,7 +516,6 @@ void DINGUXSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) { point.x *= 2; point.y *= 2; } - g_system->getEventManager()->pushEvent(newEvent); point.x /= _videoMode.scaleFactor; point.y /= _videoMode.scaleFactor; if (_videoMode.aspectRatioCorrection) -- cgit v1.2.3 From 3fe81198ffa2f04b258e889001fc1c2a180b0350 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Tue, 9 Aug 2011 14:06:31 +0200 Subject: DINGUX: hopefully fix the cursor palette problem The port wasn't keeping track of the CursorPalette feature correctly. This should fix it for good. --- backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'backends') diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 5493929bb9..17a95688f3 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -427,6 +427,7 @@ void DINGUXSdlGraphicsManager::hideOverlay() { } bool DINGUXSdlGraphicsManager::loadGFXMode() { + debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight); // Forcefully disable aspect ratio correction for games // which starts with a native 240px height resolution. @@ -435,7 +436,6 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() { _videoMode.aspectRatioCorrection = false; } - debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight); if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) { _videoMode.aspectRatioCorrection = false; setGraphicsMode(GFX_HALF); @@ -473,9 +473,13 @@ bool DINGUXSdlGraphicsManager::hasFeature(OSystem::Feature f) { void DINGUXSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { switch (f) { - case OSystem::kFeatureAspectRatioCorrection: + case OSystem::kFeatureAspectRatioCorrection: setAspectRatioCorrection(enable); break; + case OSystem::kFeatureCursorPalette: + _cursorPaletteDisabled = !enable; + blitCursor(); + break; default: break; } @@ -485,8 +489,10 @@ bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) { assert(_transactionMode == kTransactionNone); switch (f) { - case OSystem::kFeatureAspectRatioCorrection: - return _videoMode.aspectRatioCorrection; + case OSystem::kFeatureAspectRatioCorrection: + return _videoMode.aspectRatioCorrection; + case OSystem::kFeatureCursorPalette: + return !_cursorPaletteDisabled; default: return false; } -- cgit v1.2.3 From a72ab2f448b880a30dbce319808fca64c4121e40 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 9 Aug 2011 14:56:38 +0200 Subject: BACKENDS: Fix compilation. --- backends/graphics/gph/gph-graphics.cpp | 3 +-- backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp | 3 +-- backends/graphics/wincesdl/wincesdl-graphics.cpp | 2 +- backends/graphics/wincesdl/wincesdl-graphics.h | 2 -- 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'backends') diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 2e8bfa668e..96b0619a6a 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -141,7 +141,7 @@ void GPHGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *f if (w > 320 || h > 240){ setGraphicsMode(GFX_HALF); setGraphicsModeIntern(); - _sdlEventSource->toggleMouseGrab(); + _eventSource->toggleMouseGrab(); } _videoMode.overlayWidth = 320; @@ -585,7 +585,6 @@ void GPHGraphicsManager::transformMouseCoordinates(Common::Point &point) { point.x *= 2; point.y *= 2; } - g_system->getEventManager()->pushEvent(newEvent); point.x /= _videoMode.scaleFactor; point.y /= _videoMode.scaleFactor; if (_videoMode.aspectRatioCorrection) diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp index e59d3f975b..de9838a0d7 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp @@ -134,7 +134,7 @@ void LinuxmotoSdlGraphicsManager::initSize(uint w, uint h) { if (w > 320 || h > 240) { setGraphicsMode(GFX_HALF); setGraphicsModeIntern(); - _sdlEventSource->toggleMouseGrab(); + _eventSource->toggleMouseGrab(); } _transactionDetails.sizeChanged = true; @@ -484,7 +484,6 @@ void LinuxmotoSdlGraphicsManager::transformMouseCoordinates(Common::Point &point point.x *= 2; point.y *= 2; } - g_system->getEventManager()->pushEvent(newEvent); point.x /= _videoMode.scaleFactor; point.y /= _videoMode.scaleFactor; if (_videoMode.aspectRatioCorrection) diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index b0cbb872b0..58b735ef8b 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -934,7 +934,7 @@ bool WINCESdlGraphicsManager::loadGFXMode() { _toolbarHigh = NULL; // keyboard cursor control, some other better place for it? - _sdlEventSource->resetKeyboadEmulation(_videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd - 1, _videoMode.screenHeight * _scaleFactorXm / _scaleFactorXd - 1); + _eventSource->resetKeyboadEmulation(_videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd - 1, _videoMode.screenHeight * _scaleFactorXm / _scaleFactorXd - 1); return true; } diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index edf3cc5769..2e8c3313b3 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -160,8 +160,6 @@ public: virtual void transformMouseCoordinates(Common::Point &point); - virtual void transformMouseCoordinates(Common::Point &point); - private: bool update_scalers(); void drawToolbarMouse(SDL_Surface *surf, bool draw); -- cgit v1.2.3