mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
add menu throttle for 120+Hz displays
This commit is contained in:
parent
2197a7b5c0
commit
002fba476d
@ -205,6 +205,7 @@ struct settings
|
||||
bool pause_libretro;
|
||||
bool mouse_enable;
|
||||
bool timedate_enable;
|
||||
bool throttle;
|
||||
char wallpaper[PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
|
@ -433,6 +433,9 @@ int menu_iterate(retro_input_t input,
|
||||
if (driver.menu_ctx && driver.menu_ctx->input_postprocess)
|
||||
driver.menu_ctx->input_postprocess(input, old_input);
|
||||
|
||||
if (g_settings.menu.throttle)
|
||||
rarch_sleep(15);
|
||||
|
||||
if (ret)
|
||||
return -1;
|
||||
|
||||
|
@ -595,10 +595,13 @@
|
||||
# menu_mouse_enable = false
|
||||
|
||||
# Shows current date and/or time inside menu.
|
||||
# menu_timedate_enable = true
|
||||
# menu_timedate_enable = true
|
||||
|
||||
# Throttle the menu to ~60 FPS instead of using v-sync. Useful for 120+Hz monitors.
|
||||
# menu_throttle = false
|
||||
|
||||
# Path to a .png image to set as menu wallpaper.
|
||||
# menu_wallpaper =
|
||||
# menu_wallpaper =
|
||||
|
||||
# Wrap-around toe beginning and/or end if boundary of list reached horizontally
|
||||
# menu_navigation_wraparound_horizontal_enable = false
|
||||
|
@ -485,6 +485,7 @@ static void config_set_defaults(void)
|
||||
g_settings.menu.pause_libretro = true;
|
||||
g_settings.menu.mouse_enable = false;
|
||||
g_settings.menu.timedate_enable = true;
|
||||
g_settings.menu.throttle = false;
|
||||
*g_settings.menu.wallpaper = '\0';
|
||||
g_settings.menu.navigation.wraparound.horizontal_enable = true;
|
||||
g_settings.menu.navigation.wraparound.vertical_enable = true;
|
||||
@ -1875,6 +1876,7 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf,"menu_pause_libretro", g_settings.menu.pause_libretro);
|
||||
config_set_bool(conf,"menu_mouse_enable", g_settings.menu.mouse_enable);
|
||||
config_set_bool(conf,"menu_timedate_enable", g_settings.menu.timedate_enable);
|
||||
config_set_bool(conf,"menu_throttle", g_settings.menu.throttle);
|
||||
config_set_path(conf, "menu_wallpaper", g_settings.menu.wallpaper);
|
||||
#endif
|
||||
config_set_bool(conf, "video_vsync", g_settings.video.vsync);
|
||||
|
@ -5240,6 +5240,18 @@ static bool setting_data_append_list_menu_options(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
|
||||
CONFIG_BOOL(
|
||||
g_settings.menu.throttle,
|
||||
"menu_throttle",
|
||||
"Throttle menu speed",
|
||||
false,
|
||||
"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