aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2010-11-28 22:04:39 +0000
committerMax Horn2010-11-28 22:04:39 +0000
commita162ff18bc88b7ad364576ae091f0becba9117e2 (patch)
tree296771d022944e6ff883c4f202f124f28af53a76 /backends
parent5a825eaae249d1a92f6252ce340d5801d84e15ca (diff)
downloadscummvm-rg350-a162ff18bc88b7ad364576ae091f0becba9117e2.tar.gz
scummvm-rg350-a162ff18bc88b7ad364576ae091f0becba9117e2.tar.bz2
scummvm-rg350-a162ff18bc88b7ad364576ae091f0becba9117e2.zip
SDL: Various more SdlEventSource related fixes
svn-id: r54553
Diffstat (limited to 'backends')
-rw-r--r--backends/events/symbiansdl/symbiansdl-events.cpp2
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp6
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.h3
-rw-r--r--backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp6
-rw-r--r--backends/graphics/gp2xsdl/gp2xsdl-graphics.h3
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.cpp4
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.h3
-rw-r--r--backends/platform/gp2x/gp2x.cpp6
-rw-r--r--backends/platform/linuxmoto/linuxmoto-sdl.cpp6
-rw-r--r--backends/platform/samsungtv/samsungtv.cpp4
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp6
11 files changed, 26 insertions, 23 deletions
diff --git a/backends/events/symbiansdl/symbiansdl-events.cpp b/backends/events/symbiansdl/symbiansdl-events.cpp
index dabd9658d3..751734f8ec 100644
--- a/backends/events/symbiansdl/symbiansdl-events.cpp
+++ b/backends/events/symbiansdl/symbiansdl-events.cpp
@@ -38,7 +38,7 @@ SymbianSdlEventSource::zoneDesc SymbianSdlEventSource::_zones[TOTAL_ZONES] = {
{ 150, 145, 170, 55 }
};
-SymbianSdlEventSource::SymbianSdlEventSource(Common::EventSource *boss)
+SymbianSdlEventSource::SymbianSdlEventSource()
: _currentZone(0) {
for (int i = 0; i < TOTAL_ZONES; i++) {
_mouseXZone[i] = (_zones[i].x + (_zones[i].width / 2));
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index 1b8881d5ad..fe8c742ed9 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -38,8 +38,8 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{0, 0, 0}
};
-DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *boss) : SdlGraphicsManager(boss) {
- _evSrc = boss;
+DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *boss)
+ : SdlGraphicsManager(boss) {
}
const OSystem::GraphicsMode *DINGUXSdlGraphicsManager::getSupportedGraphicsModes() const {
@@ -125,7 +125,7 @@ void DINGUXSdlGraphicsManager::initSize(uint w, uint h) {
if (w > 320 || h > 240) {
setGraphicsMode(GFX_HALF);
setGraphicsModeIntern();
- _evSrc->toggleMouseGrab();
+ _sdlEventSource->toggleMouseGrab();
}
_transactionDetails.sizeChanged = true;
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
index 5096c010e5..dd21c8fa2b 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
@@ -61,9 +61,6 @@ public:
SdlGraphicsManager::VideoState *getVideoMode();
virtual void adjustMouseEvent(const Common::Event &event);
-
-protected:
- SdlEventSource *_evSrc;
};
#endif /* BACKENDS_GRAPHICS_SDL_DINGUX_H */
diff --git a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
index a1e351251a..4130baa6ac 100644
--- a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
+++ b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
@@ -34,10 +34,8 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{0, 0, 0}
};
-GP2XSdlGraphicsManager::GP2XSdlGraphicsManager()
- :
- _adjustZoomOnMouse(false) {
-
+GP2XSdlGraphicsManager::GP2XSdlGraphicsManager(SdlEventSource *sdlEventSource)
+ : SdlGraphicsManager(sdlEventSource), _adjustZoomOnMouse(false) {
}
const OSystem::GraphicsMode *GP2XSdlGraphicsManager::getSupportedGraphicsModes() const {
diff --git a/backends/graphics/gp2xsdl/gp2xsdl-graphics.h b/backends/graphics/gp2xsdl/gp2xsdl-graphics.h
index 776a9b1a0f..6fb1a28a98 100644
--- a/backends/graphics/gp2xsdl/gp2xsdl-graphics.h
+++ b/backends/graphics/gp2xsdl/gp2xsdl-graphics.h
@@ -30,7 +30,8 @@
class GP2XSdlGraphicsManager : public SdlGraphicsManager {
public:
-
+ GP2XSdlGraphicsManager(SdlEventSource *sdlEventSource);
+
virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
virtual int getDefaultGraphicsMode() const;
virtual void drawMouse();
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
index c89c46ddd8..b930b5a9d1 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
@@ -28,6 +28,10 @@
#include "backends/graphics/symbiansdl/symbiansdl-graphics.h"
#include "backends/platform/symbian/src/SymbianActions.h"
+SymbianSdlGraphicsManager::SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource)
+ : SdlGraphicsManager(sdlEventSource) {
+}
+
int SymbianSdlGraphicsManager::getDefaultGraphicsMode() const {
return GFX_NORMAL;
}
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.h b/backends/graphics/symbiansdl/symbiansdl-graphics.h
index b0e87c8025..54b871b265 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.h
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.h
@@ -30,6 +30,9 @@
class SymbianSdlGraphicsManager : public SdlGraphicsManager {
public:
+ SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource);
+
+public:
virtual bool hasFeature(OSystem::Feature f);
virtual void setFeatureState(OSystem::Feature f, bool enable);
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index 49a7132974..8ae54d679c 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -136,12 +136,12 @@ void OSystem_GP2X::initBackend() {
GP2X_HW::mixerMoveVolume(0);
// Create the events manager
- if (_eventManager == 0)
- _eventManager = new GP2XSdlEventSource(this);
+ if (_eventSource == 0)
+ _eventSource = new GP2XSdlEventSource();
// Create the graphics manager
if (_graphicsManager == 0)
- _graphicsManager = new GP2XSdlGraphicsManager();
+ _graphicsManager = new GP2XSdlGraphicsManager(_eventSource);
// Call parent implementation of this method
OSystem_POSIX::initBackend();
diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.cpp b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
index 6a44bfe882..3bee53cc9c 100644
--- a/backends/platform/linuxmoto/linuxmoto-sdl.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
@@ -30,11 +30,11 @@
void OSystem_LINUXMOTO::initBackend() {
// Create the backend custom managers
- if (_eventManager == 0)
- _eventManager = new LinuxmotoSdlEventSource(this);
+ if (_eventSource == 0)
+ _eventSource = new LinuxmotoSdlEventSource();
if (_graphicsManager == 0)
- _graphicsManager = new LinuxmotoSdlGraphicsManager();
+ _graphicsManager = new LinuxmotoSdlGraphicsManager(_eventSource);
// Call parent implementation of this method
OSystem_POSIX::initBackend();
diff --git a/backends/platform/samsungtv/samsungtv.cpp b/backends/platform/samsungtv/samsungtv.cpp
index d0b4a578de..4d6dca7403 100644
--- a/backends/platform/samsungtv/samsungtv.cpp
+++ b/backends/platform/samsungtv/samsungtv.cpp
@@ -41,8 +41,8 @@ bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
void OSystem_SDL_SamsungTV::initBackend() {
// Create the events manager
- if (_eventManager == 0)
- _eventManager = new SamsungTVSdlEventSource(this);
+ if (_eventSource == 0)
+ _eventSource = new SamsungTVSdlEventSource();
// Call parent implementation of this method
OSystem_SDL::initBackend();
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 10555ca33a..20bfe5b8ea 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -101,8 +101,8 @@ void OSystem_SDL_Symbian::initBackend() {
GUI::Actions::init();
// Creates the backend managers
- if (_eventManager == 0)
- _eventManager = new SymbianSdlEventSource(this);
+ if (_eventSource == 0)
+ _eventSource = new SymbianSdlEventSource();
if (_mixerManager == 0) {
_mixerManager = new SymbianSdlMixerManager();
@@ -110,7 +110,7 @@ void OSystem_SDL_Symbian::initBackend() {
_mixerManager->init();
}
if (_graphicsManager == 0)
- _graphicsManager = new SymbianSdlGraphicsManager();
+ _graphicsManager = new SymbianSdlGraphicsManager(_eventSource);
// Call parent implementation of this method
OSystem_SDL::initBackend();