aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorBastien Bouclet2017-12-19 06:18:24 +0100
committerBastien Bouclet2017-12-26 21:11:04 +0100
commit1fb748e97480dc64ed27ebe75490c1b938cdbed4 (patch)
treebcf5ab6212c83878fe8bb92a742a1695de3e5f09 /backends/platform
parent6fb50d562f9716a930ecb4fe3d20047d506e4ed5 (diff)
downloadscummvm-rg350-1fb748e97480dc64ed27ebe75490c1b938cdbed4.tar.gz
scummvm-rg350-1fb748e97480dc64ed27ebe75490c1b938cdbed4.tar.bz2
scummvm-rg350-1fb748e97480dc64ed27ebe75490c1b938cdbed4.zip
SDL: Move the non analog joystick code to the Symbian port
Symbian was the only user of that code.
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/sdl/sdl.cpp4
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp7
-rw-r--r--backends/platform/symbian/src/SymbianOS.h1
3 files changed, 8 insertions, 4 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index f6ab180897..68499b1ed8 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -180,9 +180,7 @@ bool OSystem_SDL::hasFeature(Feature f) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
if (f == kFeatureClipboardSupport) return true;
#endif
-#ifdef JOY_ANALOG
if (f == kFeatureJoystickDeadzone) return true;
-#endif
if (f == kFeatureKbdMouseSpeed) return true;
return ModularBackend::hasFeature(f);
}
@@ -293,12 +291,10 @@ void OSystem_SDL::initBackend() {
ConfMan.registerDefault("kbdmouse_speed", 3);
ConfMan.setInt("kbdmouse_speed", 3);
}
-#ifdef JOY_ANALOG
if (!ConfMan.hasKey("joystick_deadzone")) {
ConfMan.registerDefault("joystick_deadzone", 3);
ConfMan.setInt("joystick_deadzone", 3);
}
-#endif
ModularBackend::initBackend();
// We have to initialize the graphics manager before the event manager
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 4d417b5a66..87e1c09a63 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -173,6 +173,13 @@ Common::String OSystem_SDL_Symbian::getDefaultConfigFileName() {
return configFile;
}
+bool OSystem_SDL_Symbian::hasFeature(Feature f) {
+ if (f == kFeatureJoystickDeadzone) return false;
+
+ return OSystem_SDL::hasFeature(f);
+}
+
+
RFs& OSystem_SDL_Symbian::FsSession() {
return *_RFs;
}
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index 617540941d..fea1ebc0b2 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -39,6 +39,7 @@ public:
virtual void engineDone();
virtual bool setGraphicsMode(const char *name);
virtual Common::String getDefaultConfigFileName();
+ virtual bool hasFeature(Feature f);
/**
* Returns reference to File session