diff options
author | Antoine Cellerier <dionoea@videolan.org> | 2007-07-01 22:21:35 +0000 |
---|---|---|
committer | Antoine Cellerier <dionoea@videolan.org> | 2007-07-01 22:21:35 +0000 |
commit | abf9232ceb6bab6909e79e59d18975f840568642 (patch) | |
tree | 0ef5ecdbf2c00cf392786104a66f5624f666bad3 | |
parent | cd82964e5d42b0252b8f14f15fc80709def37984 (diff) |
control imporvements for iPod by DerPapst.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13759 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 13 | ||||
-rw-r--r-- | apps/plugins/reversi/reversi-gui.h | 10 |
2 files changed, 17 insertions, 6 deletions
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index dcf4dd8ccb..18cf83c7ad 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -565,8 +565,12 @@ enum plugin_status plugin_start(struct plugin_api *api, void *parameter) { black_strategy = &strategy_human; reversi_gui_init(); +#ifdef (CONFIG_KEYPAD == IPOD_4G_PAD) || \ + (CONFIG_KEYPAD == IPOD_3G_PAD) + cursor_wrap_mode = WRAP_TORUS; +#else cursor_wrap_mode = WRAP_FLAT; - +#endif /* The main game loop */ exit = false; quit_plugin = false; @@ -646,8 +650,10 @@ enum plugin_status plugin_start(struct plugin_api *api, void *parameter) { rb->button_clear_queue(); } break; - /* Move cursor left */ +#ifdef REVERSI_BUTTON_ALT_LEFT + case REVERSI_BUTTON_ALT_LEFT: +#endif case REVERSI_BUTTON_LEFT: case (REVERSI_BUTTON_LEFT | BUTTON_REPEAT): if (reversi_gui_cursor_pos_hmove(-1, &row, &col)) { @@ -656,6 +662,9 @@ enum plugin_status plugin_start(struct plugin_api *api, void *parameter) { break; /* Move cursor right */ +#ifdef REVERSI_BUTTON_ALT_RIGHT + case REVERSI_BUTTON_ALT_RIGHT: +#endif case REVERSI_BUTTON_RIGHT: case (REVERSI_BUTTON_RIGHT | BUTTON_REPEAT): if (reversi_gui_cursor_pos_hmove(1, &row, &col)) { diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 971cdfe501..293be2492f 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h @@ -58,12 +58,14 @@ #elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ (CONFIG_KEYPAD == IPOD_3G_PAD) -#define REVERSI_BUTTON_UP BUTTON_SCROLL_BACK -#define REVERSI_BUTTON_DOWN BUTTON_SCROLL_FWD +#define REVERSI_BUTTON_UP BUTTON_MENU +#define REVERSI_BUTTON_DOWN BUTTON_PLAY #define REVERSI_BUTTON_LEFT BUTTON_LEFT #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT -#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT -#define REVERSI_BUTTON_MENU BUTTON_MENU +#define REVERSI_BUTTON_ALT_LEFT BUTTON_SCROLL_BACK +#define REVERSI_BUTTON_ALT_RIGHT BUTTON_SCROLL_FWD +#define REVERSI_BUTTON_MAKE_MOVE (BUTTON_SELECT | BUTTON_REL) +#define REVERSI_BUTTON_MENU (BUTTON_MENU | BUTTON_SELECT) #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) #define REVERSI_BUTTON_QUIT BUTTON_POWER |