From 43c8fd70f6ecde52f7ace39c04ae29e40ea75747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 15 Feb 2026 21:15:07 +0100 Subject: [PATCH] Be more descriptive about error (#26033) --- src/openrct2-ui/UiContext.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index a9e578170e..672f51a375 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -816,7 +816,11 @@ private: _window = SDL_CreateWindow(OPENRCT2_NAME, windowPos.x, windowPos.y, width, height, flags); if (_window == nullptr) { - SDLException::Throw("SDL_CreateWindow(...)"); + const char* error = SDL_GetError(); + std::string errorMessage = String::stdFormat( + "SDL_CreateWindow(" OPENRCT2_NAME ", %d, %d, %d, %d, %d) failed: %s", windowPos.x, windowPos.y, width, height, + flags, error); + SDLException::Throw(errorMessage.c_str()); } ApplyScreenSaverLockSetting();