Skip to content

Commit 3516ce5

Browse files
committed
Minor override config load cleanup
1 parent 58e314e commit 3516ce5

1 file changed

Lines changed: 8 additions & 18 deletions

File tree

configuration.c

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4600,7 +4600,6 @@ bool config_load_override(void *data)
46004600
char content_path[PATH_MAX_LENGTH];
46014601
char config_directory[DIR_MAX_LENGTH];
46024602
bool should_append = false;
4603-
bool show_notification = true;
46044603
rarch_system_info_t *sys_info = (rarch_system_info_t*)data;
46054604
const char *core_name = sys_info
46064605
? sys_info->info.library_name : NULL;
@@ -4655,16 +4654,12 @@ bool config_load_override(void *data)
46554654

46564655
/* Prevent "--appendconfig" from being ignored */
46574656
if (!path_is_empty(RARCH_PATH_CONFIG_APPEND))
4658-
{
4659-
should_append = true;
4660-
show_notification = false;
4661-
}
4657+
should_append = true;
46624658

46634659
/* per-core overrides */
46644660
/* Create a new config file from core_path */
46654661
if (path_is_valid(core_path))
46664662
{
4667-
46684663
RARCH_LOG("[Override] Core-specific overrides found at \"%s\".\n",
46694664
core_path);
46704665

@@ -4683,8 +4678,7 @@ bool config_load_override(void *data)
46834678
else
46844679
path_set(RARCH_PATH_CONFIG_OVERRIDE, core_path);
46854680

4686-
should_append = true;
4687-
show_notification = true;
4681+
should_append = true;
46884682
}
46894683

46904684
if (has_content)
@@ -4711,8 +4705,7 @@ bool config_load_override(void *data)
47114705
else
47124706
path_set(RARCH_PATH_CONFIG_OVERRIDE, content_path);
47134707

4714-
should_append = true;
4715-
show_notification = true;
4708+
should_append = true;
47164709
}
47174710

47184711
/* per-game overrides */
@@ -4737,8 +4730,7 @@ bool config_load_override(void *data)
47374730
else
47384731
path_set(RARCH_PATH_CONFIG_OVERRIDE, game_path);
47394732

4740-
should_append = true;
4741-
show_notification = true;
4733+
should_append = true;
47424734
}
47434735
}
47444736

@@ -4752,12 +4744,11 @@ bool config_load_override(void *data)
47524744
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
47534745
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL);
47544746

4755-
if (!config_load_file(global_get_ptr(),
4756-
path_get(RARCH_PATH_CONFIG), settings))
4747+
if (!config_load_file(global_get_ptr(), path_get(RARCH_PATH_CONFIG), settings))
47574748
return false;
47584749

4759-
if (settings->bools.notification_show_config_override_load
4760-
&& show_notification)
4750+
if ( settings->bools.notification_show_config_override_load
4751+
&& !string_is_empty(path_get(RARCH_PATH_CONFIG_OVERRIDE)))
47614752
{
47624753
char msg[128];
47634754
size_t _len = strlcpy(msg, msg_hash_to_str(MSG_CONFIG_OVERRIDE_LOADED), sizeof(msg));
@@ -4795,8 +4786,7 @@ bool config_load_override_file(const char *config_path)
47954786
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
47964787
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL);
47974788

4798-
if (!config_load_file(global_get_ptr(),
4799-
path_get(RARCH_PATH_CONFIG), settings))
4789+
if (!config_load_file(global_get_ptr(), path_get(RARCH_PATH_CONFIG), settings))
48004790
return false;
48014791

48024792
if (settings->bools.notification_show_config_override_load)

0 commit comments

Comments
 (0)