Wait until fully loaded before using framerate cap

This commit is contained in:
Sally Coolatta 2022-03-27 02:05:00 -04:00
parent 35b1a0d63f
commit 23b0a5fcaf

View file

@ -20,6 +20,7 @@
#include "r_plane.h"
#include "p_spec.h"
#include "r_state.h"
#include "console.h" // con_startup_loadprogress
#ifdef HWRENDER
#include "hardware/hw_main.h" // for cv_glshearing
#endif
@ -51,6 +52,11 @@ consvar_t cv_fpscap = CVAR_INIT ("fpscap", "Match refresh rate", CV_SAVE, fpscap
UINT32 R_GetFramerateCap(void)
{
if (con_startup_loadprogress != LOADED_ALLDONE)
{
return 0;
}
if (cv_fpscap.value < 0)
{
return I_GetRefreshRate();