Add command line flag to start in surf mode #397
This commit is contained in:
parent
20d0950dca
commit
39703b5d5e
|
@ -2550,6 +2550,7 @@ static void tick(Console* console)
|
|||
printLine(console);
|
||||
commandDone(console);
|
||||
console->active = true;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2564,6 +2565,12 @@ static void tick(Console* console)
|
|||
}
|
||||
|
||||
console->tickCounter++;
|
||||
|
||||
if(console->startSurf)
|
||||
{
|
||||
console->startSurf = false;
|
||||
gotoSurf();
|
||||
}
|
||||
}
|
||||
|
||||
static void cmdLoadCart(Console* console, const char* name)
|
||||
|
@ -2757,6 +2764,7 @@ void initConsole(Console* console, tic_mem* tic, FileSystem* fs, Config* config,
|
|||
.colorBuffer = console->colorBuffer,
|
||||
.fs = fs,
|
||||
.showGameMenu = false,
|
||||
.startSurf = false,
|
||||
};
|
||||
|
||||
memset(console->buffer, 0, CONSOLE_BUFFER_SIZE);
|
||||
|
@ -2802,8 +2810,12 @@ void initConsole(Console* console, tic_mem* tic, FileSystem* fs, Config* config,
|
|||
}
|
||||
|
||||
for (s32 i = 1; i < argc; i++)
|
||||
{
|
||||
if(strcmp(argv[i], "-nosound") == 0)
|
||||
config->data.noSound = true;
|
||||
else if(strcmp(argv[i], "-surf") == 0)
|
||||
console->startSurf = true;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
|
|
|
@ -88,6 +88,7 @@ struct Console
|
|||
u32 tickCounter;
|
||||
bool active;
|
||||
bool showGameMenu;
|
||||
bool startSurf;
|
||||
|
||||
void(*load)(Console*, const char* name);
|
||||
bool(*loadProject)(Console*, const char* data, s32 size, tic_cartridge* dst);
|
||||
|
|
Loading…
Reference in New Issue