mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
(frontend_salamander.c) Cleanup
This commit is contained in:
parent
190c417350
commit
35c2c11a91
@ -59,8 +59,8 @@ static void find_first_libretro_core(char *first_file,
|
||||
|
||||
for (i = 0; i < list->size && !ret; i++)
|
||||
{
|
||||
char fname[PATH_MAX_LENGTH];
|
||||
char salamander_name[PATH_MAX_LENGTH];
|
||||
char fname[PATH_MAX_LENGTH] = {0};
|
||||
char salamander_name[PATH_MAX_LENGTH] = {0};
|
||||
const char *libretro_elem = (const char*)list->elems[i].data;
|
||||
|
||||
RARCH_LOG("Checking library: \"%s\".\n", libretro_elem);
|
||||
@ -94,12 +94,12 @@ static void find_first_libretro_core(char *first_file,
|
||||
dir_list_free(list);
|
||||
}
|
||||
|
||||
/* Last fallback - we'll need to start the first executable file
|
||||
* we can find in the RetroArch cores directory.
|
||||
*/
|
||||
static void find_and_set_first_file(char *s, size_t len,
|
||||
const char *ext)
|
||||
{
|
||||
/* Last fallback - we'll need to start the first executable file
|
||||
* we can find in the RetroArch cores directory.
|
||||
*/
|
||||
|
||||
char first_file[PATH_MAX_LENGTH] = {0};
|
||||
find_first_libretro_core(first_file, sizeof(first_file),
|
||||
@ -122,8 +122,9 @@ static void salamander_init(char *s, size_t len)
|
||||
|
||||
if (config_exists)
|
||||
{
|
||||
char tmp_str[PATH_MAX_LENGTH];
|
||||
config_file_t * conf = (config_file_t*)config_file_new(g_defaults.path.config);
|
||||
char tmp_str[PATH_MAX_LENGTH] = {0};
|
||||
config_file_t * conf = (config_file_t*)
|
||||
config_file_new(g_defaults.path.config);
|
||||
|
||||
if (conf)
|
||||
{
|
||||
@ -145,7 +146,7 @@ static void salamander_init(char *s, size_t len)
|
||||
|
||||
if (!config_exists || string_is_equal(s, ""))
|
||||
{
|
||||
char executable_name[PATH_MAX_LENGTH];
|
||||
char executable_name[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
frontend_driver_get_core_extension(
|
||||
executable_name, sizeof(executable_name));
|
||||
@ -169,12 +170,10 @@ static void salamander_init(char *s, size_t len)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char libretro_path[PATH_MAX_LENGTH];
|
||||
char libretro_path[PATH_MAX_LENGTH] = {0};
|
||||
void *args = NULL;
|
||||
struct rarch_main_wrap *wrap_args = NULL;
|
||||
frontend_ctx_driver_t *frontend_ctx = NULL;
|
||||
|
||||
frontend_ctx = (frontend_ctx_driver_t*)frontend_ctx_init_first();
|
||||
frontend_ctx_driver_t *frontend_ctx = (frontend_ctx_driver_t*)frontend_ctx_init_first();
|
||||
|
||||
if (!frontend_ctx)
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user