mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 00:39:40 +00:00
Add Ability to Hide OSD Messages
This commit is contained in:
parent
261e52b7dd
commit
349bc50e55
15
libretro.cpp
15
libretro.cpp
@ -86,6 +86,7 @@ static retro_input_state_t input_state_cb;
|
||||
static unsigned frame_count = 0;
|
||||
static unsigned internal_frame_count = 0;
|
||||
static bool display_internal_framerate = false;
|
||||
static bool display_notifications = true;
|
||||
static bool allow_frame_duping = false;
|
||||
static bool failed_init = false;
|
||||
static unsigned image_offset = 0;
|
||||
@ -3986,6 +3987,17 @@ static void check_variables(bool startup)
|
||||
else
|
||||
display_internal_framerate = false;
|
||||
|
||||
var.key = BEETLE_OPT(display_osd);
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
if (strcmp(var.value, "enabled") == 0)
|
||||
display_notifications = true;
|
||||
else if (strcmp(var.value, "disabled") == 0)
|
||||
display_notifications = false;
|
||||
}
|
||||
else
|
||||
display_notifications = true;
|
||||
|
||||
var.key = BEETLE_OPT(crop_overscan);
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
@ -5292,6 +5304,8 @@ void MDFND_DispMessage(
|
||||
enum retro_message_target target, enum retro_message_type type,
|
||||
const char *str)
|
||||
{
|
||||
if (display_notifications)
|
||||
{
|
||||
if (libretro_msg_interface_version >= 1)
|
||||
{
|
||||
struct retro_message_ext msg = {
|
||||
@ -5314,6 +5328,7 @@ void MDFND_DispMessage(
|
||||
};
|
||||
environ_cb(RETRO_ENVIRONMENT_SET_MESSAGE, &msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MDFN_DispMessage(
|
||||
|
@ -352,6 +352,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
||||
},
|
||||
"disabled"
|
||||
},
|
||||
{
|
||||
BEETLE_OPT(display_osd),
|
||||
"Display OSD Messages",
|
||||
NULL,
|
||||
"Display OSD messages generated by the core.",
|
||||
NULL,
|
||||
"osd",
|
||||
{
|
||||
{ "enabled", NULL },
|
||||
{ "disabled", NULL },
|
||||
{ NULL, NULL },
|
||||
},
|
||||
"enabled"
|
||||
},
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(HAVE_VULKAN)
|
||||
{
|
||||
BEETLE_OPT(display_vram),
|
||||
|
Loading…
Reference in New Issue
Block a user