From ef0efecc9c295613bdd3c93ee1670868b6dc9ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 7 Apr 2013 13:12:37 +0200 Subject: [PATCH] Platform: fixed Sdl2Application::tryCreateContext(). It seems that the context is negotiated when creating the window, thus it fails there and not later when actually creating the context. --- src/Platform/Sdl2Application.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Platform/Sdl2Application.cpp b/src/Platform/Sdl2Application.cpp index 8289ab5dd..2470d6639 100644 --- a/src/Platform/Sdl2Application.cpp +++ b/src/Platform/Sdl2Application.cpp @@ -93,10 +93,8 @@ bool Sdl2Application::tryCreateContext(Configuration* configuration) { if(!(window = SDL_CreateWindow(configuration->title().c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, configuration->size().x(), configuration->size().y(), - SDL_WINDOW_OPENGL|flags))) { - Error() << "Platform::Sdl2Application::tryCreateContext(): cannot create window:" << SDL_GetError(); - std::exit(2); - } + SDL_WINDOW_OPENGL|flags))) + return false; if(!(context = SDL_GL_CreateContext(window))) { SDL_DestroyWindow(window);