diff options
| author | Teruaki Kawashima <teru@rockbox.org> | 2009-09-06 14:14:22 +0000 |
|---|---|---|
| committer | Teruaki Kawashima <teru@rockbox.org> | 2009-09-06 14:14:22 +0000 |
| commit | d41e698ea00a1922434a75d6ba8f3eaa3485abd3 (patch) | |
| tree | dc4daf5cbcadef800e1a19a810c1ce3f776e813e /apps/plugins/bubbles.c | |
| parent | c17037a80266e9e97643e8c34459f3ac81510be0 (diff) | |
| download | rockbox-d41e698ea00a1922434a75d6ba8f3eaa3485abd3.zip rockbox-d41e698ea00a1922434a75d6ba8f3eaa3485abd3.tar.gz rockbox-d41e698ea00a1922434a75d6ba8f3eaa3485abd3.tar.bz2 rockbox-d41e698ea00a1922434a75d6ba8f3eaa3485abd3.tar.xz | |
brickmania, blackjack, jewels, bubbles: Remove save file only if player resumed the game loaded from the file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22639 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/bubbles.c')
| -rw-r--r-- | apps/plugins/bubbles.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index da927de..3b28ced 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -1274,6 +1274,7 @@ struct highscore highscores[NUM_SCORES]; /* used to denote available resume info */ static bool resume = false; +static bool resume_file = false; static unsigned int highlevel = 0; /* the highest level beaten */ static unsigned int last_highlevel = 0; @@ -2393,14 +2394,15 @@ static int bubbles_menu(struct game_context* bb) { rb->splash(HZ/2, "Nothing to resume"); else startgame = true; - - if(rb->file_exists(SAVE_FILE)) - rb->remove(SAVE_FILE); + if(resume_file) + rb->remove(SAVE_FILE); + resume_file = false; break; case 1: /* new game */ bb->level = startlevel; startgame = true; resume = false; + resume_file = false; break; case 2: /* choose level */ startlevel++; @@ -2497,6 +2499,7 @@ enum plugin_status plugin_start(const void* parameter) { /* load files */ resume = bubbles_loadgame(&bb); + resume_file = resume; bubbles_loaddata(); highscore_load(SCORE_FILE, highscores, NUM_SCORES); rb->lcd_clear_display(); |