From eb9b0999279057588bfe2ad62225bf39b1af80f0 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Fri, 22 May 2009 08:10:58 +0000 Subject: [PATCH] Fix save/restore (name states .uss, and fix how restore is called) --- src/gui-sdl/gui-sdl.c | 8 ++++++-- src/gui-sdl/menu.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui-sdl/gui-sdl.c b/src/gui-sdl/gui-sdl.c index c32013d..2319d98 100644 --- a/src/gui-sdl/gui-sdl.c +++ b/src/gui-sdl/gui-sdl.c @@ -453,13 +453,17 @@ static void save_load_state(int which) return; if (which == 0) - restore_state(name); + { + strcpy(savestate_fname, name); + savestate_state = STATE_DORESTORE; + } else unlink(name); free((void*)name); } break; case 1: /* Save state */ - snprintf(db, 255, "%s/%s.sav", dir, fb); + snprintf(db, 255, "%s/%s.uss", dir, fb); + savestate_state = STATE_DOSAVE; save_state(db, floppy0); break; default: diff --git a/src/gui-sdl/menu.c b/src/gui-sdl/menu.c index 3d0dac8..ec3bde6 100644 --- a/src/gui-sdl/menu.c +++ b/src/gui-sdl/menu.c @@ -265,7 +265,7 @@ static const char **get_file_list(const char *base_dir) { char buf[255]; const char *exts[] = {".adf", ".ADF", ".adz", ".ADZ", - ".sav", ".SAV", NULL}; + ".sav", ".SAV", ".uss", ".USS", NULL}; struct stat st; snprintf(buf, 255, "%s/%s", base_dir, de->d_name);