fixed displaying extra setup options for wipe gestures only if selected
authorHolger Schemel <info@artsoft.org>
Wed, 23 Nov 2016 19:46:39 +0000 (20:46 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 23 Nov 2016 19:46:39 +0000 (20:46 +0100)
src/screens.c

index d9814948d7e21dc0bf15325e316d5b97d65d9115..6ece1110727fd797d8743884607b9a33c298c6d7 100644 (file)
@@ -5426,6 +5426,16 @@ static struct TokenInfo setup_info_input[] =
 };
 
 static struct TokenInfo setup_info_touch[] =
+{
+  { TYPE_ENTER_LIST,   execSetupChooseTouchControls, "Touch Control Type:" },
+  { TYPE_STRING,       &touch_controls_text,   ""                      },
+  { TYPE_EMPTY,                NULL,                   ""                      },
+  { TYPE_LEAVE_MENU,   execSetupMain,          "Back"                  },
+
+  { 0,                 NULL,                   NULL                    }
+};
+
+static struct TokenInfo setup_info_touch_wipe_gestures[] =
 {
   { TYPE_ENTER_LIST,   execSetupChooseTouchControls, "Touch Control Type:" },
   { TYPE_STRING,       &touch_controls_text,   ""                      },
@@ -5825,6 +5835,9 @@ static void DrawSetupScreen_Generic()
   {
     setup_info = setup_info_touch;
     title_string = "Setup Touch Ctrls";
+
+    if (strEqual(setup.touch.control_type, TOUCH_CONTROL_WIPE_GESTURES))
+      setup_info = setup_info_touch_wipe_gestures;
   }
   else if (setup_mode == SETUP_MODE_SHORTCUTS)
   {