From 0422dfb5b59cf731d4d767131f5c8c616b3845b6 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Tue, 28 Feb 2023 18:32:11 +0100 Subject: [PATCH] Cleanups --- gfx/video_shader_parse.c | 13 ++++++++----- retroarch.h | 5 ----- runloop.c | 13 ++----------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index 2b8eeea094..1de9ad4bb3 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -296,7 +296,10 @@ static void replace_wildcards(char *inout_absolute_path, const unsigned in_absol "VID-USER-ROT-180", "VID-USER-ROT-270" }; - strlcpy(replace_text, rotation_replace_strings[retroarch_get_video_rotation()], sizeof(replace_text)); + settings_t *settings = config_get_ptr(); + strlcpy(replace_text, + rotation_replace_strings[settings->uints.video_rotation], + sizeof(replace_text)); break; } case RARCH_WILDCARD_VIDEO_FINAL_ROTATION: @@ -417,7 +420,7 @@ static void replace_wildcards(char *inout_absolute_path, const unsigned in_absol } /** - * gather_reference_path_list: + * video_shader_gather_reference_path_list: * * @param path_linked_list * List of paths which accrues as we move down the chain of references @@ -428,7 +431,7 @@ static void replace_wildcards(char *inout_absolute_path, const unsigned in_absol * * @return void **/ -static void gather_reference_path_list( +static void video_shader_gather_reference_path_list( struct path_linked_list *in_path_linked_list, char *path, int reference_depth) @@ -449,7 +452,7 @@ static void gather_reference_path_list( fill_pathname_expanded_and_absolute(reference_preset_path, conf->path, ref_tmp->path); replace_wildcards(reference_preset_path, PATH_MAX_LENGTH, conf->path); - gather_reference_path_list(in_path_linked_list, reference_preset_path, reference_depth + 1); + video_shader_gather_reference_path_list(in_path_linked_list, reference_preset_path, reference_depth + 1); free(reference_preset_path); ref_tmp = ref_tmp->next; @@ -2372,7 +2375,7 @@ bool video_shader_load_preset_into_shader(const char *path, /* Gather all the paths of all of the presets in all reference chains */ override_paths_list = path_linked_list_new(); - gather_reference_path_list(override_paths_list, conf->path, 0); + video_shader_gather_reference_path_list(override_paths_list, conf->path, 0); /* * Step through the references and apply overrides for each one diff --git a/retroarch.h b/retroarch.h index a34a5e9609..5f835bb9a8 100644 --- a/retroarch.h +++ b/retroarch.h @@ -143,11 +143,6 @@ const char* config_get_audio_driver_options(void); /* Camera */ -/* - Returns the user defined video rotation set in the video_rotation user setting -*/ -unsigned int retroarch_get_video_rotation(void); - /* Returns rotation requested by the core regardless of if it has been applied with the final video rotation diff --git a/runloop.c b/runloop.c index 5378c29812..8e94e4db28 100644 --- a/runloop.c +++ b/runloop.c @@ -4255,16 +4255,6 @@ unsigned runloop_get_video_swap_interval( swap_interval_config; } -/* - Returns the user defined video rotation set in the video_rotation user setting -*/ -unsigned int retroarch_get_video_rotation(void) -{ - settings_t *settings = config_get_ptr(); - unsigned video_rotation = settings->uints.video_rotation; - return settings->uints.video_rotation; -} - /* Returns rotation requested by the core regardless of if it has been applied with the final video rotation @@ -4280,7 +4270,8 @@ unsigned int retroarch_get_core_requested_rotation(void) */ unsigned int retroarch_get_rotation(void) { - return retroarch_get_video_rotation() + runloop_state.system.rotation; + settings_t *settings = config_get_ptr(); + return settings->uints.video_rotation + runloop_state.system.rotation; } static void retro_run_null(void) { } /* Stub function callback impl. */