diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 2265fdd94..d97e5c858 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -522,8 +522,8 @@ static MenuOptionSet_t MEOS_VIDEOSETUP_VSYNC = MAKE_MENUOPTIONSET(MEOSN_VIDEOSET static MenuOption_t MEO_VIDEOSETUP_VSYNC = MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_VSYNC, &newvsync); static MenuEntry_t ME_VIDEOSETUP_VSYNC = MAKE_MENUENTRY("VSync:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_VSYNC, Option); -static char const *MEOSN_VIDEOSETUP_FRAMELIMIT [] = { "None", "30 fps", "60 fps", "120 fps", "144 fps", "165 fps", "240 fps" }; -static int32_t MEOSV_VIDEOSETUP_FRAMELIMIT [] = { 0, 30, 60, 120, 144, 165, 240 }; +static char const *MEOSN_VIDEOSETUP_FRAMELIMIT [] = { "30 fps", "60 fps", "120 fps", "144 fps", "165 fps", "240 fps" }; +static int32_t MEOSV_VIDEOSETUP_FRAMELIMIT [] = { 30, 60, 120, 144, 165, 240 }; static MenuOptionSet_t MEOS_VIDEOSETUP_FRAMELIMIT = MAKE_MENUOPTIONSET(MEOSN_VIDEOSETUP_FRAMELIMIT, MEOSV_VIDEOSETUP_FRAMELIMIT, 0x0); static MenuOption_t MEO_VIDEOSETUP_FRAMELIMIT= MAKE_MENUOPTION(&MF_Redfont, &MEOS_VIDEOSETUP_FRAMELIMIT, &r_maxfps); static MenuEntry_t ME_VIDEOSETUP_FRAMELIMIT = MAKE_MENUENTRY("Framerate limit:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_VIDEOSETUP_FRAMELIMIT, Option); @@ -3221,11 +3221,7 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption) } else if (entry == &ME_VIDEOSETUP_FRAMELIMIT) { - g_frameDelay = newOption ? (timerGetFreqU64()/(newOption + r_maxfpsoffset)) : 0; - } - else if (entry == &ME_VIDEOSETUP_FRAMELIMITOFFSET) - { - g_frameDelay = r_maxfps ? (timerGetFreqU64()/(r_maxfps + newOption)) : 0; + g_frameDelay = (newOption + r_maxfpsoffset) ? (timerGetFreqU64()/(newOption + r_maxfpsoffset)) : 0; } switch (g_currentMenu) @@ -3333,6 +3329,8 @@ static int32_t Menu_EntryRangeInt32Modify(MenuEntry_t *entry, int32_t newValue) joySetDeadZone(M_JOYSTICKAXES.currentEntry, newValue, *MEO_JOYSTICKAXIS_SATU.variable); else if (entry == &ME_JOYSTICKAXIS_SATU) joySetDeadZone(M_JOYSTICKAXES.currentEntry, *MEO_JOYSTICKAXIS_DEAD.variable, newValue); + else if (entry == &ME_VIDEOSETUP_FRAMELIMITOFFSET) + g_frameDelay = (r_maxfps + newValue) ? (timerGetFreqU64()/(r_maxfps + newValue)) : 0; return 0; }