Jewels: repair resuming of puzzle mode games.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13817 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cf872bd594
commit
32eddb44be
1 changed files with 2 additions and 0 deletions
|
@ -1292,6 +1292,7 @@ static bool jewels_loadgame(struct game_context* bj) {
|
|||
while(true) {
|
||||
if(rb->read(fd, &bj->score, sizeof(bj->score)) <= 0) break;
|
||||
if(rb->read(fd, &bj->level, sizeof(bj->level)) <= 0) break;
|
||||
if(rb->read(fd, &bj->type, sizeof(bj->type)) <= 0) break;
|
||||
if(rb->read(fd, bj->playboard, sizeof(bj->playboard)) <= 0) break;
|
||||
bj->resume = true;
|
||||
loaded = true;
|
||||
|
@ -1315,6 +1316,7 @@ static void jewels_savegame(struct game_context* bj) {
|
|||
fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT);
|
||||
rb->write(fd, &bj->score, sizeof(bj->score));
|
||||
rb->write(fd, &bj->level, sizeof(bj->level));
|
||||
rb->write(fd, &bj->type, sizeof(bj->type));
|
||||
rb->write(fd, bj->playboard, sizeof(bj->playboard));
|
||||
rb->close(fd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue