summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2022-09-08 19:05:16 -0400
committerGitHub <noreply@github.com>2022-09-08 19:05:16 -0400
commit4d81c287382559cd1e532963b4ce067ddfe5689b (patch)
tree428ddd9655cf893f48b958eb89c6df205a234a9a
parent3b844375b799eb80e49a7b17fd80207fb886ef54 (diff)
boxes (#1428)
-rw-r--r--libultraship/libultraship/CrashHandler.cpp5
-rw-r--r--libultraship/libultraship/Window.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/libultraship/libultraship/CrashHandler.cpp b/libultraship/libultraship/CrashHandler.cpp
index f454ddfdc..13c746027 100644
--- a/libultraship/libultraship/CrashHandler.cpp
+++ b/libultraship/libultraship/CrashHandler.cpp
@@ -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);
}
diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp
index 36a10b505..ec97a71ad 100644
--- a/libultraship/libultraship/Window.cpp
+++ b/libultraship/libultraship/Window.cpp
@@ -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);