Be more descriptive about error (#26033)

This commit is contained in:
Michał Janiszewski
2026-02-15 21:15:07 +01:00
committed by GitHub
parent 92d5574ffb
commit 43c8fd70f6
+5 -1
View File
@@ -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();