소스 검색

Merge pull request #523 from Azaezel/alpha40/windowWonk

report if SDL_CreateWindow is unable to create a window at all
Brian Roberts 4 년 전
부모
커밋
86a8fb5854
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp

+ 7 - 0
Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp

@@ -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);