aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Symonds2007-01-06 04:19:28 +0000
committerDavid Symonds2007-01-06 04:19:28 +0000
commita16a3f258dd3e4634160ead2039ee0afec5df53b (patch)
tree56f4f1a74db02d27768f86bc50df845c3fa830f6
parentef2d914742ae61b5f1cb0b39349d6bc14a19b495 (diff)
downloadscummvm-rg350-a16a3f258dd3e4634160ead2039ee0afec5df53b.tar.gz
scummvm-rg350-a16a3f258dd3e4634160ead2039ee0afec5df53b.tar.bz2
scummvm-rg350-a16a3f258dd3e4634160ead2039ee0afec5df53b.zip
Menus should wrap around at top and bottom.
svn-id: r25023
-rw-r--r--engines/agi/menu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index a127a060fd..160609a15b 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -387,9 +387,9 @@ bool Menu::keyhandler(int key) {
v_cur_menu += key == KEY_DOWN ? 1 : -1;
if (v_cur_menu < 0)
- v_cur_menu = 0;
- if (v_cur_menu > v_max_menu[h_cur_menu])
v_cur_menu = v_max_menu[h_cur_menu];
+ if (v_cur_menu > v_max_menu[h_cur_menu])
+ v_cur_menu = 0;
draw_menu_option(h_cur_menu);
draw_menu_option_hilite(h_cur_menu, v_cur_menu);