mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-11 12:35:08 +00:00
Cleanups
This commit is contained in:
parent
f83dfb0621
commit
2f133a6835
@ -120,7 +120,7 @@ static void gx_devthread(void *a)
|
||||
{
|
||||
if (!gx_devices[i].interface->isInserted())
|
||||
{
|
||||
char n[8];
|
||||
char n[8] = {0};
|
||||
|
||||
gx_devices[i].mounted = false;
|
||||
snprintf(n, sizeof(n), "%s:", gx_devices[i].name);
|
||||
@ -166,6 +166,8 @@ static void frontend_gx_get_environment_settings(
|
||||
int *argc, char *argv[],
|
||||
void *args, void *params_data)
|
||||
{
|
||||
char *last_slash = NULL;
|
||||
char *device_end = NULL;
|
||||
#ifndef IS_SALAMANDER
|
||||
#if defined(HAVE_LOGGER)
|
||||
logger_init();
|
||||
@ -196,10 +198,11 @@ static void frontend_gx_get_environment_settings(
|
||||
chdir("carda:/retroarch");
|
||||
#endif
|
||||
getcwd(g_defaults.dir.core, MAXPATHLEN);
|
||||
char *last_slash = strrchr(g_defaults.dir.core, '/');
|
||||
|
||||
last_slash = strrchr(g_defaults.dir.core, '/');
|
||||
if (last_slash)
|
||||
*last_slash = 0;
|
||||
char *device_end = strchr(g_defaults.dir.core, '/');
|
||||
device_end = strchr(g_defaults.dir.core, '/');
|
||||
if (device_end)
|
||||
snprintf(g_defaults.dir.port, sizeof(g_defaults.dir.port),
|
||||
"%.*s/retroarch", device_end - g_defaults.dir.core,
|
||||
@ -232,9 +235,10 @@ static void frontend_gx_get_environment_settings(
|
||||
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
||||
{
|
||||
static char path[PATH_MAX_LENGTH];
|
||||
*path = '\0';
|
||||
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
||||
|
||||
*path = '\0';
|
||||
|
||||
if (args)
|
||||
{
|
||||
fill_pathname_join(path, argv[1], argv[2], sizeof(path));
|
||||
@ -395,8 +399,8 @@ static void frontend_gx_exitspawn(char *s, size_t len)
|
||||
static void frontend_gx_process_args(int *argc, char *argv[])
|
||||
{
|
||||
#ifndef IS_SALAMANDER
|
||||
char path[PATH_MAX_LENGTH];
|
||||
settings_t *settings = config_get_ptr();
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* A big hack: sometimes Salamander doesn't save the new core
|
||||
* it loads on first boot, so we make sure
|
||||
|
@ -47,11 +47,11 @@ char gx_rom_path[PATH_MAX_LENGTH];
|
||||
|
||||
static void dol_copy_argv_path(const char *dolpath, const char *argpath)
|
||||
{
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
size_t t_len;
|
||||
struct __argv *argv = (struct __argv *)ARGS_ADDR;
|
||||
char *cmdline = NULL;
|
||||
size_t len = 0;
|
||||
char tmp[PATH_MAX_LENGTH] = {0};
|
||||
struct __argv *argv = (struct __argv *)ARGS_ADDR;
|
||||
char *cmdline = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
memset(ARGS_ADDR, 0, sizeof(struct __argv));
|
||||
|
||||
@ -117,11 +117,11 @@ void system_exec_wii(const char *_path, bool should_load_game)
|
||||
{
|
||||
FILE *fp;
|
||||
size_t size, booter_size;
|
||||
void *dol;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char game_path[PATH_MAX_LENGTH];
|
||||
void *dol = NULL;
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
char game_path[PATH_MAX_LENGTH] = {0};
|
||||
#ifndef IS_SALAMANDER
|
||||
bool original_verbose = verbosity_is_enabled();
|
||||
bool original_verbose = verbosity_is_enabled();
|
||||
#endif
|
||||
|
||||
/* copy heap info into stack so it survives
|
||||
|
@ -219,9 +219,9 @@ enum frontend_architecture frontend_win32_get_architecture(void)
|
||||
static int frontend_win32_parse_drive_list(void *data)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
size_t i = 0;
|
||||
unsigned drives = GetLogicalDrives();
|
||||
char drive[] = " :\\";
|
||||
size_t i = 0;
|
||||
unsigned drives = GetLogicalDrives();
|
||||
char drive[] = " :\\";
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user