summaryrefslogtreecommitdiff
path: root/ZAPD/Main.cpp
diff options
context:
space:
mode:
authorlouist103 <louist103@gmail.com>2022-10-25 11:59:52 -0400
committerlouist103 <louist103@gmail.com>2022-10-25 11:59:52 -0400
commitd79e0fbfab492dc22fa0fa8fecaa2bdba77d6b4f (patch)
tree77b328fcc1e5b7a860655b98c5cba473cdbdd5f1 /ZAPD/Main.cpp
parent78fdac56498f674eba2692e075d415a12cb4a31f (diff)
Cleanup crash handler.
Diffstat (limited to 'ZAPD/Main.cpp')
-rw-r--r--ZAPD/Main.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/ZAPD/Main.cpp b/ZAPD/Main.cpp
index a7b9660..2563154 100644
--- a/ZAPD/Main.cpp
+++ b/ZAPD/Main.cpp
@@ -24,7 +24,7 @@ void BuildAssetBlob(const fs::path& blobFilePath, const fs::path& outPath);
extern const char gBuildHash[];
-int Main(int argc, char* argv[])
+int main(int argc, char* argv[])
{
// Syntax: ZAPD.out [mode (btex/bovl/e)] (Arbritrary Number of Arguments)
@@ -116,14 +116,7 @@ int Main(int argc, char* argv[])
}
else if (arg == "-eh") // Enable Error Handler
{
-#if HAS_POSIX == 1
- signal(SIGSEGV, ErrorHandler);
- signal(SIGABRT, ErrorHandler);
-#elif !defined(_MSC_VER)
- HANDLE_WARNING(WarningType::Always,
- "tried to set error handler, but this ZAPD build lacks support for one",
- "");
-#endif
+ CrashHandler_Init();
}
else if (arg == "-v") // Verbose
{
@@ -246,23 +239,6 @@ int Main(int argc, char* argv[])
return 0;
}
-// Windows doesn't make it easy to get a stack trace from just a signal. So we need to do this messy
-// stuff for just windows.
-int main(int argc, char* argv[])
-{
-#ifdef _MSC_VER
- __try
- {
- return Main(argc, argv);
- }
- __except (seh_filter(GetExceptionInformation()))
- {
- }
-#else
- return Main(argc, argv);
-#endif
-}
-
bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath,
ZFileMode fileMode)
{