diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/bubbles.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 697f690458..344b732968 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -41,8 +41,8 @@ PLUGIN_HEADER | |||
41 | /* final game return status */ | 41 | /* final game return status */ |
42 | enum { | 42 | enum { |
43 | BB_LOSE, | 43 | BB_LOSE, |
44 | BB_QUIT_WITHOUT_SAVING, | ||
44 | BB_QUIT, | 45 | BB_QUIT, |
45 | BB_SAVE_AND_QUIT, | ||
46 | BB_USB, | 46 | BB_USB, |
47 | BB_END, | 47 | BB_END, |
48 | BB_WIN, | 48 | BB_WIN, |
@@ -2369,7 +2369,7 @@ static int bubbles_menu(struct game_context* bb) { | |||
2369 | MENUITEM_STRINGLIST(menu,"Bubbles Menu",NULL, | 2369 | MENUITEM_STRINGLIST(menu,"Bubbles Menu",NULL, |
2370 | "Resume Game", "Start New Game", | 2370 | "Resume Game", "Start New Game", |
2371 | "Level", "High Scores", "Playback Control", | 2371 | "Level", "High Scores", "Playback Control", |
2372 | "Quit", "Save and Quit"); | 2372 | "Quit without Saving", "Quit"); |
2373 | 2373 | ||
2374 | while(!startgame){ | 2374 | while(!startgame){ |
2375 | switch (rb->do_menu(&menu, &selected, NULL, false)) | 2375 | switch (rb->do_menu(&menu, &selected, NULL, false)) |
@@ -2400,10 +2400,10 @@ static int bubbles_menu(struct game_context* bb) { | |||
2400 | case 4: /* Playback Control */ | 2400 | case 4: /* Playback Control */ |
2401 | playback_control(NULL); | 2401 | playback_control(NULL); |
2402 | break; | 2402 | break; |
2403 | case 5: /* quit */ | 2403 | case 5: /* quit but don't save */ |
2404 | return BB_QUIT; | 2404 | return BB_QUIT_WITHOUT_SAVING; |
2405 | case 6: /* save and quit */ | 2405 | case 6: /* save and quit */ |
2406 | return BB_SAVE_AND_QUIT; | 2406 | return BB_QUIT; |
2407 | case MENU_ATTACHED_USB: | 2407 | case MENU_ATTACHED_USB: |
2408 | bubbles_callback(bb); | 2408 | bubbles_callback(bb); |
2409 | return BB_USB; | 2409 | return BB_USB; |
@@ -2518,14 +2518,17 @@ enum plugin_status plugin_start(const void* parameter) { | |||
2518 | exit = true; | 2518 | exit = true; |
2519 | break; | 2519 | break; |
2520 | 2520 | ||
2521 | case BB_SAVE_AND_QUIT: | ||
2522 | rb->splash(HZ/2, "Saving Game ..."); | ||
2523 | bubbles_savegame(&bb); | ||
2524 | /* fall through */ | ||
2525 | |||
2526 | case BB_QUIT: | 2521 | case BB_QUIT: |
2522 | /* the first splash is to make sure it's read, but don't make it | ||
2523 | * too long to not delay the saving further */ | ||
2524 | rb->splash(HZ/5, "Saving Game ..."); | ||
2525 | rb->splash(0, "Saving Game ..."); | ||
2526 | bubbles_savegame(&bb); | ||
2527 | bubbles_savedata(); | 2527 | bubbles_savedata(); |
2528 | highscore_save(SCORE_FILE, highscores, NUM_SCORES); | 2528 | highscore_save(SCORE_FILE, highscores, NUM_SCORES); |
2529 | /* fall through */ | ||
2530 | |||
2531 | case BB_QUIT_WITHOUT_SAVING: | ||
2529 | exit = true; | 2532 | exit = true; |
2530 | break; | 2533 | break; |
2531 | 2534 | ||