Make "Extra Frame Skipping" (for 3d rendering) an advanced video option

- Off by default
This commit is contained in:
James R 2024-03-27 20:09:21 -07:00
parent 360bbf6552
commit 593aed9110
3 changed files with 12 additions and 2 deletions

View file

@ -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

View file

@ -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;

View file

@ -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},