diff --git a/general.h b/general.h index 9fb155967e..8e27757c67 100644 --- a/general.h +++ b/general.h @@ -205,6 +205,7 @@ struct settings bool pause_libretro; bool mouse_enable; bool timedate_enable; + bool throttle; char wallpaper[PATH_MAX_LENGTH]; struct diff --git a/menu/menu.c b/menu/menu.c index 4cbf978fca..6737c5335c 100644 --- a/menu/menu.c +++ b/menu/menu.c @@ -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; diff --git a/retroarch.cfg b/retroarch.cfg index 3cad503507..784b4e28db 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -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 diff --git a/settings.c b/settings.c index 17d02a7c65..fdb9477b4e 100644 --- a/settings.c +++ b/settings.c @@ -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); diff --git a/settings_data.c b/settings_data.c index 264e7559c8..de21e45f7a 100644 --- a/settings_data.c +++ b/settings_data.c @@ -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);