From 9184a9d04c56e22772119a42cdd9fcb0827d9f2b Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 4 Jun 2021 08:56:44 -0700 Subject: [PATCH] Ver 0.10.0 SR2 (Switchres API) Implimantation merged SR updates Fixed sub labels fixed PI compiile Removed SR makefile --- deps/switchres/.gitlab-ci.yml | 59 ---------------------------- deps/switchres/switchres.cpp | 12 +++--- deps/switchres/switchres_wrapper.cpp | 2 + gfx/video_crt_switch.c | 2 +- intl/msg_hash_us.h | 4 +- 5 files changed, 12 insertions(+), 67 deletions(-) delete mode 100644 deps/switchres/.gitlab-ci.yml diff --git a/deps/switchres/.gitlab-ci.yml b/deps/switchres/.gitlab-ci.yml deleted file mode 100644 index f1c9fb9f79..0000000000 --- a/deps/switchres/.gitlab-ci.yml +++ /dev/null @@ -1,59 +0,0 @@ -# This file is a template, and might need editing before it works on your project. -# use the official gcc image, based on debian -# can use verions as well, like gcc:5.2 -# see https://hub.docker.com/_/gcc/ -image: gcc:latest - -before_script: - - apt update - - apt -y install make - -.pre_requisites_linux: &prerequisiteslinux - before_script: - - apt update - - apt -y install make - -.pre_requisites_win32: &prerequisiteswin32 - image: "ubuntu:rolling" - before_script: - - apt update - - apt -y install make mingw-w64 - - -linux:x86_64:standalone: - stage: build - <<: *prerequisiteslinux - script: - - make - -linux:x86_64:lib: - stage: build - <<: *prerequisiteslinux - script: - - make libswitchres - -win32:x86_64:standalone: - stage: build - <<: *prerequisiteswin32 - script: - - make PLATFORM=NT CROSS_COMPILE=x86_64-w64-mingw32- - -win32:x86_64:lib: - stage: build - <<: *prerequisiteswin32 - script: - - make PLATFORM=NT CROSS_COMPILE=x86_64-w64-mingw32- libswitchres - - -win32:i686:standalone: - stage: build - <<: *prerequisiteswin32 - script: - - make PLATFORM=NT CROSS_COMPILE=i686-w64-mingw32- - - -win32:i686:lib: - stage: build - <<: *prerequisiteswin32 - script: - - make PLATFORM=NT CROSS_COMPILE=i686-w64-mingw32- libswitchres \ No newline at end of file diff --git a/deps/switchres/switchres.cpp b/deps/switchres/switchres.cpp index c492ba8932..4889e3014c 100644 --- a/deps/switchres/switchres.cpp +++ b/deps/switchres/switchres.cpp @@ -22,9 +22,9 @@ using namespace std; const string WHITESPACE = " \n\r\t\f\v"; #if defined(_WIN32) - #define SR_CONFIG_PATHS ".\\;.\\ini\\;" + #define SR_CONFIG_PATHS ";.\\;.\\ini\\;" #elif defined(__linux__) - #define SR_CONFIG_PATHS "./;./ini/;/etc/;" + #define SR_CONFIG_PATHS ";./;./ini/;/etc/;" #endif //============================================================ @@ -244,14 +244,16 @@ bool switchres_manager::parse_config(const char *file_name) break; case s2i("user_mode"): { + modeline user_mode = {}; if (strcmp(value.c_str(), "auto")) { - modeline user_mode = {}; if (sscanf(value.c_str(), "%dx%d@%d", &user_mode.width, &user_mode.height, &user_mode.refresh) < 1) + { log_error("Error: use format resolution x@\n"); - else - set_user_mode(&user_mode); + break; + } } + set_user_mode(&user_mode); break; } diff --git a/deps/switchres/switchres_wrapper.cpp b/deps/switchres/switchres_wrapper.cpp index debae95b39..d92c55bc7c 100644 --- a/deps/switchres/switchres_wrapper.cpp +++ b/deps/switchres/switchres_wrapper.cpp @@ -34,6 +34,8 @@ MODULE_API void sr_init() { MODULE_API void sr_load_ini(char* config) { swr->parse_config(config); + swr->display()->m_ds = swr->ds; + swr->display()->parse_options(); } diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 3ab7d170cb..0c1c298802 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -435,7 +435,7 @@ static void crt_rpi_switch(videocrt_switch_t *p_switch, int width, int height, f width = w; - crt_aspect_ratio_switch(p_switch, width,height); + crt_aspect_ratio_switch(p_switch, width,height,width,height); /* following code is the mode line generator */ hfp = ((width * 0.044) + (width / 112)); diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index c6741f7e4a..0db5a1a590 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1443,11 +1443,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_HIRES_MENU, - "Use high resolution menu" + "Use a high resolution menu betweeeon content. Allows use of other menu drivers" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, - "Use a custom refresh rate specified in the configuration file if needed." + " Custom Refresh Rate" ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE,