summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-08-03 02:56:55 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-08-03 02:56:55 +0000
commit4bc16462639e01fbf6f435330cbabe10321d91ae (patch)
tree09a1f6b6f9bb8e27a5677e7619d7977152902020 /apps/plugins
parente18b8f3856beb84d6393926a404928624dee9c3d (diff)
downloadrockbox-4bc16462639e01fbf6f435330cbabe10321d91ae.tar.gz
rockbox-4bc16462639e01fbf6f435330cbabe10321d91ae.zip
Clix: Make Clix respect the global touchscreen setting when in a menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22132 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/clix.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c
index 5f9ad517ab..be60bdde7a 100644
--- a/apps/plugins/clix.c
+++ b/apps/plugins/clix.c
@@ -596,6 +596,8 @@ static int clix_menu(struct clix_game_state_t* state, bool ingame)
{
rb->button_clear_queue();
int choice = 0;
+ bool leave_menu=false;
+ int ret=0;
_ingame = ingame;
@@ -607,16 +609,26 @@ static int clix_menu(struct clix_game_state_t* state, bool ingame)
"Playback Control",
"Quit");
- while (true) {
+ /* Entering Menu, set the touchscreen to the global setting */
+ rb->touchscreen_set_mode(rb->global_settings->touch_mode);
+
+ while (!leave_menu) {
+
switch (rb->do_menu(&main_menu, &choice, NULL, false)) {
case 0:
- return 0;
+ leave_menu=true;
+ ret = 0;
+ break;
case 1:
clix_init(state);
- return 0;
+ leave_menu=true;
+ ret = 0;
+ break;
case 2:
- if (clix_help())
- return 1;
+ if (clix_help()) {
+ leave_menu=true;
+ ret = 1;
+ }
break;
case 3:
highscore_show(NUM_SCORES, highest, NUM_SCORES, true);
@@ -626,11 +638,18 @@ static int clix_menu(struct clix_game_state_t* state, bool ingame)
break;
case 5:
case MENU_ATTACHED_USB:
- return 1;
+ leave_menu=true;
+ ret = 1;
+ break;
default:
break;
}
}
+
+ /* Leaving the menu, set back to pointer mode */
+ rb->touchscreen_set_mode(TOUCHSCREEN_POINT);
+
+ return ret;
}
static int clix_handle_game(struct clix_game_state_t* state)