Merge pull request #523 from Azaezel/alpha40/windowWonk

report if SDL_CreateWindow is unable to create a window at all
This commit is contained in:
Brian Roberts 2021-08-10 22:29:05 -05:00 committed by GitHub
commit 86a8fb5854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,6 +90,13 @@ void GFXGLDevice::enumerateAdapters( Vector<GFXAdapter*> &adapterList )
480, // height, in pixels
SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN // flags - see below
);
if (!tempWindow)
{
const char* err = SDL_GetError();
Con::printf(err);
AssertFatal(0, err);
return;
}
SDL_ClearError();
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);