mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 03:12:00 -04:00
remove window_event flag, skip DRS if frametime is too long
This commit is contained in:
parent
ff86d91bc2
commit
3584cb67bb
@ -106,8 +106,6 @@ boolean screenvisible = true;
|
||||
|
||||
boolean window_focused = true;
|
||||
|
||||
static boolean window_event = true;
|
||||
|
||||
void *I_GetSDLWindow(void)
|
||||
{
|
||||
return screen;
|
||||
@ -402,7 +400,6 @@ static void I_GetEvent(void)
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT:
|
||||
window_event = true;
|
||||
if (sdlevent.window.windowID == SDL_GetWindowID(screen))
|
||||
{
|
||||
HandleWindowEvent(&sdlevent.window);
|
||||
@ -484,17 +481,12 @@ static void ResetLogicalSize(void);
|
||||
|
||||
static void DynamicResolution(void)
|
||||
{
|
||||
if (resolution_mode != RES_DRS || frametime_withoutpresent == 0)
|
||||
if (resolution_mode != RES_DRS || frametime_withoutpresent == 0 ||
|
||||
frametime_withoutpresent > 1000000 / 15)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (window_event)
|
||||
{
|
||||
window_event = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 1.25 milliseconds for SDL render present
|
||||
double target = (1.0 / targetrefresh) - 0.00125;
|
||||
double actual = frametime_withoutpresent / 1000000.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user