fix .gz roms save states in gui
authorJavier S. Pedro <maemo@javispedro.com>
Mon, 7 Sep 2009 17:35:17 +0000 (19:35 +0200)
committerJavier S. Pedro <maemo@javispedro.com>
Mon, 7 Sep 2009 17:35:17 +0000 (19:35 +0200)
gui/state.c

index e158000..5cf5307 100644 (file)
@@ -54,6 +54,10 @@ static gboolean rom_get_freeze_file()
        }
 
        ext = strrchr(current_rom_file, '.');
+       if (ext && g_ascii_strcasecmp(ext, ".gz") == 0) {
+               // Ignore the .gz part in rom filename.
+               ext = g_strrstr_len(current_rom_file, ext - current_rom_file, ".");
+       }
        if (!ext) {
                rom_base = g_strdup(current_rom_file);
        } else {