diff --git a/360/frontend-xdk/menu.cpp b/360/frontend-xdk/menu.cpp index e6a0abbe4d..87869de8f0 100644 --- a/360/frontend-xdk/menu.cpp +++ b/360/frontend-xdk/menu.cpp @@ -551,7 +551,7 @@ HRESULT CRetroArchFileBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle if(path_file_exists(browser->current_dir.list->elems[index].data)) { snprintf(path, sizeof(path), "%s\\%s", filebrowser_get_current_dir(browser), strbuffer); - rarch_console_load_game_wrap(path, S_DELAY_45); + rarch_console_load_game_wrap(path, g_console.zip_extract_mode, S_DELAY_45); } else if(browser->current_dir.list->elems[index].attr.b) { diff --git a/console/rarch_console_rom_ext.c b/console/rarch_console_rom_ext.c index 12ec9aa839..b16b0fdfa1 100644 --- a/console/rarch_console_rom_ext.c +++ b/console/rarch_console_rom_ext.c @@ -38,7 +38,7 @@ static void rarch_console_load_game(const char *path) rarch_settings_change(S_START_RARCH); } -void rarch_console_load_game_wrap(const char *path, unsigned delay) +void rarch_console_load_game_wrap(const char *path, unsigned extract_zip_mode, unsigned delay) { const char *game_to_load; #ifdef HAVE_ZLIB @@ -65,7 +65,12 @@ void rarch_console_load_game_wrap(const char *path, unsigned delay) if(extract_zip_cond) { rarch_extract_directory(dir_path_temp, rom_path_temp, sizeof(dir_path_temp)); - rarch_extract_zipfile(rom_path_temp, dir_path_temp, first_file, sizeof(first_file)); + rarch_extract_zipfile(rom_path_temp, dir_path_temp, first_file, sizeof(first_file), extract_zip_mode); + +#ifndef GEKKO + if(g_console.info_msg_enable) +#endif + rarch_settings_msg(S_MSG_EXTRACTED_ZIPFILE, S_DELAY_180); } #endif @@ -90,7 +95,7 @@ void rarch_console_load_game_wrap(const char *path, unsigned delay) rarch_console_load_game(game_to_load); #ifndef GEKKO - if (g_console.info_msg_enable) + if(g_console.info_msg_enable) #endif rarch_settings_msg(S_MSG_LOADING_ROM, delay); } diff --git a/console/rarch_console_rom_ext.h b/console/rarch_console_rom_ext.h index b0e3fe7721..f374185630 100644 --- a/console/rarch_console_rom_ext.h +++ b/console/rarch_console_rom_ext.h @@ -17,7 +17,7 @@ #ifndef RARCH_ROM_EXT_H__ #define RARCH_ROM_EXT_H__ -void rarch_console_load_game_wrap(const char *path, unsigned delay); +void rarch_console_load_game_wrap(const char *path, unsigned extract_zip_mode, unsigned delay); // Get rom extensions for current library. // Returns NULL if library doesn't have any preferences in particular. diff --git a/console/rarch_console_rzlib.c b/console/rarch_console_rzlib.c index c0af8236e2..7965b97a7f 100644 --- a/console/rarch_console_rzlib.c +++ b/console/rarch_console_rzlib.c @@ -26,7 +26,7 @@ #include "rarch_console_rzlib.h" -static int rarch_extract_currentfile_in_zip(unzFile uf, const char *current_dir, char *slash, char *write_filename, size_t write_filename_size) +static int rarch_extract_currentfile_in_zip(unzFile uf, const char *current_dir, char *slash, char *write_filename, size_t write_filename_size, unsigned extract_zip_mode) { char filename_inzip[PATH_MAX]; FILE *file_out = NULL; @@ -50,7 +50,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf, const char *current_dir, return UNZ_INTERNALERROR; } - switch(g_console.zip_extract_mode) + switch(extract_zip_mode) { case ZIP_EXTRACT_TO_CURRENT_DIR: case ZIP_EXTRACT_TO_CURRENT_DIR_AND_LOAD_FIRST_FILE: @@ -116,7 +116,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf, const char *current_dir, return err; } -int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *first_file, size_t first_file_size) +int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *first_file, size_t first_file_size, unsigned extract_zip_mode) { bool found_first_file = false; (void)found_first_file; @@ -136,7 +136,7 @@ int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *f #else snprintf(slash, sizeof(slash), "/"); #endif - if (rarch_extract_currentfile_in_zip(uf, current_dir, slash, write_filename, sizeof(write_filename)) != UNZ_OK) + if (rarch_extract_currentfile_in_zip(uf, current_dir, slash, write_filename, sizeof(write_filename), extract_zip_mode) != UNZ_OK) { RARCH_ERR("Failed to extract current file from ZIP archive.\n"); break; @@ -165,8 +165,5 @@ int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *f } } - if(g_console.info_msg_enable) - rarch_settings_msg(S_MSG_EXTRACTED_ZIPFILE, S_DELAY_180); - return 0; } diff --git a/console/rarch_console_rzlib.h b/console/rarch_console_rzlib.h index 74ab32d866..b1cce5ce31 100644 --- a/console/rarch_console_rzlib.h +++ b/console/rarch_console_rzlib.h @@ -28,6 +28,6 @@ enum ZIP_EXTRACT_TO_CACHE_DIR }; -int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *first_file, size_t first_file_size); +int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *first_file, size_t first_file_size, unsigned extract_zip_mode); #endif diff --git a/ps3/frontend/menu.c b/ps3/frontend/menu.c index 5ac8e0d161..88df2cf6bb 100644 --- a/ps3/frontend/menu.c +++ b/ps3/frontend/menu.c @@ -1710,7 +1710,7 @@ static void menu_romselect_iterate(filebrowser_t *filebrowser, menu_romselect_ac filebrowser_iterate(filebrowser, FILEBROWSER_ACTION_OK); } else - rarch_console_load_game_wrap(filebrowser_get_current_path(filebrowser), S_DELAY_45); + rarch_console_load_game_wrap(filebrowser_get_current_path(filebrowser), g_console.zip_extract_mode, S_DELAY_45); break; case MENU_ROMSELECT_ACTION_GOTO_SETTINGS: menu_stack_increment(); diff --git a/wii/frontend/rgui.c b/wii/frontend/rgui.c index ae04309dba..7da92b9f48 100644 --- a/wii/frontend/rgui.c +++ b/wii/frontend/rgui.c @@ -633,7 +633,7 @@ const char *rgui_iterate(rgui_handle_t *rgui, rgui_action_t action) else { snprintf(rgui->path_buf, sizeof(rgui->path_buf), "%s/%s", dir, path); - rarch_console_load_game_wrap(rgui->path_buf, S_DELAY_1); + rarch_console_load_game_wrap(rgui->path_buf, g_console.zip_extract_mode, S_DELAY_1); found = true; } break;