Ver 0.10.0 SR2 (Switchres API) Implimantation

merged SR updates

Fixed sub labels

fixed PI compiile

Removed SR makefile
This commit is contained in:
Ben 2021-06-04 08:56:44 -07:00
parent 5534fd7275
commit 9184a9d04c
5 changed files with 12 additions and 67 deletions

View File

@ -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

View File

@ -22,9 +22,9 @@ using namespace std;
const string WHITESPACE = " \n\r\t\f\v"; const string WHITESPACE = " \n\r\t\f\v";
#if defined(_WIN32) #if defined(_WIN32)
#define SR_CONFIG_PATHS ".\\;.\\ini\\;" #define SR_CONFIG_PATHS ";.\\;.\\ini\\;"
#elif defined(__linux__) #elif defined(__linux__)
#define SR_CONFIG_PATHS "./;./ini/;/etc/;" #define SR_CONFIG_PATHS ";./;./ini/;/etc/;"
#endif #endif
//============================================================ //============================================================
@ -244,14 +244,16 @@ bool switchres_manager::parse_config(const char *file_name)
break; break;
case s2i("user_mode"): case s2i("user_mode"):
{ {
modeline user_mode = {};
if (strcmp(value.c_str(), "auto")) 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) if (sscanf(value.c_str(), "%dx%d@%d", &user_mode.width, &user_mode.height, &user_mode.refresh) < 1)
{
log_error("Error: use format resolution <w>x<h>@<r>\n"); log_error("Error: use format resolution <w>x<h>@<r>\n");
else break;
set_user_mode(&user_mode); }
} }
set_user_mode(&user_mode);
break; break;
} }

View File

@ -34,6 +34,8 @@ MODULE_API void sr_init() {
MODULE_API void sr_load_ini(char* config) { MODULE_API void sr_load_ini(char* config) {
swr->parse_config(config); swr->parse_config(config);
swr->display()->m_ds = swr->ds;
swr->display()->parse_options();
} }

View File

@ -435,7 +435,7 @@ static void crt_rpi_switch(videocrt_switch_t *p_switch, int width, int height, f
width = w; 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 */ /* following code is the mode line generator */
hfp = ((width * 0.044) + (width / 112)); hfp = ((width * 0.044) + (width / 112));

View File

@ -1443,11 +1443,11 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_CRT_SWITCH_HIRES_MENU, 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( MSG_HASH(
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, 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( MSG_HASH(
MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE,