Fix FS#6127 - highlevel was not being saved when you win bubbles.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11138 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Barry Wardell 2006-10-06 10:46:49 +00:00
parent da2bf53230
commit cac1b44850

View file

@ -2693,7 +2693,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
char str[19]; char str[19];
case BB_WIN: case BB_WIN:
rb->splash(HZ*2, true, "You Win!"); rb->splash(HZ*2, true, "You Win!");
/* record high level */
if(bb.level-1 > bb.highlevel) {
bb.highlevel = bb.level-1;
bb.dirty = true;
}
/* record high score */
if((position = bubbles_recordscore(&bb))) { if((position = bubbles_recordscore(&bb))) {
rb->snprintf(str, 19, "New high score #%d!", position); rb->snprintf(str, 19, "New high score #%d!", position);
rb->splash(HZ*2, true, str); rb->splash(HZ*2, true, str);