mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 20:20:54 +00:00
- fix issues with Linux SDL builds following changes to refreshfreq.
This commit is contained in:
parent
587a5d5d9a
commit
5c3c55b6cd
1 changed files with 15 additions and 0 deletions
|
@ -111,6 +111,8 @@ CCMD(vid_list_sdl_render_drivers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int refreshfreq;
|
||||||
|
|
||||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||||
|
|
||||||
namespace Priv
|
namespace Priv
|
||||||
|
@ -432,6 +434,19 @@ SDLVideo::SDLVideo ()
|
||||||
Priv::CreateWindow(SDL_WINDOW_HIDDEN);
|
Priv::CreateWindow(SDL_WINDOW_HIDDEN);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Get refresh rate for current display.
|
||||||
|
SDL_DisplayMode display;
|
||||||
|
|
||||||
|
if(SDL_GetCurrentDisplayMode(vid_adapter, &display) == 0)
|
||||||
|
{
|
||||||
|
refreshfreq = display.refresh_rate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Failed to get refresh rate: %s\n", SDL_GetError());
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SDLVideo::~SDLVideo ()
|
SDLVideo::~SDLVideo ()
|
||||||
|
|
Loading…
Reference in a new issue