allow player 2 touchscreen controls
[drnoksnes] / platform / osso.cpp
index bc4c6cf..a6c9da1 100644 (file)
@@ -240,6 +240,7 @@ void OssoConfig()
        gchar key[kGConfPlayerPathBufferLen];
        gchar *relKey = key + sprintf(key, kGConfPlayerPath, 1);
 
+       //  keyboard
        strcpy(relKey, kGConfPlayerKeyboardEnable);
        if (gconf_client_get_bool(gcc, key, NULL)) {
                Config.joypad1Enabled = true;
@@ -249,15 +250,38 @@ void OssoConfig()
                loadSafeKeymap();
        }
 
+       //  touchscreen
+       strcpy(relKey, kGConfPlayerTouchscreenEnable);
+       if (gconf_client_get_bool(gcc, key, NULL)) {
+               Config.touchscreenInput = 1;
+
+               strcpy(relKey, kGConfPlayerTouchscreenShow);
+               if (gconf_client_get_bool(gcc, key, NULL)) {
+                       Config.touchscreenShow = true;
+               }
+       }
+
        // Read player 2 controls
        relKey = key + sprintf(key, kGConfPlayerPath, 2);
 
+       //  keyboard
        strcpy(relKey, kGConfPlayerKeyboardEnable);
        if (gconf_client_get_bool(gcc, key, NULL)) {
                Config.joypad2Enabled = true;
                loadPlayer2Keymap(gcc);
        }
 
+       //  touchscreen
+       strcpy(relKey, kGConfPlayerTouchscreenEnable);
+       if (gconf_client_get_bool(gcc, key, NULL)) {
+               Config.touchscreenInput = 2;
+
+               strcpy(relKey, kGConfPlayerTouchscreenShow);
+               if (gconf_client_get_bool(gcc, key, NULL)) {
+                       Config.touchscreenShow = true;
+               }
+       }
+
        // Time to read the startup command from D-Bus
 
        // Timeout after 3 seconds, and assume we didn't receive any.