mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
(Wii) get rid of warnings
This commit is contained in:
parent
ba05aa9f8b
commit
6a28a741df
@ -41,7 +41,9 @@ static void rarch_console_load_game(const char *path)
|
||||
void rarch_console_load_game_wrap(const char *path, unsigned delay)
|
||||
{
|
||||
const char *game_to_load;
|
||||
#ifdef HAVE_ZLIB
|
||||
char first_file[PATH_MAX];
|
||||
#endif
|
||||
char rom_path_temp[PATH_MAX];
|
||||
char dir_path_temp[PATH_MAX];
|
||||
struct retro_system_info info;
|
||||
@ -55,13 +57,8 @@ void rarch_console_load_game_wrap(const char *path, unsigned delay)
|
||||
#ifdef HAVE_ZLIB
|
||||
bool extract_zip_cond = (strstr(rom_path_temp, ".zip") || strstr(rom_path_temp, ".ZIP"))
|
||||
&& !block_zip_extract;
|
||||
bool extract_zip_and_load_game_cond = (extract_zip_cond &&
|
||||
g_console.zip_extract_mode == ZIP_EXTRACT_TO_CURRENT_DIR_AND_LOAD_FIRST_FILE && first_file);
|
||||
bool load_game = (extract_zip_and_load_game_cond) || (!extract_zip_cond);
|
||||
#else
|
||||
bool extract_zip_cond = false;
|
||||
bool extract_zip_and_load_game_cond = false;
|
||||
bool load_game = !extract_zip_cond;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
@ -72,6 +69,15 @@ void rarch_console_load_game_wrap(const char *path, unsigned delay)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
bool extract_zip_and_load_game_cond = (extract_zip_cond &&
|
||||
g_console.zip_extract_mode == ZIP_EXTRACT_TO_CURRENT_DIR_AND_LOAD_FIRST_FILE);
|
||||
bool load_game = (extract_zip_and_load_game_cond) || (!extract_zip_cond);
|
||||
#else
|
||||
bool extract_zip_and_load_game_cond = false;
|
||||
bool load_game = !extract_zip_cond;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
if(extract_zip_and_load_game_cond)
|
||||
game_to_load = first_file;
|
||||
|
@ -20,6 +20,10 @@
|
||||
#include <string.h>
|
||||
#include "../boolean.h"
|
||||
|
||||
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
||||
#include "libretro_mgmt.h"
|
||||
#endif
|
||||
|
||||
#include "retroarch_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)
|
||||
@ -115,6 +119,7 @@ static int rarch_extract_currentfile_in_zip(unzFile uf, const char *current_dir,
|
||||
int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *first_file, size_t first_file_size)
|
||||
{
|
||||
bool found_first_file = false;
|
||||
(void)found_first_file;
|
||||
unzFile uf = unzOpen(zip_path);
|
||||
|
||||
unz_global_info gi;
|
||||
@ -138,6 +143,7 @@ int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *f
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
||||
if(!found_first_file)
|
||||
{
|
||||
found_first_file = rarch_manage_libretro_extension_supported(write_filename);
|
||||
@ -145,6 +151,7 @@ int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *f
|
||||
if(found_first_file)
|
||||
snprintf(first_file, first_file_size, write_filename);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((i + 1) < gi.number_entry)
|
||||
|
Loading…
Reference in New Issue
Block a user