Skip to content

Commit

Permalink
Add core option for text, grp and sp layer on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
negativeExponent committed Sep 14, 2024
1 parent 7924fba commit f78813d
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
34 changes: 34 additions & 0 deletions libretro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/************************************
Expand Down Expand Up @@ -2459,3 +2492,4 @@ void retro_run(void)
/* TODO/FIXME - hardcoded pitch here */
video_cb(videoBuffer, retrow, retroh, /*retrow*/ 800 << 1);
}

42 changes: 42 additions & 0 deletions libretro_core_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};
Expand Down
42 changes: 42 additions & 0 deletions libretro_core_options_intl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};
Expand Down

0 comments on commit f78813d

Please sign in to comment.