(configuration) Cleanups

This commit is contained in:
twinaphex 2019-04-22 08:46:58 +02:00
parent 5171d167c8
commit a2ec579689
1 changed files with 16 additions and 16 deletions

View File

@ -3588,14 +3588,14 @@ bool config_load_shader_preset(void)
settings->paths.directory_video_shader, settings->paths.directory_video_shader,
"presets", path_size); "presets", path_size);
RARCH_LOG("Shaders: preset directory: %s\n", shader_directory); RARCH_LOG("[Shaders]: preset directory: %s\n", shader_directory);
for (idx = FILE_PATH_CGP_EXTENSION; idx <= FILE_PATH_SLANGP_EXTENSION; idx++) for (idx = FILE_PATH_CGP_EXTENSION; idx <= FILE_PATH_SLANGP_EXTENSION; idx++)
{ {
if (!check_shader_compatibility((enum file_path_enum)(idx))) if (!check_shader_compatibility((enum file_path_enum)(idx)))
continue; continue;
/* Concatenate strings into full paths for core_path, game_path */ /* Concatenate strings into full paths */
fill_pathname_join_special_ext(core_path, fill_pathname_join_special_ext(core_path,
shader_directory, core_name, shader_directory, core_name,
core_name, core_name,
@ -3608,18 +3608,18 @@ bool config_load_shader_preset(void)
file_path_str((enum file_path_enum)(idx)), file_path_str((enum file_path_enum)(idx)),
path_size); path_size);
/* Create a new config file from game_path */ /* Create a new config file */
new_conf = config_file_read(game_path); new_conf = config_file_read(game_path);
if (!new_conf) if (!new_conf)
{ {
RARCH_LOG("Shaders: no game-specific preset found at %s.\n", RARCH_LOG("[Shaders]: no game-specific preset found at %s.\n",
game_path); game_path);
continue; continue;
} }
/* Game shader preset exists, load it. */ /* Shader preset exists, load it. */
RARCH_LOG("Shaders: game-specific shader preset found at %s.\n", RARCH_LOG("[Shaders]: game-specific shader preset found at %s.\n",
game_path); game_path);
retroarch_set_shader_preset(game_path); retroarch_set_shader_preset(game_path);
goto success; goto success;
@ -3629,25 +3629,25 @@ bool config_load_shader_preset(void)
{ {
if (!check_shader_compatibility((enum file_path_enum)(idx))) if (!check_shader_compatibility((enum file_path_enum)(idx)))
continue; continue;
/* Concatenate strings into full paths for core_path, parent path */ /* Concatenate strings into full paths */
fill_pathname_join_special_ext(content_path, fill_pathname_join_special_ext(content_path,
shader_directory, core_name, shader_directory, core_name,
content_dir_name, content_dir_name,
file_path_str((enum file_path_enum)(idx)), file_path_str((enum file_path_enum)(idx)),
path_size); path_size);
/* Create a new config file from parent path */ /* Create a new config file */
new_conf = config_file_read(content_path); new_conf = config_file_read(content_path);
if (!new_conf) if (!new_conf)
{ {
RARCH_LOG("Shaders: no content-dir-specific preset found at %s.\n", RARCH_LOG("[Shaders]: no content-dir-specific preset found at %s.\n",
content_path); content_path);
continue; continue;
} }
/* Parent-dir shader preset exists, load it. */ /* Shader preset exists, load it. */
RARCH_LOG("Shaders: content-dir-specific shader preset found at %s.\n", RARCH_LOG("[Shaders]: content-dir-specific shader preset found at %s.\n",
content_path); content_path);
retroarch_set_shader_preset(content_path); retroarch_set_shader_preset(content_path);
goto success; goto success;
@ -3657,25 +3657,25 @@ bool config_load_shader_preset(void)
{ {
if (!check_shader_compatibility((enum file_path_enum)(idx))) if (!check_shader_compatibility((enum file_path_enum)(idx)))
continue; continue;
/* Concatenate strings into full paths for core_path, game_path */ /* Concatenate strings into full paths */
fill_pathname_join_special_ext(core_path, fill_pathname_join_special_ext(core_path,
shader_directory, core_name, shader_directory, core_name,
core_name, core_name,
file_path_str((enum file_path_enum)(idx)), file_path_str((enum file_path_enum)(idx)),
path_size); path_size);
/* Create a new config file from core_path */ /* Create a new config file */
new_conf = config_file_read(core_path); new_conf = config_file_read(core_path);
if (!new_conf) if (!new_conf)
{ {
RARCH_LOG("Shaders: no core-specific preset found at %s.\n", RARCH_LOG("[Shaders]: no core-specific preset found at %s.\n",
core_path); core_path);
continue; continue;
} }
/* Core shader preset exists, load it. */ /* Shader preset exists, load it. */
RARCH_LOG("Shaders: core-specific shader preset found at %s.\n", RARCH_LOG("[Shaders]: core-specific shader preset found at %s.\n",
core_path); core_path);
retroarch_set_shader_preset(core_path); retroarch_set_shader_preset(core_path);
goto success; goto success;