mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 04:14:05 +00:00
Add error handling for SDL_CreateWindow
This commit is contained in:
parent
9c693d078b
commit
5b2633588c
@ -130,6 +130,8 @@ void OgreRenderer::createWindow(const std::string &title, const WindowSettings&
|
||||
SDL_WINDOW_SHOWN
|
||||
| (settings.fullscreen ? SDL_WINDOW_FULLSCREEN : 0) | SDL_WINDOW_RESIZABLE
|
||||
);
|
||||
if (mSDLWindow == 0)
|
||||
throw std::runtime_error("Failed to create window: " + std::string(SDL_GetError()));
|
||||
|
||||
SFO::SDLWindowHelper helper(mSDLWindow, settings.window_x, settings.window_y, title, settings.fullscreen, params);
|
||||
if (settings.icon != "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user