Index: apps/plugins/xobox.c =================================================================== --- apps/plugins/xobox.c (revision 21197) +++ apps/plugins/xobox.c (working copy) @@ -926,76 +926,45 @@ static int xobox_menu(bool ingame) { rb->button_clear_queue(); - int choice = 0; - if (ingame) { - MENUITEM_STRINGLIST (main_menu, "Xobox Menu", NULL, - "Resume Game", - "Restart Level", - "Speed", - "Difficult", - "Playback Control", - "Quit"); + int selected = ingame?1:0; + MENUITEM_STRINGLIST (main_menu, "Xobox Menu", NULL, + "Start New Game", + "Resume Game", + "Speed", + "Difficulty", + "Playback Control", + "Quit"); - while (true) { - choice = rb->do_menu(&main_menu, &choice, NULL, false); - switch (choice) { - case 0: + while (true) { + switch (rb->do_menu(&main_menu, &selected, NULL, false)) { + case 0: + init_game (); + return 0; + case 1: + if (ingame) { return 0; - case 1: - init_game (); - return 0; - case 2: - rb->set_int ("Speed", "", UNIT_INT, &speed, NULL, 1, 1, 10, NULL); - break; - case 3: - rb->set_int ("Difficulty", "", UNIT_INT, &difficulty, NULL, - 5, 50, 95, NULL); - break; - case 4: - playback_control(NULL); - break; - case 5: - return 1; - case MENU_ATTACHED_USB: - return 1; - default: - break; - } + } else { + rb->splash (HZ, "No game to resume"); + } + break; + case 2: + rb->set_int ("Speed", "", UNIT_INT, &speed, NULL, 1, 1, 10, NULL); + break; + case 3: + rb->set_int ("Difficulty", "", UNIT_INT, &difficulty, NULL, + 5, 50, 95, NULL); + break; + case 4: + playback_control(NULL); + break; + case 5: + return 1; + case MENU_ATTACHED_USB: + return 1; + default: + break; } } - else { - MENUITEM_STRINGLIST (main_menu, "Xobox Menu", NULL, - "Start Game", - "Speed", - "Difficulty", - "Playback Control", - "Quit"); - - while (true) { - choice = rb->do_menu(&main_menu, &choice, NULL, false); - switch (choice) { - case 0: - init_game (); - return 0; - case 1: - rb->set_int ("Speed", "", UNIT_INT, &speed, NULL, 1, 1, 10, NULL); - break; - case 2: - rb->set_int ("Difficulty", "", UNIT_INT, &difficulty, NULL, - 5, 50, 95, NULL); - break; - case 3: - playback_control(NULL); - break; - case 4: - return 1; - case MENU_ATTACHED_USB: - return 1; - default: - break; - } - } - } } /* general keypad handler loop */ @@ -1014,8 +983,8 @@ #ifdef HAS_BUTTON_HOLD if (rb->button_hold()) { - pause = true; - rb->splash (HZ, "PAUSED"); + pause = true; + rb->splash (HZ, "Paused"); } #endif @@ -1046,6 +1015,10 @@ if (xobox_menu(true)==1) { quit = true; } + if (pause) { + refresh_board(); + rb->splash(0, "Paused"); + } break; default: if (rb->default_event_handler (button) == SYS_USB_CONNECTED)