Allow changing vsync and framerate limit at runtime

Also implements a new menu item flag: MENUITEMFLAG_SLIDER_DEFERRED,
which only calls the MENUOP_GETSLIDER callback on entering dimmed mode,
storing its value for later ticks, and only calls the MENUOP_SET
callback on leaving dimmed mode. This was necessary to prevent the
framerate limit slider from immediately affecting the framerate, leading
to an annoying slow down as the value was decremented to 0.
This commit is contained in:
Matthew Coppola committed 2024-12-06 17:20:22 -05:00
1 parent 5aa1cc6117
commit 1d14877bec
7 files changed
+155 -19

No files matched your search

+2 -1
View File
@@ -1666,6 +1666,7 @@
#define MENUITEMFLAG_CAROUSEL_04000000 0x04000000
#define MENUITEMFLAG_LITERAL_TEXT 0x08000000
#define MENUITEMFLAG_SLIDER_WIDE 0x10000000
#define MENUITEMFLAG_SLIDER_DEFERRED 0x20000000
#define MENUITEMTYPE_LABEL 0x01
#define MENUITEMTYPE_LIST 0x02
@@ -1696,7 +1697,7 @@
#ifndef PLATFORM_N64
#define MENUITEMTYPE_COLORBOX 0x1b
#endif
#endif
#define MENUMODELFLAG_HASSCALE 0x01
#define MENUMODELFLAG_HASPOSITION 0x02