mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-12 20:58:18 +00:00
Add 'Suspend Screensaver Enable Hint'
This commit is contained in:
parent
c4310ec813
commit
e995cbdfa9
3
driver.c
3
driver.c
@ -571,7 +571,8 @@ static void init_video_input(void)
|
||||
(g_settings.video.rotation + g_extern.system.rotation) % 4);
|
||||
|
||||
if (driver.video->suppress_screensaver)
|
||||
driver.video->suppress_screensaver(driver.video_data, true);
|
||||
driver.video->suppress_screensaver(driver.video_data,
|
||||
g_settings.ui.suspend_screensaver_enable);
|
||||
|
||||
if (!driver.input)
|
||||
{
|
||||
|
@ -182,6 +182,7 @@ struct settings
|
||||
struct
|
||||
{
|
||||
bool menubar_enable;
|
||||
bool suspend_screensaver_enable;
|
||||
} ui;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -585,6 +585,12 @@
|
||||
# Filter files being show in 'Load Content' by supported extensions
|
||||
# menu_navigation_browser_filter_supported_extensions_enable = true
|
||||
|
||||
#### UI
|
||||
|
||||
# Suspends the screensaver if set to true. Is a hint that does not necessarily have to be honored
|
||||
# by video driver.
|
||||
# suspend_screensaver_enable = true
|
||||
|
||||
#### Camera
|
||||
|
||||
# Override the default camera device the camera driver uses. This is driver dependant.
|
||||
|
@ -517,6 +517,7 @@ static void config_set_defaults(void)
|
||||
#endif
|
||||
|
||||
g_settings.ui.menubar_enable = true;
|
||||
g_settings.ui.suspend_screensaver_enable = true;
|
||||
|
||||
g_settings.location.allow = false;
|
||||
g_settings.camera.allow = false;
|
||||
@ -1295,6 +1296,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
}
|
||||
|
||||
CONFIG_GET_BOOL(ui.menubar_enable, "ui_menubar_enable");
|
||||
CONFIG_GET_BOOL(ui.suspend_screensaver_enable, "suspend_screensaver_enable");
|
||||
CONFIG_GET_BOOL(fps_show, "fps_show");
|
||||
CONFIG_GET_BOOL(fps_monitor_enable, "fps_monitor_enable");
|
||||
CONFIG_GET_BOOL(load_dummy_on_core_shutdown, "load_dummy_on_core_shutdown");
|
||||
@ -1778,6 +1780,7 @@ bool config_save_file(const char *path)
|
||||
g_settings.load_dummy_on_core_shutdown);
|
||||
config_set_bool(conf, "fps_show", g_settings.fps_show);
|
||||
config_set_bool(conf, "ui_menubar_enable", g_settings.ui.menubar_enable);
|
||||
config_set_bool(conf, "suspend_screensaver_enable", g_settings.ui.suspend_screensaver_enable);
|
||||
config_set_bool(conf, "fps_monitor_enable", g_settings.fps_monitor_enable);
|
||||
config_set_path(conf, "libretro_path", g_settings.libretro);
|
||||
config_set_path(conf, "libretro_directory", g_settings.libretro_directory);
|
||||
|
@ -5387,6 +5387,18 @@ static bool setting_data_append_list_ui_options(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
CONFIG_BOOL(
|
||||
g_settings.ui.suspend_screensaver_enable,
|
||||
"suspend_screensaver_enable",
|
||||
"Suspend Screensaver Enable Hint",
|
||||
true,
|
||||
"OFF",
|
||||
"ON",
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
END_SUB_GROUP(list, list_info);
|
||||
|
||||
END_GROUP(list, list_info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user