From f78813d74aa2d6f9aad19733727b40247065f07b Mon Sep 17 00:00:00 2001 From: negativeExponent Date: Sat, 14 Sep 2024 11:45:19 +0800 Subject: [PATCH] Add core option for text, grp and sp layer on/off --- libretro.c | 34 +++++++++++++++++++++++++++++ libretro_core_options.h | 42 ++++++++++++++++++++++++++++++++++++ libretro_core_options_intl.h | 42 ++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) diff --git a/libretro.c b/libretro.c index eebdd2aa..10141de2 100644 --- a/libretro.c +++ b/libretro.c @@ -1515,6 +1515,39 @@ static void update_variables(int running) else if (!strcmp(var.value, "enabled")) Config.AudioDesyncHack = 1; } + + var.key = "px68k_text_off"; + var.value = NULL; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (!strcmp(var.value, "disabled")) + Debug_Text = 1; + else if (!strcmp(var.value, "enabled")) + Debug_Text = 0; + } + + var.key = "px68k_grp_off"; + var.value = NULL; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (!strcmp(var.value, "disabled")) + Debug_Grp = 1; + else if (!strcmp(var.value, "enabled")) + Debug_Grp = 0; + } + + var.key = "px68k_sp_off"; + var.value = NULL; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (!strcmp(var.value, "disabled")) + Debug_Sp = 1; + else if (!strcmp(var.value, "enabled")) + Debug_Sp = 0; + } } /************************************ @@ -2459,3 +2492,4 @@ void retro_run(void) /* TODO/FIXME - hardcoded pitch here */ video_cb(videoBuffer, retrow, retroh, /*retrow*/ 800 << 1); } + diff --git a/libretro_core_options.h b/libretro_core_options.h index 298304ad..301f4509 100644 --- a/libretro_core_options.h +++ b/libretro_core_options.h @@ -454,6 +454,48 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "disabled" }, + { + "px68k_text_off", + "Text Off", + NULL, + "TODO:", + NULL, + "advanced", + { + { "disabled", NULL}, + { "enabled", NULL}, + { NULL, NULL }, + }, + "disabled" + }, + { + "px68k_grp_off", + "Grp Off", + NULL, + "TODO:", + NULL, + "advanced", + { + { "disabled", NULL}, + { "enabled", NULL}, + { NULL, NULL }, + }, + "disabled" + }, + { + "px68k_sp_off", + "SP/BG Off", + NULL, + "TODO:", + NULL, + "advanced", + { + { "disabled", NULL}, + { "enabled", NULL}, + { NULL, NULL }, + }, + "disabled" + }, { NULL, NULL, NULL, NULL, NULL, NULL, { 0, 0 }, NULL }, }; diff --git a/libretro_core_options_intl.h b/libretro_core_options_intl.h index cd8d7907..aa563179 100644 --- a/libretro_core_options_intl.h +++ b/libretro_core_options_intl.h @@ -479,6 +479,48 @@ struct retro_core_option_v2_definition option_defs_fr[] = { }, "disabled" }, + { + "px68k_text_off", + "Text Off", + NULL, + "TODO:", + NULL, + "advanced", + { + { "disabled", NULL}, + { "enabled", NULL}, + { NULL, NULL }, + }, + "disabled" + }, + { + "px68k_grp_off", + "Grp Off", + NULL, + "TODO:", + NULL, + "advanced", + { + { "disabled", NULL}, + { "enabled", NULL}, + { NULL, NULL }, + }, + "disabled" + }, + { + "px68k_sp_off", + "SP/BG Off", + NULL, + "TODO:", + NULL, + "advanced", + { + { "disabled", NULL}, + { "enabled", NULL}, + { NULL, NULL }, + }, + "disabled" + }, { NULL, NULL, NULL, NULL, NULL, NULL, { 0, 0 }, NULL }, };