mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +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 ------------------------------------------------
|
||||
|
||||
namespace Priv
|
||||
|
@ -432,6 +434,19 @@ SDLVideo::SDLVideo ()
|
|||
Priv::CreateWindow(SDL_WINDOW_HIDDEN);
|
||||
}
|
||||
#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 ()
|
||||
|
|
Loading…
Reference in a new issue