aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/psp2
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl/psp2')
-rw-r--r--backends/platform/sdl/psp2/psp2.cpp27
-rw-r--r--backends/platform/sdl/psp2/psp2.h14
2 files changed, 34 insertions, 7 deletions
diff --git a/backends/platform/sdl/psp2/psp2.cpp b/backends/platform/sdl/psp2/psp2.cpp
index f959bbaf49..62b0a68320 100644
--- a/backends/platform/sdl/psp2/psp2.cpp
+++ b/backends/platform/sdl/psp2/psp2.cpp
@@ -80,6 +80,7 @@ void OSystem_PSP2::initBackend() {
ConfMan.registerDefault("kbdmouse_speed", 3);
ConfMan.registerDefault("joystick_deadzone", 2);
ConfMan.registerDefault("shader", 0);
+ ConfMan.registerDefault("touchpad_mouse_mode", true);
if (!ConfMan.hasKey("fullscreen")) {
ConfMan.setBool("fullscreen", true);
@@ -96,7 +97,10 @@ void OSystem_PSP2::initBackend() {
if (!ConfMan.hasKey("shader")) {
ConfMan.setInt("shader", 2);
}
-
+ if (!ConfMan.hasKey("touchpad_mouse_mode")) {
+ ConfMan.setBool("touchpad_mouse_mode", false);
+ }
+
// Create the savefile manager
if (_savefileManager == 0)
_savefileManager = new DefaultSaveFileManager("ux0:data/scummvm/saves");
@@ -125,9 +129,30 @@ bool OSystem_PSP2::hasFeature(Feature f) {
return (f == kFeatureKbdMouseSpeed ||
f == kFeatureJoystickDeadzone ||
f == kFeatureShader ||
+ f == kFeatureTouchpadMode ||
OSystem_SDL::hasFeature(f));
}
+void OSystem_PSP2::setFeatureState(Feature f, bool enable) {
+ switch (f) {
+ case kFeatureTouchpadMode:
+ ConfMan.setBool("touchpad_mouse_mode", enable);
+ break;
+ }
+ OSystem_SDL::setFeatureState(f, enable);
+}
+
+bool OSystem_PSP2::getFeatureState(Feature f) {
+ switch (f) {
+ case kFeatureTouchpadMode:
+ return ConfMan.getBool("touchpad_mouse_mode");
+ break;
+ default:
+ return OSystem_SDL::getFeatureState(f);
+ break;
+ }
+}
+
void OSystem_PSP2::logMessage(LogMessageType::Type type, const char *message) {
#if __PSP2_DEBUG__
psp2shell_print(message);
diff --git a/backends/platform/sdl/psp2/psp2.h b/backends/platform/sdl/psp2/psp2.h
index 65d98098be..db9140e4c1 100644
--- a/backends/platform/sdl/psp2/psp2.h
+++ b/backends/platform/sdl/psp2/psp2.h
@@ -34,19 +34,21 @@ public:
OSystem_PSP2(Common::String baseConfigName = "scummvm.ini");
virtual ~OSystem_PSP2() {}
- virtual void init();
- virtual void initBackend();
- virtual bool hasFeature(Feature f);
- virtual void logMessage(LogMessageType::Type type, const char *message);
+ virtual void init() override;
+ virtual void initBackend() override;
+ virtual bool hasFeature(Feature f) override;
+ virtual void setFeatureState(Feature f, bool enable) override;
+ virtual bool getFeatureState(Feature f) override;
+ virtual void logMessage(LogMessageType::Type type, const char *message) override;
protected:
// Base string for creating the default path and filename
// for the configuration file
Common::String _baseConfigName;
- virtual Common::String getDefaultConfigFileName();
+ virtual Common::String getDefaultConfigFileName() override;
- virtual Common::WriteStream *createLogFile();
+ virtual Common::WriteStream *createLogFile() override;
};
#endif