Close game window on error (mentioned in #570)
Otherwise, the error doesn't show up and the game appears to freeze in fullscreen modemaster
parent
8421189716
commit
9d6543a947
|
@ -97,6 +97,12 @@ void CSignalHandlers::ReportError(const std::string& errorMessage)
|
||||||
{
|
{
|
||||||
static bool triedSaving = false;
|
static bool triedSaving = false;
|
||||||
|
|
||||||
|
if (SDL_WasInit(SDL_INIT_VIDEO))
|
||||||
|
{
|
||||||
|
// Close the SDL window on crash, because otherwise the error doesn't show on in fullscreen mode and the game appears to freeze
|
||||||
|
SDL_Quit();
|
||||||
|
}
|
||||||
|
|
||||||
std::stringstream msg;
|
std::stringstream msg;
|
||||||
msg << "Unhandled exception occured!" << std::endl;
|
msg << "Unhandled exception occured!" << std::endl;
|
||||||
msg << "==============================" << std::endl;
|
msg << "==============================" << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue