diff --git a/src/cvars.cpp b/src/cvars.cpp index f97f35f43..cb021e27f 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -395,6 +395,11 @@ void ItemFinder_OnChange(void); consvar_t cv_itemfinder = Player("itemfinder", "Off").flags(CV_NOSHOWHELP).on_off().onchange(ItemFinder_OnChange).dont_save(); consvar_t cv_maxportals = Player("maxportals", "2").values({{0, "MIN"}, {12, "MAX"}}); // lmao rendering 32 portals, you're a card +consvar_t cv_menuframeskip = Player("menuframeskip", "Off").values({ + {35, "MIN"}, + {144, "MAX"}, + {0, "Off"}, +}); consvar_t cv_mindelay = Player("mindelay", "2").min_max(0, 30); consvar_t cv_movebob = Player("movebob", "1.0").floating_point().min_max(0, 4*FRACUNIT); consvar_t cv_netstat = Player("netstat", "Off").on_off().dont_save(); // show bandwidth statistics diff --git a/src/d_main.cpp b/src/d_main.cpp index a469e7cf2..1447a5f38 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -100,7 +100,7 @@ #include "lua_profile.h" -extern "C" consvar_t cv_lua_profile; +extern "C" consvar_t cv_lua_profile, cv_menuframeskip; /* Manually defined asset hashes */ @@ -1105,7 +1105,7 @@ void D_SRB2Loop(void) // So this measurement is accurate regardless of fpscap. if (sincelastworld <= minworldfps) { - double goal = 60.0; + double goal = cv_menuframeskip.value; if (worldfpsavg < goal) { skiplaggyworld = true; diff --git a/src/menus/options-video-advanced.c b/src/menus/options-video-advanced.c index e5b941ccf..60e48756b 100644 --- a/src/menus/options-video-advanced.c +++ b/src/menus/options-video-advanced.c @@ -5,6 +5,8 @@ #include "../r_main.h" // cv_skybox #include "../hardware/hw_main.h" // gl consvars +extern consvar_t cv_menuframeskip; + menuitem_t OPTIONS_VideoAdvanced[] = { {IT_HEADER, "Performance...", NULL, @@ -22,6 +24,9 @@ menuitem_t OPTIONS_VideoAdvanced[] = {IT_STRING | IT_CVAR, "Parallel Software", "Uses multiple CPU cores for the software renderer if available, for a FPS boost.", NULL, {.cvar = &cv_parallelsoftware}, 0, 0}, + {IT_STRING | IT_CVAR, "Extra Frame Skipping", "Skip 3D rendering frames while the menu is open.", + NULL, {.cvar = &cv_menuframeskip}, 0, 0}, + {IT_HEADER, "Rendering Backend...", "Watch people get confused anyway!!", NULL, {NULL}, 0, 0},