diff options
author | William Wilgus <wilgus.william@gmail.com> | 2020-07-19 13:42:04 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2020-07-19 22:10:26 +0000 |
commit | c39f95465b9844f70f375f1690e0bf75c7ee7cc1 (patch) | |
tree | 2fda6bd805a74f41dd4303c7699eabb9e1aa4a1c /apps/plugins | |
parent | 4663d94b4e4edec609b6a24581ee345f2a1bedaa (diff) | |
download | rockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.tar.gz rockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.zip |
do_menu pass internal synclist reference to callback
keep running into the rigid nature of do_menu
it isn't too bad when you don't need voice but once
you do the fun awaits
do_menu likes to talk on menu enter which is in a loop when you use do_menu
I would like to move the processing to the callback
TOO BAD you only get an action and the menu_item_ex struct
you sent it when calling the function
Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/2048.c | 5 | ||||
-rw-r--r-- | apps/plugins/blackjack.c | 5 | ||||
-rw-r--r-- | apps/plugins/brickmania.c | 5 | ||||
-rw-r--r-- | apps/plugins/bubbles.c | 5 | ||||
-rw-r--r-- | apps/plugins/calendar.c | 5 | ||||
-rw-r--r-- | apps/plugins/chopper.c | 5 | ||||
-rw-r--r-- | apps/plugins/clix.c | 5 | ||||
-rw-r--r-- | apps/plugins/codebuster.c | 5 | ||||
-rw-r--r-- | apps/plugins/disktidy.c | 5 | ||||
-rw-r--r-- | apps/plugins/jewels.c | 5 | ||||
-rw-r--r-- | apps/plugins/keybox.c | 6 | ||||
-rw-r--r-- | apps/plugins/lua/rocklib.c | 9 | ||||
-rw-r--r-- | apps/plugins/mazezam.c | 5 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_misc.c | 7 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_misc.h | 3 | ||||
-rw-r--r-- | apps/plugins/pegbox.c | 6 | ||||
-rw-r--r-- | apps/plugins/puzzles/rockbox.c | 5 | ||||
-rw-r--r-- | apps/plugins/rockblox.c | 5 | ||||
-rw-r--r-- | apps/plugins/snake.c | 5 | ||||
-rw-r--r-- | apps/plugins/solitaire.c | 5 | ||||
-rw-r--r-- | apps/plugins/spacerocks.c | 5 | ||||
-rw-r--r-- | apps/plugins/xobox.c | 5 | ||||
-rw-r--r-- | apps/plugins/xworld/sys.c | 5 |
23 files changed, 95 insertions, 26 deletions
diff --git a/apps/plugins/2048.c b/apps/plugins/2048.c index 15d3f41191..5dd5a7e99f 100644 --- a/apps/plugins/2048.c +++ b/apps/plugins/2048.c | |||
@@ -989,8 +989,11 @@ static enum plugin_status do_game(bool newgame) | |||
989 | 989 | ||
990 | /* decide if this_item should be shown in the main menu */ | 990 | /* decide if this_item should be shown in the main menu */ |
991 | /* used to hide resume option when there is no save */ | 991 | /* used to hide resume option when there is no save */ |
992 | static int mainmenu_cb(int action, const struct menu_item_ex *this_item) | 992 | static int mainmenu_cb(int action, |
993 | const struct menu_item_ex *this_item, | ||
994 | struct gui_synclist *this_list) | ||
993 | { | 995 | { |
996 | (void)this_list; | ||
994 | int idx = ((intptr_t)this_item); | 997 | int idx = ((intptr_t)this_item); |
995 | if(action == ACTION_REQUEST_MENUITEM && !loaded && (idx == 0 || idx == 5)) | 998 | if(action == ACTION_REQUEST_MENUITEM && !loaded && (idx == 0 || idx == 5)) |
996 | return ACTION_EXIT_MENUITEM; | 999 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 4511d3fad5..d685de9617 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c | |||
@@ -1418,8 +1418,11 @@ static bool blackjack_help(void) { | |||
1418 | return false; | 1418 | return false; |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | static int blackjack_menu_cb(int action, const struct menu_item_ex *this_item) | 1421 | static int blackjack_menu_cb(int action, |
1422 | const struct menu_item_ex *this_item, | ||
1423 | struct gui_synclist *this_list) | ||
1422 | { | 1424 | { |
1425 | (void)this_list; | ||
1423 | int i = ((intptr_t)this_item); | 1426 | int i = ((intptr_t)this_item); |
1424 | if(action == ACTION_REQUEST_MENUITEM | 1427 | if(action == ACTION_REQUEST_MENUITEM |
1425 | && !resume && (i==0 || i==5)) | 1428 | && !resume && (i==0 || i==5)) |
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index b0a1b6565b..182ba4f040 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -1530,8 +1530,11 @@ static int brickmania_help(void) | |||
1530 | return 0; | 1530 | return 0; |
1531 | } | 1531 | } |
1532 | 1532 | ||
1533 | static int brickmania_menu_cb(int action, const struct menu_item_ex *this_item) | 1533 | static int brickmania_menu_cb(int action, |
1534 | const struct menu_item_ex *this_item, | ||
1535 | struct gui_synclist *this_list) | ||
1534 | { | 1536 | { |
1537 | (void)this_list; | ||
1535 | int i = ((intptr_t)this_item); | 1538 | int i = ((intptr_t)this_item); |
1536 | if(action == ACTION_REQUEST_MENUITEM | 1539 | if(action == ACTION_REQUEST_MENUITEM |
1537 | && !resume && (i==0 || i==6)) | 1540 | && !resume && (i==0 || i==6)) |
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index e96010ec02..2d163d8bc9 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -2414,8 +2414,11 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock, | |||
2414 | return BB_NONE; | 2414 | return BB_NONE; |
2415 | } | 2415 | } |
2416 | 2416 | ||
2417 | static int bubbles_menu_cb(int action, const struct menu_item_ex *this_item) | 2417 | static int bubbles_menu_cb(int action, |
2418 | const struct menu_item_ex *this_item, | ||
2419 | struct gui_synclist *this_list) | ||
2418 | { | 2420 | { |
2421 | (void)this_list; | ||
2419 | int i = ((intptr_t)this_item); | 2422 | int i = ((intptr_t)this_item); |
2420 | if(action == ACTION_REQUEST_MENUITEM | 2423 | if(action == ACTION_REQUEST_MENUITEM |
2421 | && !resume && (i==0)) | 2424 | && !resume && (i==0)) |
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 4d89530ca9..ded0a70d26 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c | |||
@@ -876,8 +876,11 @@ static void add_memo(struct shown *shown, int type) | |||
876 | rb->splash(HZ/2, "Event not added"); | 876 | rb->splash(HZ/2, "Event not added"); |
877 | } | 877 | } |
878 | 878 | ||
879 | static int edit_menu_cb(int action, const struct menu_item_ex *this_item) | 879 | static int edit_menu_cb(int action, |
880 | const struct menu_item_ex *this_item, | ||
881 | struct gui_synclist *this_list) | ||
880 | { | 882 | { |
883 | (void)this_list; | ||
881 | int i = (intptr_t)this_item; | 884 | int i = (intptr_t)this_item; |
882 | if (action == ACTION_REQUEST_MENUITEM | 885 | if (action == ACTION_REQUEST_MENUITEM |
883 | && memos_in_shown_memory <= 0 && (i==0 || i==1)) | 886 | && memos_in_shown_memory <= 0 && (i==0 || i==1)) |
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 71e24deb8f..a206192974 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c | |||
@@ -767,8 +767,11 @@ static void chopDrawScene(void) | |||
767 | } | 767 | } |
768 | 768 | ||
769 | static bool _ingame; | 769 | static bool _ingame; |
770 | static int chopMenuCb(int action, const struct menu_item_ex *this_item) | 770 | static int chopMenuCb(int action, |
771 | const struct menu_item_ex *this_item, | ||
772 | struct gui_synclist *this_list) | ||
771 | { | 773 | { |
774 | (void)this_list; | ||
772 | if(action == ACTION_REQUEST_MENUITEM | 775 | if(action == ACTION_REQUEST_MENUITEM |
773 | && !_ingame && ((intptr_t)this_item)==0) | 776 | && !_ingame && ((intptr_t)this_item)==0) |
774 | return ACTION_EXIT_MENUITEM; | 777 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c index e80fdeab8b..748090358c 100644 --- a/apps/plugins/clix.c +++ b/apps/plugins/clix.c | |||
@@ -744,8 +744,11 @@ static bool clix_help(void) | |||
744 | } | 744 | } |
745 | 745 | ||
746 | static bool _ingame; | 746 | static bool _ingame; |
747 | static int clix_menu_cb(int action, const struct menu_item_ex *this_item) | 747 | static int clix_menu_cb(int action, |
748 | const struct menu_item_ex *this_item, | ||
749 | struct gui_synclist *this_list) | ||
748 | { | 750 | { |
751 | (void)this_list; | ||
749 | if(action == ACTION_REQUEST_MENUITEM | 752 | if(action == ACTION_REQUEST_MENUITEM |
750 | && !_ingame && ((intptr_t)this_item)==0) | 753 | && !_ingame && ((intptr_t)this_item)==0) |
751 | return ACTION_EXIT_MENUITEM; | 754 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/codebuster.c b/apps/plugins/codebuster.c index ca36d5d01b..956991575d 100644 --- a/apps/plugins/codebuster.c +++ b/apps/plugins/codebuster.c | |||
@@ -363,8 +363,11 @@ static void settings_menu(void) { | |||
363 | } | 363 | } |
364 | 364 | ||
365 | static bool resume; | 365 | static bool resume; |
366 | static int menu_cb(int action, const struct menu_item_ex *this_item) | 366 | static int menu_cb(int action, |
367 | const struct menu_item_ex *this_item, | ||
368 | struct gui_synclist *this_list) | ||
367 | { | 369 | { |
370 | (void)this_list; | ||
368 | int i = ((intptr_t)this_item); | 371 | int i = ((intptr_t)this_item); |
369 | if ((action == ACTION_REQUEST_MENUITEM) && (!resume && (i==0))) | 372 | if ((action == ACTION_REQUEST_MENUITEM) && (!resume && (i==0))) |
370 | return ACTION_EXIT_MENUITEM; | 373 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index 6f131e37a6..013e7a37bd 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c | |||
@@ -645,8 +645,11 @@ static bool tidy_types_selected(void) | |||
645 | return false; | 645 | return false; |
646 | } | 646 | } |
647 | 647 | ||
648 | static int disktidy_menu_cb(int action, const struct menu_item_ex *this_item) | 648 | static int disktidy_menu_cb(int action, |
649 | const struct menu_item_ex *this_item, | ||
650 | struct gui_synclist *this_list) | ||
649 | { | 651 | { |
652 | (void)this_list; | ||
650 | int item = ((intptr_t)this_item); | 653 | int item = ((intptr_t)this_item); |
651 | 654 | ||
652 | if (action == ACTION_REQUEST_MENUITEM && | 655 | if (action == ACTION_REQUEST_MENUITEM && |
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 87a9d2fabf..cae3befb5e 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -1471,8 +1471,11 @@ static bool jewels_help(void) | |||
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | static bool _ingame; | 1473 | static bool _ingame; |
1474 | static int jewels_menu_cb(int action, const struct menu_item_ex *this_item) | 1474 | static int jewels_menu_cb(int action, |
1475 | const struct menu_item_ex *this_item, | ||
1476 | struct gui_synclist *this_list) | ||
1475 | { | 1477 | { |
1478 | (void)this_list; | ||
1476 | int i = ((intptr_t)this_item); | 1479 | int i = ((intptr_t)this_item); |
1477 | if(action == ACTION_REQUEST_MENUITEM | 1480 | if(action == ACTION_REQUEST_MENUITEM |
1478 | && !_ingame && (i==0 || i==6)) | 1481 | && !_ingame && (i==0 || i==6)) |
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index d692c88419..914761e73b 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -104,9 +104,13 @@ static void do_decrypt(uint32_t* v, uint32_t* k) | |||
104 | v[0]=v0; v[1]=v1; | 104 | v[0]=v0; v[1]=v1; |
105 | } | 105 | } |
106 | 106 | ||
107 | static int context_item_cb(int action, const struct menu_item_ex *this_item) | 107 | static int context_item_cb(int action, |
108 | const struct menu_item_ex *this_item, | ||
109 | struct gui_synclist *this_list) | ||
108 | { | 110 | { |
109 | int i = (intptr_t)this_item; | 111 | int i = (intptr_t)this_item; |
112 | (void)this_list; | ||
113 | |||
110 | if (action == ACTION_REQUEST_MENUITEM | 114 | if (action == ACTION_REQUEST_MENUITEM |
111 | && pw_list.num_entries == 0 | 115 | && pw_list.num_entries == 0 |
112 | && (i != 0 && i != 5)) | 116 | && (i != 0 && i != 5)) |
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 6b24984130..6820c30dc3 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -220,9 +220,12 @@ static lua_State* store_luastate(lua_State *L, bool bStore) | |||
220 | return LStored; | 220 | return LStored; |
221 | } | 221 | } |
222 | 222 | ||
223 | static int menu_callback(int action, const struct menu_item_ex *this_item) | 223 | static int menu_callback(int action, |
224 | const struct menu_item_ex *this_item, | ||
225 | struct gui_synclist *this_list) | ||
224 | { | 226 | { |
225 | (void) this_item; | 227 | (void) this_item; |
228 | (void) this_list; | ||
226 | static int lua_ref = LUA_NOREF; | 229 | static int lua_ref = LUA_NOREF; |
227 | lua_State *L = store_luastate(NULL, false); | 230 | lua_State *L = store_luastate(NULL, false); |
228 | if(!L) | 231 | if(!L) |
@@ -259,7 +262,7 @@ RB_WRAP(do_menu) | |||
259 | { | 262 | { |
260 | /*lua callback function cb(action) return action end */ | 263 | /*lua callback function cb(action) return action end */ |
261 | ref_lua = luaL_ref(L, LUA_REGISTRYINDEX); | 264 | ref_lua = luaL_ref(L, LUA_REGISTRYINDEX); |
262 | menu_callback(ref_lua, NULL); | 265 | menu_callback(ref_lua, NULL, NULL); |
263 | store_luastate(L, true); | 266 | store_luastate(L, true); |
264 | menu_desc.menu_callback = &menu_callback; | 267 | menu_desc.menu_callback = &menu_callback; |
265 | } | 268 | } |
@@ -277,7 +280,7 @@ RB_WRAP(do_menu) | |||
277 | { | 280 | { |
278 | store_luastate(NULL, true); | 281 | store_luastate(NULL, true); |
279 | luaL_unref (L, LUA_REGISTRYINDEX, ref_lua); | 282 | luaL_unref (L, LUA_REGISTRYINDEX, ref_lua); |
280 | menu_callback(LUA_NOREF, NULL); | 283 | menu_callback(LUA_NOREF, NULL, NULL); |
281 | } | 284 | } |
282 | 285 | ||
283 | lua_pushinteger(L, result); | 286 | lua_pushinteger(L, result); |
diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c index 759ca6477d..423b09288d 100644 --- a/apps/plugins/mazezam.c +++ b/apps/plugins/mazezam.c | |||
@@ -853,8 +853,11 @@ static void resume_save_data (struct resume_data *r, struct resume_data *old) | |||
853 | * Manages the main menu | 853 | * Manages the main menu |
854 | ******************************************************************************/ | 854 | ******************************************************************************/ |
855 | static bool have_continue; | 855 | static bool have_continue; |
856 | static int main_menu_cb(int action, const struct menu_item_ex *this_item) | 856 | static int main_menu_cb(int action, |
857 | const struct menu_item_ex *this_item, | ||
858 | struct gui_synclist *this_list) | ||
857 | { | 859 | { |
860 | (void)this_list; | ||
858 | if(action == ACTION_REQUEST_MENUITEM | 861 | if(action == ACTION_REQUEST_MENUITEM |
859 | && !have_continue && ((intptr_t)this_item)==0) | 862 | && !have_continue && ((intptr_t)this_item)==0) |
860 | return ACTION_EXIT_MENUITEM; | 863 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/mpegplayer/mpeg_misc.c b/apps/plugins/mpegplayer/mpeg_misc.c index 7b73c7c376..c85285f4f8 100644 --- a/apps/plugins/mpegplayer/mpeg_misc.c +++ b/apps/plugins/mpegplayer/mpeg_misc.c | |||
@@ -183,8 +183,11 @@ long mpeg_sysevent(void) | |||
183 | return mpeg_sysevent_id; | 183 | return mpeg_sysevent_id; |
184 | } | 184 | } |
185 | 185 | ||
186 | int mpeg_sysevent_callback(int btn, const struct menu_item_ex *menu) | 186 | int mpeg_sysevent_callback(int btn, |
187 | const struct menu_item_ex *menu, | ||
188 | struct gui_synclist *this_list) | ||
187 | { | 189 | { |
190 | (void) this_list; | ||
188 | switch (btn) | 191 | switch (btn) |
189 | { | 192 | { |
190 | case SYS_USB_CONNECTED: | 193 | case SYS_USB_CONNECTED: |
@@ -218,6 +221,6 @@ int mpeg_button_get(int timeout) | |||
218 | /* Produce keyclick */ | 221 | /* Produce keyclick */ |
219 | rb->keyclick_click(true, button); | 222 | rb->keyclick_click(true, button); |
220 | 223 | ||
221 | return mpeg_sysevent_callback(button, NULL); | 224 | return mpeg_sysevent_callback(button, NULL, NULL); |
222 | } | 225 | } |
223 | 226 | ||
diff --git a/apps/plugins/mpegplayer/mpeg_misc.h b/apps/plugins/mpegplayer/mpeg_misc.h index 6626bba594..e04db0e19d 100644 --- a/apps/plugins/mpegplayer/mpeg_misc.h +++ b/apps/plugins/mpegplayer/mpeg_misc.h | |||
@@ -241,7 +241,8 @@ void mpeg_sysevent_set(void); | |||
241 | long mpeg_sysevent(void); | 241 | long mpeg_sysevent(void); |
242 | 242 | ||
243 | /* Call with a system event code and used as menu callback */ | 243 | /* Call with a system event code and used as menu callback */ |
244 | int mpeg_sysevent_callback(int btn, const struct menu_item_ex *menu); | 244 | int mpeg_sysevent_callback(int btn, const struct menu_item_ex *menu, |
245 | struct gui_synclist *this_list); | ||
245 | 246 | ||
246 | /* Handle recorded event */ | 247 | /* Handle recorded event */ |
247 | void mpeg_sysevent_handle(void); | 248 | void mpeg_sysevent_handle(void); |
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index b638f2feeb..e000e98d33 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c | |||
@@ -1316,8 +1316,12 @@ static bool pegbox_help(void) | |||
1316 | * pegbox_menu() is the game menu | 1316 | * pegbox_menu() is the game menu |
1317 | ************************************************************************/ | 1317 | ************************************************************************/ |
1318 | static bool _ingame; | 1318 | static bool _ingame; |
1319 | static int pegbox_menu_cb(int action, const struct menu_item_ex *this_item) | 1319 | static int pegbox_menu_cb(int action, |
1320 | const struct menu_item_ex *this_item, | ||
1321 | struct gui_synclist *this_list) | ||
1320 | { | 1322 | { |
1323 | (void)this_list; | ||
1324 | |||
1321 | int i = (intptr_t)this_item; | 1325 | int i = (intptr_t)this_item; |
1322 | if( action == ACTION_REQUEST_MENUITEM ) | 1326 | if( action == ACTION_REQUEST_MENUITEM ) |
1323 | { | 1327 | { |
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 45733c12a3..3bae2e1e64 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c | |||
@@ -2827,8 +2827,11 @@ static void debug_menu(void) | |||
2827 | } | 2827 | } |
2828 | #endif | 2828 | #endif |
2829 | 2829 | ||
2830 | static int pausemenu_cb(int action, const struct menu_item_ex *this_item) | 2830 | static int pausemenu_cb(int action, |
2831 | const struct menu_item_ex *this_item, | ||
2832 | struct gui_synclist *this_list) | ||
2831 | { | 2833 | { |
2834 | (void)this_list; | ||
2832 | int i = (intptr_t) this_item; | 2835 | int i = (intptr_t) this_item; |
2833 | if(action == ACTION_REQUEST_MENUITEM) | 2836 | if(action == ACTION_REQUEST_MENUITEM) |
2834 | { | 2837 | { |
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 93479c5c56..b6cf6e5470 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -1512,8 +1512,11 @@ static bool rockblox_help(void) | |||
1512 | return false; | 1512 | return false; |
1513 | } | 1513 | } |
1514 | 1514 | ||
1515 | static int rockblox_menu_cb(int action, const struct menu_item_ex *this_item) | 1515 | static int rockblox_menu_cb(int action, |
1516 | const struct menu_item_ex *this_item, | ||
1517 | struct gui_synclist *this_list) | ||
1516 | { | 1518 | { |
1519 | (void)this_list; | ||
1517 | int i = ((intptr_t)this_item); | 1520 | int i = ((intptr_t)this_item); |
1518 | if(action == ACTION_REQUEST_MENUITEM | 1521 | if(action == ACTION_REQUEST_MENUITEM |
1519 | && !resume && (i==0 || i==5)) | 1522 | && !resume && (i==0 || i==5)) |
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index c885f4ccae..f60ddfe3de 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c | |||
@@ -496,8 +496,11 @@ static void snake_game_init(void) { | |||
496 | board[11][7]=1; | 496 | board[11][7]=1; |
497 | } | 497 | } |
498 | 498 | ||
499 | static int snake_menu_cb(int action, const struct menu_item_ex *this_item) | 499 | static int snake_menu_cb(int action, |
500 | const struct menu_item_ex *this_item, | ||
501 | struct gui_synclist *this_list) | ||
500 | { | 502 | { |
503 | (void)this_list; | ||
501 | if(action == ACTION_REQUEST_MENUITEM | 504 | if(action == ACTION_REQUEST_MENUITEM |
502 | && !ingame && ((intptr_t)this_item)==0) | 505 | && !ingame && ((intptr_t)this_item)==0) |
503 | return ACTION_EXIT_MENUITEM; | 506 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index c743634279..b830edf857 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c | |||
@@ -1060,8 +1060,11 @@ void solitaire_init(void); | |||
1060 | enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB }; | 1060 | enum { MENU_RESUME, MENU_SAVE_AND_QUIT, MENU_QUIT, MENU_USB }; |
1061 | 1061 | ||
1062 | static bool _ingame; | 1062 | static bool _ingame; |
1063 | static int solitaire_menu_cb(int action, const struct menu_item_ex *this_item) | 1063 | static int solitaire_menu_cb(int action, |
1064 | const struct menu_item_ex *this_item, | ||
1065 | struct gui_synclist *this_list) | ||
1064 | { | 1066 | { |
1067 | (void)this_list; | ||
1065 | int i = (intptr_t)this_item; | 1068 | int i = (intptr_t)this_item; |
1066 | if( action == ACTION_REQUEST_MENUITEM ) | 1069 | if( action == ACTION_REQUEST_MENUITEM ) |
1067 | { | 1070 | { |
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 91bf7757de..ede67291b0 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c | |||
@@ -1929,8 +1929,11 @@ static bool spacerocks_help(void) | |||
1929 | 1929 | ||
1930 | #define PLUGIN_OTHER 10 | 1930 | #define PLUGIN_OTHER 10 |
1931 | static bool ingame; | 1931 | static bool ingame; |
1932 | static int spacerocks_menu_cb(int action, const struct menu_item_ex *this_item) | 1932 | static int spacerocks_menu_cb(int action, |
1933 | const struct menu_item_ex *this_item, | ||
1934 | struct gui_synclist *this_list) | ||
1933 | { | 1935 | { |
1936 | (void)this_list; | ||
1934 | if (action == ACTION_REQUEST_MENUITEM | 1937 | if (action == ACTION_REQUEST_MENUITEM |
1935 | && !ingame && ((intptr_t)this_item)==0) | 1938 | && !ingame && ((intptr_t)this_item)==0) |
1936 | return ACTION_EXIT_MENUITEM; | 1939 | return ACTION_EXIT_MENUITEM; |
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index f86992f240..b923e23986 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c | |||
@@ -1154,8 +1154,11 @@ static bool save_game(void) | |||
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | /* the main menu */ | 1156 | /* the main menu */ |
1157 | static int xobox_menu_cb(int action, const struct menu_item_ex *this_item) | 1157 | static int xobox_menu_cb(int action, |
1158 | const struct menu_item_ex *this_item, | ||
1159 | struct gui_synclist *this_list) | ||
1158 | { | 1160 | { |
1161 | (void)this_list; | ||
1159 | intptr_t item = (intptr_t)this_item; | 1162 | intptr_t item = (intptr_t)this_item; |
1160 | if(action == ACTION_REQUEST_MENUITEM | 1163 | if(action == ACTION_REQUEST_MENUITEM |
1161 | && !_ingame && (item == 0 || item == 6)) | 1164 | && !_ingame && (item == 0 || item == 6)) |
diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index 22fc92f7e2..1416a40577 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c | |||
@@ -311,8 +311,11 @@ static void sys_reset_settings(struct System* sys) | |||
311 | 311 | ||
312 | static struct System* mainmenu_sysptr; | 312 | static struct System* mainmenu_sysptr; |
313 | 313 | ||
314 | static int mainmenu_cb(int action, const struct menu_item_ex *this_item) | 314 | static int mainmenu_cb(int action, |
315 | const struct menu_item_ex *this_item, | ||
316 | struct gui_synclist *this_list) | ||
315 | { | 317 | { |
318 | (void)this_list; | ||
316 | int idx = ((intptr_t)this_item); | 319 | int idx = ((intptr_t)this_item); |
317 | if(action == ACTION_REQUEST_MENUITEM && !mainmenu_sysptr->loaded && (idx == 0 || idx == 8 || idx == 10)) | 320 | if(action == ACTION_REQUEST_MENUITEM && !mainmenu_sysptr->loaded && (idx == 0 || idx == 8 || idx == 10)) |
318 | return ACTION_EXIT_MENUITEM; | 321 | return ACTION_EXIT_MENUITEM; |