aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/psp2/psp2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl/psp2/psp2.cpp')
-rw-r--r--backends/platform/sdl/psp2/psp2.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/backends/platform/sdl/psp2/psp2.cpp b/backends/platform/sdl/psp2/psp2.cpp
index 12154ba7d0..29be31f267 100644
--- a/backends/platform/sdl/psp2/psp2.cpp
+++ b/backends/platform/sdl/psp2/psp2.cpp
@@ -73,7 +73,6 @@ void OSystem_PSP2::init() {
void OSystem_PSP2::initBackend() {
ConfMan.set("joystick_num", 0);
- ConfMan.set("vkeybdpath", PREFIX "/data");
ConfMan.registerDefault("fullscreen", true);
ConfMan.registerDefault("aspect_ratio", false);
ConfMan.registerDefault("gfx_mode", "2x");
@@ -81,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", false);
if (!ConfMan.hasKey("fullscreen")) {
ConfMan.setBool("fullscreen", true);
@@ -97,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");
@@ -126,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);