From f5c7b1bf73beac9cfc96946d9a77277d901a7f4f Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Sun, 26 Apr 2020 08:55:48 +0300 Subject: [PATCH 01/10] Framerate -> Refresh Rate Based on the key and context, here should be `refresh rate` instead of `frame rate`. --- intl/msg_hash_us.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f76e2f800b..23b206d5a1 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1382,7 +1382,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, - "Estimated Screen Framerate" + "Estimated Screen Refresh Rate" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, From 49d0045434b80cf8bfef2a397a3fc8cac346a6c5 Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Sun, 26 Apr 2020 09:24:11 +0300 Subject: [PATCH 02/10] Force Aspect -> Force Aspect Ratio --- intl/msg_hash_us.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f76e2f800b..1a68464df8 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1491,7 +1491,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER, - "Only scales video in integer steps. The base size depends on system-reported geometry and aspect ratio. If 'Force Aspect' is not set, X/Y will be integer scaled independently." + "Only scales video in integer steps. The base size depends on system-reported geometry and aspect ratio. If 'Force Aspect Ratio' is not set, X/Y will be integer scaled independently." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, @@ -8866,7 +8866,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_ASPECT, - "Force aspect ratio" + "Force Aspect Ratio" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SELECT_FROM_PLAYLIST, From 004588d627e575103dd3b9acfbfda0800cd13577 Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Sun, 26 Apr 2020 09:30:49 +0300 Subject: [PATCH 03/10] Update msg_hash_us.h --- intl/msg_hash_us.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 1a68464df8..84d6b7b1d8 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1503,7 +1503,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, - "Floating point value for video aspect ratio (width / height), used if the Aspect Ratio is set to 'Config'." + "Floating point value for video aspect ratio (width / height), used if the Aspect Ratio is set to 'Config Aspect Ratio'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, From cc6a5a6077ceeec648cb6518f7c5dd493a899558 Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Sun, 26 Apr 2020 09:37:34 +0300 Subject: [PATCH 04/10] Update msg_hash_us.h --- intl/msg_hash_us.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 84d6b7b1d8..438945c32e 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1527,7 +1527,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH, - "Custom viewport width that is used if the Aspect Ratio is set to 'Custom'." + "Custom viewport width that is used if the Aspect Ratio is set to 'Custom Aspect Ratio'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_HEIGHT, @@ -1535,7 +1535,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT, - "Custom viewport height that is used if the Aspect Ratio is set to 'Custom'." + "Custom viewport height that is used if the Aspect Ratio is set to 'Custom Aspect Ratio'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, From 8d717144464aaf44f20c8aca0cb3aa99329e05a3 Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Sun, 26 Apr 2020 11:36:18 +0300 Subject: [PATCH 05/10] Update msg_hash_us.h --- intl/msg_hash_us.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 438945c32e..70fc1bb32e 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1499,11 +1499,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO, - "Config Aspect Ratio" + "Custom Aspect Ratio" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, - "Floating point value for video aspect ratio (width / height), used if the Aspect Ratio is set to 'Config Aspect Ratio'." + "Floating point value for video aspect ratio (width / height), used if the Aspect Ratio is set to 'Custom Aspect Ratio'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, From c40f2ae5bbcc46f898233cfca8616b5104479002 Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Sun, 26 Apr 2020 12:14:57 +0300 Subject: [PATCH 06/10] Unify mixer settings strings --- intl/msg_hash_us.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f76e2f800b..60f4bb3e3a 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1642,11 +1642,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS, - "Mixer Settings" + "Mixer" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS, - "View and/or modify audio mixer settings." + "Change audio mixer settings." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUNDS, From 0e4857c8f6f1ca6c1c6c2be1add498afb2ed96f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Wendling?= Date: Sun, 26 Apr 2020 14:13:59 +0200 Subject: [PATCH 07/10] Remove OpenBSD/macppc specific quirk OpenBSD/macppc moved to clang and __mftb() is not available anymore, leading to undefined references errors. It's fixed with #10383 already. --- libretro-common/features/features_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index 89359be509..e0ab09682e 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -43,7 +43,7 @@ #include #endif -#if defined(__CELLOS_LV2__) || ( defined(__OpenBSD__) && defined(__powerpc__) ) +#if defined(__CELLOS_LV2__) #ifndef _PPU_INTRINSICS_H #include #endif From 9eb84728050eb3ba371fd5af9c872ae1c577501b Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Mon, 27 Apr 2020 17:06:35 +0100 Subject: [PATCH 08/10] Only write config files to disk when parameters change --- configuration.c | 1 + core_info.c | 138 ++++++++++++--------- gfx/video_shader_parse.c | 4 + libretro-common/file/config_file.c | 105 +++++++++++++--- libretro-common/include/file/config_file.h | 1 + menu/drivers/materialui.c | 10 +- retroarch.c | 28 +++-- 7 files changed, 195 insertions(+), 92 deletions(-) diff --git a/configuration.c b/configuration.c index 1609259ca6..1216e85341 100644 --- a/configuration.c +++ b/configuration.c @@ -4248,6 +4248,7 @@ bool config_save_overrides(enum override_type type, void *data) free(override_directory); free(core_path); free(game_path); + free(content_path); return ret; } diff --git a/core_info.c b/core_info.c index dd1aded547..9d82943909 100644 --- a/core_info.c +++ b/core_info.c @@ -140,15 +140,17 @@ static void core_info_list_resolve_all_firmware( snprintf(desc_key, sizeof(desc_key), "firmware%u_desc", c); snprintf(opt_key, sizeof(opt_key), "firmware%u_opt", c); - if (config_get_string(config, path_key, &tmp) && !string_is_empty(tmp)) + if (config_get_string(config, path_key, &tmp)) { - info->firmware[c].path = strdup(tmp); + if (!string_is_empty(tmp)) + info->firmware[c].path = strdup(tmp); free(tmp); tmp = NULL; } - if (config_get_string(config, desc_key, &tmp) && !string_is_empty(tmp)) + if (config_get_string(config, desc_key, &tmp)) { - info->firmware[c].desc = strdup(tmp); + if (!string_is_empty(tmp)) + info->firmware[c].desc = strdup(tmp); free(tmp); tmp = NULL; } @@ -315,48 +317,48 @@ static core_info_list_t *core_info_list_new(const char *path, { char *tmp = NULL; - if (config_get_string(conf, "display_name", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "display_name", &tmp)) { - core_info[i].display_name = strdup(tmp); + if (!string_is_empty(tmp)) + core_info[i].display_name = strdup(tmp); free(tmp); tmp = NULL; } - if (config_get_string(conf, "display_version", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "display_version", &tmp)) { - core_info[i].display_version = strdup(tmp); + if (!string_is_empty(tmp)) + core_info[i].display_version = strdup(tmp); free(tmp); tmp = NULL; } - if (config_get_string(conf, "corename", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "corename", &tmp)) { - core_info[i].core_name = strdup(tmp); + if (!string_is_empty(tmp)) + core_info[i].core_name = strdup(tmp); free(tmp); tmp = NULL; } - if (config_get_string(conf, "systemname", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "systemname", &tmp)) { - core_info[i].systemname = strdup(tmp); + if (!string_is_empty(tmp)) + core_info[i].systemname = strdup(tmp); free(tmp); tmp = NULL; } - if (config_get_string(conf, "systemid", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "systemid", &tmp)) { - core_info[i].system_id = strdup(tmp); + if (!string_is_empty(tmp)) + core_info[i].system_id = strdup(tmp); free(tmp); tmp = NULL; } - if (config_get_string(conf, "manufacturer", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "manufacturer", &tmp)) { - core_info[i].system_manufacturer = strdup(tmp); + if (!string_is_empty(tmp)) + core_info[i].system_manufacturer = strdup(tmp); free(tmp); tmp = NULL; } @@ -367,87 +369,103 @@ static core_info_list_t *core_info_list_new(const char *path, core_info[i].firmware_count = count; } - if (config_get_string(conf, "supported_extensions", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "supported_extensions", &tmp)) { - core_info[i].supported_extensions = strdup(tmp); - core_info[i].supported_extensions_list = - string_split(core_info[i].supported_extensions, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].supported_extensions = strdup(tmp); + core_info[i].supported_extensions_list = + string_split(core_info[i].supported_extensions, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "authors", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "authors", &tmp)) { - core_info[i].authors = strdup(tmp); - core_info[i].authors_list = - string_split(core_info[i].authors, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].authors = strdup(tmp); + core_info[i].authors_list = + string_split(core_info[i].authors, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "permissions", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "permissions", &tmp)) { - core_info[i].permissions = strdup(tmp); - core_info[i].permissions_list = - string_split(core_info[i].permissions, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].permissions = strdup(tmp); + core_info[i].permissions_list = + string_split(core_info[i].permissions, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "license", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "license", &tmp)) { - core_info[i].licenses = strdup(tmp); - core_info[i].licenses_list = - string_split(core_info[i].licenses, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].licenses = strdup(tmp); + core_info[i].licenses_list = + string_split(core_info[i].licenses, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "categories", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "categories", &tmp)) { - core_info[i].categories = strdup(tmp); - core_info[i].categories_list = - string_split(core_info[i].categories, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].categories = strdup(tmp); + core_info[i].categories_list = + string_split(core_info[i].categories, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "database", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "database", &tmp)) { - core_info[i].databases = strdup(tmp); - core_info[i].databases_list = - string_split(core_info[i].databases, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].databases = strdup(tmp); + core_info[i].databases_list = + string_split(core_info[i].databases, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "notes", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "notes", &tmp)) { - core_info[i].notes = strdup(tmp); - core_info[i].note_list = string_split(core_info[i].notes, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].notes = strdup(tmp); + core_info[i].note_list = string_split(core_info[i].notes, "|"); + } free(tmp); tmp = NULL; } - if (config_get_string(conf, "required_hw_api", &tmp) - && !string_is_empty(tmp)) + if (config_get_string(conf, "required_hw_api", &tmp)) { - core_info[i].required_hw_api = strdup(tmp); - core_info[i].required_hw_api_list = string_split(core_info[i].required_hw_api, "|"); + if (!string_is_empty(tmp)) + { + core_info[i].required_hw_api = strdup(tmp); + core_info[i].required_hw_api_list = string_split(core_info[i].required_hw_api, "|"); + } free(tmp); tmp = NULL; diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index 51d98bcaa7..07f5591c05 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -643,6 +643,10 @@ bool video_shader_write_preset(const char *path, config_file_t *conf; bool ret; + /* Note: We always create a new/blank config + * file here. Loading and updating an existing + * file could leave us with unwanted/invalid + * parameters. */ if (!(conf = config_file_new_alloc())) return false; diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index 5d13f15cc5..a1b7de00a6 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -74,7 +74,17 @@ static config_file_t *config_file_new_internal( static int config_sort_compare_func(struct config_entry_list *a, struct config_entry_list *b) { - return (a && b) ? strcasecmp(a->key, b->key) : 0; + if (a && b) + { + if (a->key && b->key) + return strcasecmp(a->key, b->key); + else if (a->key) + return 1; + else if (b->key) + return -1; + } + + return 0; } /* https://stackoverflow.com/questions/7685/merge-sort-a-linked-list */ @@ -206,12 +216,19 @@ static char *extract_value(char *line, bool is_value) while (isspace((int)*line)) line++; + /* Note: From this point on, an empty value + * string is valid - and in this case, strdup("") + * will be returned + * > If we instead return NULL, the the entry + * is ignored completely - which means we cannot + * track *changes* in entry value */ + /* We have a full string. Read until next ". */ if (*line == '"') { line++; if (*line == '"') - return NULL; + return strdup(""); tok = strtok_r(line, "\"", &save); } /* We don't have that. Read until next space. */ @@ -220,7 +237,7 @@ static char *extract_value(char *line, bool is_value) if (tok && *tok) return strdup(tok); - return NULL; + return strdup(""); } /* Move semantics? */ @@ -342,7 +359,7 @@ static bool parse_line(config_file_t *conf, char *include_line = comment + STRLEN_CONST("include "); char *path = extract_value(include_line, false); - if (!path) + if (string_is_empty(path)) return false; if (conf->include_depth >= MAX_INCLUDE_DEPTH) @@ -548,7 +565,8 @@ config_file_t *config_file_new_from_string(const char *from_string, conf->last = NULL; conf->includes = NULL; conf->include_depth = 0; - conf->guaranteed_no_duplicates = false ; + conf->guaranteed_no_duplicates = false; + conf->modified = false; if (!string_is_empty(path)) conf->path = strdup(path); @@ -640,7 +658,8 @@ config_file_t *config_file_new_alloc(void) conf->last = NULL; conf->includes = NULL; conf->include_depth = 0; - conf->guaranteed_no_duplicates = false ; + conf->guaranteed_no_duplicates = false; + conf->modified = false; return conf; } @@ -804,7 +823,7 @@ bool config_get_string(config_file_t *conf, const char *key, char **str) { const struct config_entry_list *entry = config_get_entry(conf, key, NULL); - if (!entry) + if (!entry || !entry->value) return false; *str = strdup(entry->value); @@ -869,20 +888,44 @@ bool config_get_bool(config_file_t *conf, const char *key, bool *in) void config_set_string(config_file_t *conf, const char *key, const char *val) { - struct config_entry_list *last = (conf->guaranteed_no_duplicates && conf->last) ? conf->last : conf->entries; - struct config_entry_list *entry = conf->guaranteed_no_duplicates?NULL:config_get_entry(conf, key, &last); + struct config_entry_list *last = NULL; + struct config_entry_list *entry = NULL; - if (entry && !entry->readonly) + if (!conf || !key || !val) + return; + + last = (conf->guaranteed_no_duplicates && conf->last) ? + conf->last : conf->entries; + entry = conf->guaranteed_no_duplicates ? + NULL : config_get_entry(conf, key, &last); + + if (entry) { + /* An entry corresponding to 'key' already exists + * > Check if it's read only */ + if (entry->readonly) + return; + + /* Check whether value is currently set */ if (entry->value) + { + /* Do nothing if value is unchanged */ + if (string_is_equal(entry->value, val)) + return; + + /* Value is to be updated + * > Free existing */ free(entry->value); - entry->value = strdup(val); + } + + /* Update value */ + entry->value = strdup(val); + conf->modified = true; return; } - if (!val) - return; - + /* Entry corresponding to 'key' does not exist + * > Create new entry */ entry = (struct config_entry_list*)malloc(sizeof(*entry)); if (!entry) return; @@ -891,6 +934,7 @@ void config_set_string(config_file_t *conf, const char *key, const char *val) entry->key = strdup(key); entry->value = strdup(val); entry->next = NULL; + conf->modified = true; if (last) last->next = entry; @@ -902,16 +946,27 @@ void config_set_string(config_file_t *conf, const char *key, const char *val) void config_unset(config_file_t *conf, const char *key) { - struct config_entry_list *last = conf->entries; - struct config_entry_list *entry = config_get_entry(conf, key, &last); + struct config_entry_list *last = NULL; + struct config_entry_list *entry = NULL; + + if (!conf || !key) + return; + + last = conf->entries; + entry = config_get_entry(conf, key, &last); if (!entry) return; - entry->key = NULL; - entry->value = NULL; - free(entry->key); - free(entry->value); + if (entry->key) + free(entry->key); + + if (entry->value) + free(entry->value); + + entry->key = NULL; + entry->value = NULL; + conf->modified = true; } void config_set_path(config_file_t *conf, const char *entry, const char *val) @@ -1003,6 +1058,12 @@ void config_set_bool(config_file_t *conf, const char *key, bool val) bool config_file_write(config_file_t *conf, const char *path, bool sort) { + if (!conf) + return false; + + if (!conf->modified) + return true; + if (!string_is_empty(path)) { #ifdef ORBIS @@ -1030,6 +1091,10 @@ bool config_file_write(config_file_t *conf, const char *path, bool sort) if (buf) free(buf); #endif + + /* Only update modified flag if config file + * is actually written to disk */ + conf->modified = false; } else config_file_dump(conf, stdout, sort); diff --git a/libretro-common/include/file/config_file.h b/libretro-common/include/file/config_file.h index e340452821..7d7a408fe6 100644 --- a/libretro-common/include/file/config_file.h +++ b/libretro-common/include/file/config_file.h @@ -59,6 +59,7 @@ struct config_file struct config_entry_list *last; unsigned include_depth; bool guaranteed_no_duplicates; + bool modified; struct config_include_list *includes; }; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index e01038a191..39b1999711 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -7669,8 +7669,14 @@ static int materialui_pointer_up(void *userdata, menu_navigation_set_selection(ptr); /* Perform a MENU_ACTION_SELECT on currently - * active item */ - return materialui_menu_entry_action(mui, entry, (size_t)ptr, MENU_ACTION_SELECT); + * active item + * > Note that we still use 'selection' + * (i.e. old selection value) here. This + * ensures that materialui_menu_entry_action() + * registers any change due to the above automatic + * 'pointer item' activation, and thus operates + * on the correct target entry */ + return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_SELECT); } else { diff --git a/retroarch.c b/retroarch.c index 48cd313927..2aa345015a 100644 --- a/retroarch.c +++ b/retroarch.c @@ -10592,8 +10592,7 @@ error: **/ static void core_option_manager_flush( config_file_t *conf, - core_option_manager_t *opt, - const char *path) + core_option_manager_t *opt) { size_t i; @@ -28649,21 +28648,30 @@ static void retroarch_deinit_core_options(void) if (!runloop_core_options) return; - /* check if game options file was just created and flush - to that file instead */ + /* Check whether game-specific options file is being used */ if (!path_is_empty(RARCH_PATH_CORE_OPTIONS)) { + const char *path = path_get(RARCH_PATH_CORE_OPTIONS); + config_file_t *conf_tmp = NULL; + /* We only need to save configuration settings for - * the current core, so create a temporary config_file - * object and populate the required values. */ - config_file_t *conf_tmp = config_file_new_alloc(); + * the current core + * > If game-specific options file exists, have + * to read it (to ensure file only gets written + * if config values change) + * > Otherwise, create a new, empty config_file_t + * object */ + if (path_is_valid(path)) + conf_tmp = config_file_new_from_path_to_string(path); + + if (!conf_tmp) + conf_tmp = config_file_new_alloc(); if (conf_tmp) { - const char *path = path_get(RARCH_PATH_CORE_OPTIONS); core_option_manager_flush( conf_tmp, - runloop_core_options, path); + runloop_core_options); RARCH_LOG("[Core Options]: Saved game-specific core options to \"%s\"\n", path); config_file_write(conf_tmp, path, true); config_file_free(conf_tmp); @@ -28676,7 +28684,7 @@ static void retroarch_deinit_core_options(void) const char *path = runloop_core_options->conf_path; core_option_manager_flush( runloop_core_options->conf, - runloop_core_options, path); + runloop_core_options); RARCH_LOG("[Core Options]: Saved core options file to \"%s\"\n", path); config_file_write(runloop_core_options->conf, path, true); } From d87fa1799ef1589b04cd33d060061ca3955db408 Mon Sep 17 00:00:00 2001 From: Barry Rowe Date: Mon, 27 Apr 2020 10:16:11 -0700 Subject: [PATCH 09/10] Added small fix to set_gamepad_input_override bit logic. --- retroarch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroarch.c b/retroarch.c index 48cd313927..49f28c8fbc 100644 --- a/retroarch.c +++ b/retroarch.c @@ -31152,7 +31152,7 @@ void set_gamepad_input_override(unsigned i, bool val) if (val) gamepad_input_override = gamepad_input_override | (1< Date: Mon, 27 Apr 2020 23:05:30 +0200 Subject: [PATCH 10/10] Bump version number --- pkg/android/phoenix-legacy/AndroidManifest.xml | 4 ++-- pkg/android/phoenix/AndroidManifest.xml | 4 ++-- pkg/apple/OSX/Info.plist | 4 ++-- pkg/apple/OSX/Info_Metal.plist | 4 ++-- pkg/apple/RetroArch_iOS9-Info.plist | 4 ++-- version.all | 4 ++-- version.dtd | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/android/phoenix-legacy/AndroidManifest.xml b/pkg/android/phoenix-legacy/AndroidManifest.xml index 47cd8467c5..6276ae5499 100644 --- a/pkg/android/phoenix-legacy/AndroidManifest.xml +++ b/pkg/android/phoenix-legacy/AndroidManifest.xml @@ -1,8 +1,8 @@ diff --git a/pkg/android/phoenix/AndroidManifest.xml b/pkg/android/phoenix/AndroidManifest.xml index 7281dbf40a..9a89473b94 100644 --- a/pkg/android/phoenix/AndroidManifest.xml +++ b/pkg/android/phoenix/AndroidManifest.xml @@ -2,8 +2,8 @@ diff --git a/pkg/apple/OSX/Info.plist b/pkg/apple/OSX/Info.plist index 915438e985..847449029d 100644 --- a/pkg/apple/OSX/Info.plist +++ b/pkg/apple/OSX/Info.plist @@ -30,11 +30,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.8.5 + 1.8.6 CFBundleSignature ???? CFBundleVersion - 1.8.5 + 1.8.6 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHighResolutionCapable diff --git a/pkg/apple/OSX/Info_Metal.plist b/pkg/apple/OSX/Info_Metal.plist index bed2150f1f..0af2d04866 100644 --- a/pkg/apple/OSX/Info_Metal.plist +++ b/pkg/apple/OSX/Info_Metal.plist @@ -30,11 +30,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.8.5 + 1.8.6 CFBundleSignature ???? CFBundleVersion - 1.8.5 + 1.8.6 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHighResolutionCapable diff --git a/pkg/apple/RetroArch_iOS9-Info.plist b/pkg/apple/RetroArch_iOS9-Info.plist index f91d64ea2b..2820d4e4f8 100644 --- a/pkg/apple/RetroArch_iOS9-Info.plist +++ b/pkg/apple/RetroArch_iOS9-Info.plist @@ -33,11 +33,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.8.5 + 1.8.6 CFBundleSignature ???? CFBundleVersion - 1.8.5 + 1.8.6 LSRequiresIPhoneOS UIApplicationExitsOnSuspend diff --git a/version.all b/version.all index d088c5f733..86160727e5 100644 --- a/version.all +++ b/version.all @@ -6,8 +6,8 @@ # /* - pkg/snap/snapcraft.yaml (including the github url) */ #if 0 -RARCH_VERSION="1.8.5" +RARCH_VERSION="1.8.6" #endif #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "1.8.5" +#define PACKAGE_VERSION "1.8.6" #endif diff --git a/version.dtd b/version.dtd index 7f50a63133..4f84e6f78e 100644 --- a/version.dtd +++ b/version.dtd @@ -1 +1 @@ - +