Revert "[WIP] don't create default folders if other folders are set already"

This commit is contained in:
Twinaphex 2015-09-17 22:05:14 +02:00
parent 2f1e3e4cf3
commit 4784371a90
4 changed files with 20 additions and 25 deletions

View File

@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2015 - Daniel De Matteis
*
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
@ -244,7 +244,7 @@ typedef struct settings
bool input_descriptor_hide_unbound;
char remapping_path[PATH_MAX_LENGTH];
unsigned menu_toggle_gamepad_combo;
bool back_as_menu_toggle_enable;
} input;

View File

@ -49,7 +49,7 @@ void main_exit_save_config(void)
sizeof(global->dir.savestate));
/* Save last core-specific config to the default config location,
* needed on consoles for core switching and reusing last good
* needed on consoles for core switching and reusing last good
* config for new cores.
*/
config_save_file(global->path.config);
@ -125,15 +125,10 @@ void main_exit(void *args)
static void check_defaults_dirs(void)
{
settings_t *settings = NULL;
settings = config_get_ptr();
if(settings->core_assets_directory[0] == '\0')
if (*g_defaults.dir.core_assets)
path_mkdir(g_defaults.dir.core_assets);
if(settings->input_remapping_directory[0] == '\0')
if (*g_defaults.dir.remap)
path_mkdir(g_defaults.dir.remap);
if (*g_defaults.dir.core_assets)
path_mkdir(g_defaults.dir.core_assets);
if (*g_defaults.dir.remap)
path_mkdir(g_defaults.dir.remap);
if (*g_defaults.dir.autoconfig)
path_mkdir(g_defaults.dir.autoconfig);
if (*g_defaults.dir.audio_filter)
@ -246,6 +241,8 @@ bool main_load_content(int argc, char **argv, void *args,
if (environ_get)
environ_get(rarch_argc_ptr, rarch_argv_ptr, args, wrap_args);
check_defaults_dirs();
if (wrap_args->touched)
{
rarch_main_init_wrap(wrap_args, &rarch_argc, rarch_argv);
@ -265,8 +262,6 @@ bool main_load_content(int argc, char **argv, void *args,
event_command(EVENT_CMD_RESUME);
check_defaults_dirs();
if (process_args)
process_args(rarch_argc_ptr, rarch_argv_ptr);
@ -283,7 +278,7 @@ error:
* Main function of RetroArch.
*
* If HAVE_MAIN is not defined, will contain main loop and will not
* be exited from until we exit the program. Otherwise, will
* be exited from until we exit the program. Otherwise, will
* just do initialization.
*
* Returns: varies per platform.
@ -348,7 +343,7 @@ int rarch_main(int argc, char *argv[], void *data)
do{
unsigned sleep_ms = 0;
ret = rarch_main_iterate(&sleep_ms);
if (ret == 1 && sleep_ms > 0)
rarch_sleep(sleep_ms);
rarch_main_data_iterate();

View File

@ -36,7 +36,7 @@ extern "C" {
* and (optionally) autosave state.
**/
void main_exit(void *args);
/**
* main_exit_save_config:
*
@ -51,7 +51,7 @@ void main_exit_save_config(void);
* Main function of RetroArch.
*
* If HAVE_MAIN is not defined, will contain main loop and will not
* be exited from until we exit the program. Otherwise, will
* be exited from until we exit the program. Otherwise, will
* just do initialization.
*
* Returns: varies per platform.

View File

@ -777,7 +777,7 @@ static void parse_input(int argc, char *argv[])
FreeConsole();
#endif
break;
case RA_OPT_MENU:
global->inited.core.type = CORE_TYPE_DUMMY;
break;
@ -1064,7 +1064,7 @@ void rarch_main_alloc(void)
/**
* rarch_main_new:
*
* Will teardown drivers and clears all
* Will teardown drivers and clears all
* internal state of the program.
* If @inited is true, will initialize all
* drivers again after teardown.
@ -1089,7 +1089,7 @@ void rarch_main_free(void)
config_free();
}
/*
/*
* rarch_verify_api_version:
*
* Compare libretro core API version against API version
@ -1117,7 +1117,7 @@ void rarch_verify_api_version(void)
* Validates CPU features for given processor architecture.
*
* Make sure we haven't compiled for something we cannot run.
* Ideally, code would get swapped out depending on CPU support,
* Ideally, code would get swapped out depending on CPU support,
* but this will do for now.
*/
static void validate_cpu_features(void)
@ -1147,7 +1147,7 @@ static void validate_cpu_features(void)
**/
void rarch_init_system_av_info(void)
{
struct retro_system_av_info *av_info =
struct retro_system_av_info *av_info =
video_viewport_get_system_av_info();
pretro_get_system_av_info(av_info);
@ -1157,7 +1157,7 @@ void rarch_init_system_av_info(void)
/**
* rarch_main_init:
* @argc : Count of (commandline) arguments.
* @argv : (Commandline) arguments.
* @argv : (Commandline) arguments.
*
* Initializes the program.
*
@ -1530,7 +1530,7 @@ void rarch_playlist_load_content(void *data, unsigned idx)
*
* Gets deferred core.
*
* Returns: 0 if there are multiple deferred cores and a
* Returns: 0 if there are multiple deferred cores and a
* selection needs to be made from a list, otherwise
* returns -1 and fills in @s with path to core.
**/