MSVC: Fix SDL binary assertion failure on start.
sdlReadDesktopVideoMode() was apparently being called when the window pointer is NULL. Wrap the code in an `if (window) { ... }`. SDL binary now launches correctly. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
cf9a88dfc3
commit
d0d087511f
|
@ -763,11 +763,13 @@ void sdlReadBattery()
|
|||
|
||||
void sdlReadDesktopVideoMode()
|
||||
{
|
||||
if (window) {
|
||||
SDL_DisplayMode dm;
|
||||
SDL_GetDesktopDisplayMode(SDL_GetWindowDisplayIndex(window), &dm);
|
||||
desktopWidth = dm.w;
|
||||
desktopHeight = dm.h;
|
||||
}
|
||||
}
|
||||
|
||||
static void sdlResizeVideo()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue