This commit is contained in:
louist103 2022-09-08 19:05:16 -04:00 committed by GitHub
parent 3b844375b7
commit 4d81c28738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -12,6 +12,7 @@ extern "C" void DeinitOTR(void);
#include <dlfcn.h> // for dladdr
#include <execinfo.h>
#include <unistd.h>
#include <SDL.h>
@ -135,9 +136,11 @@ static void ErrorHandler(int sig, siginfo_t* sigInfo, void* data) {
SPDLOG_CRITICAL("{} {}", i, functionName.c_str());
}
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "SoH has crashed", "SoH Has crashed. Please upload the logs to the support channel in discord.", nullptr);
free(symbols);
DeinitOTR();
Ship::Window::GetInstance()->GetLogger()->flush();
spdlog::shutdown();
exit(1);
}

View File

@ -540,13 +540,12 @@ namespace Ship {
if (!ResMan->DidLoadSuccessfully())
{
#ifdef _WIN32
MessageBox(nullptr, L"Main OTR file not found!", L"Uh oh", MB_OK);
#elif defined(__SWITCH__)
#if defined(__SWITCH__)
printf("Main OTR file not found!\n");
#elif defined(__WIIU__)
Ship::WiiU::ThrowMissingOTR(MainPath.c_str());
#else
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "OTR file not found", "Main OTR file not found. Please generate one", nullptr);
SPDLOG_ERROR("Main OTR file not found!");
#endif
exit(1);