mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +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)
|
void rarch_console_load_game_wrap(const char *path, unsigned delay)
|
||||||
{
|
{
|
||||||
const char *game_to_load;
|
const char *game_to_load;
|
||||||
|
#ifdef HAVE_ZLIB
|
||||||
char first_file[PATH_MAX];
|
char first_file[PATH_MAX];
|
||||||
|
#endif
|
||||||
char rom_path_temp[PATH_MAX];
|
char rom_path_temp[PATH_MAX];
|
||||||
char dir_path_temp[PATH_MAX];
|
char dir_path_temp[PATH_MAX];
|
||||||
struct retro_system_info info;
|
struct retro_system_info info;
|
||||||
@ -55,13 +57,8 @@ void rarch_console_load_game_wrap(const char *path, unsigned delay)
|
|||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
bool extract_zip_cond = (strstr(rom_path_temp, ".zip") || strstr(rom_path_temp, ".ZIP"))
|
bool extract_zip_cond = (strstr(rom_path_temp, ".zip") || strstr(rom_path_temp, ".ZIP"))
|
||||||
&& !block_zip_extract;
|
&& !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
|
#else
|
||||||
bool extract_zip_cond = false;
|
bool extract_zip_cond = false;
|
||||||
bool extract_zip_and_load_game_cond = false;
|
|
||||||
bool load_game = !extract_zip_cond;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
@ -72,6 +69,15 @@ void rarch_console_load_game_wrap(const char *path, unsigned delay)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef HAVE_ZLIB
|
||||||
if(extract_zip_and_load_game_cond)
|
if(extract_zip_and_load_game_cond)
|
||||||
game_to_load = first_file;
|
game_to_load = first_file;
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../boolean.h"
|
#include "../boolean.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
||||||
|
#include "libretro_mgmt.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "retroarch_rzlib.h"
|
#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)
|
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)
|
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;
|
bool found_first_file = false;
|
||||||
|
(void)found_first_file;
|
||||||
unzFile uf = unzOpen(zip_path);
|
unzFile uf = unzOpen(zip_path);
|
||||||
|
|
||||||
unz_global_info gi;
|
unz_global_info gi;
|
||||||
@ -138,6 +143,7 @@ int rarch_extract_zipfile(const char *zip_path, const char *current_dir, char *f
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
||||||
if(!found_first_file)
|
if(!found_first_file)
|
||||||
{
|
{
|
||||||
found_first_file = rarch_manage_libretro_extension_supported(write_filename);
|
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)
|
if(found_first_file)
|
||||||
snprintf(first_file, first_file_size, write_filename);
|
snprintf(first_file, first_file_size, write_filename);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((i + 1) < gi.number_entry)
|
if ((i + 1) < gi.number_entry)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user