mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2026-05-06 07:56:46 -04:00
Be more descriptive about error (#26033)
This commit is contained in:
committed by
GitHub
parent
92d5574ffb
commit
43c8fd70f6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user