From 4784371a906e833895af676fef6b0efebdb8aa7c Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Thu, 17 Sep 2015 22:05:14 +0200 Subject: [PATCH] Revert "[WIP] don't create default folders if other folders are set already" --- configuration.h | 4 ++-- frontend/frontend.c | 23 +++++++++-------------- frontend/frontend.h | 4 ++-- retroarch.c | 14 +++++++------- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/configuration.h b/configuration.h index 2960c6c666..895d9a7f3b 100644 --- a/configuration.h +++ b/configuration.h @@ -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; diff --git a/frontend/frontend.c b/frontend/frontend.c index 5610280430..036459e54a 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -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(); diff --git a/frontend/frontend.h b/frontend/frontend.h index 9344730056..ce97054a87 100644 --- a/frontend/frontend.h +++ b/frontend/frontend.h @@ -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. diff --git a/retroarch.c b/retroarch.c index 0bcbd0fca7..86d5a077ec 100644 --- a/retroarch.c +++ b/retroarch.c @@ -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. **/