port: allow running without a crash handler

--no-crash-handler
This commit is contained in:
fgsfds committed 2023-10-19 12:30:50 +02:00
1 parent ba51e9d5d1
commit b8e6e19ef5
3 files changed
+15 -6

No files matched your search

+2 -1
View File
@@ -13,7 +13,8 @@ enum LogLevel {
LOG_ERROR,
};
void sysInit(s32 argc, const char **argv);
void sysInitArgs(s32 argc, const char **argv);
void sysInit(void);
s32 sysArgCheck(const char *arg);
const char *sysArgGetString(const char *arg);
+7 -2
View File
@@ -85,8 +85,13 @@ static void gameLoadConfig(void)
int main(int argc, const char **argv)
{
crashInit();
sysInit(argc, argv);
sysInitArgs(argc, argv);
if (!sysArgCheck("--no-crash-handler")) {
crashInit();
}
sysInit();
fsInit();
configInit();
videoInit();
+6 -3
View File
@@ -19,12 +19,15 @@ static char logPath[2048];
static s32 sysArgc;
static const char **sysArgv;
void sysInit(s32 argc, const char **argv)
void sysInitArgs(s32 argc, const char **argv)
{
startTick = sysGetMicroseconds();
sysArgc = argc;
sysArgv = argv;
}
void sysInit(void)
{
startTick = sysGetMicroseconds();
if (sysArgCheck("--log")) {
// figure out where the log is and clear it