diff options
Diffstat (limited to 'gba_memory.c')
-rw-r--r-- | gba_memory.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gba_memory.c b/gba_memory.c index 8d94ca5..d2af846 100644 --- a/gba_memory.c +++ b/gba_memory.c @@ -18,6 +18,7 @@ */ #include "common.h" +#include "zip.h" /* Sound */ #define gbc_sound_tone_control_low(channel, address) \ @@ -2381,10 +2382,15 @@ char gamepak_filename[512]; u32 load_gamepak(const char *name) { + char *dot_position = strrchr(name, '.'); + s32 file_size; char cheats_filename[256]; char *p; - s32 file_size = load_gamepak_raw(name); + if(!strcmp(dot_position, ".zip")) + file_size = load_file_zip(name); + else + file_size = load_gamepak_raw(name); if(file_size == -1) return -1; |