no message
This commit is contained in:
parent
a726b30d84
commit
c18505b4d0
|
@ -1349,6 +1349,10 @@ static void onConsoleExportHtmlCommand(Console* console, const char* name)
|
|||
|
||||
static void* embedCart(Console* console, s32* size)
|
||||
{
|
||||
tic_mem* tic = console->tic;
|
||||
|
||||
if(processDoFile())
|
||||
{
|
||||
void* data = fsReadFile(console->appPath, size);
|
||||
|
||||
if(data)
|
||||
|
@ -1358,13 +1362,17 @@ static void* embedCart(Console* console, s32* size)
|
|||
if(start)
|
||||
{
|
||||
embed.yes = true;
|
||||
memcpy(&embed.file, &console->tic->cart, sizeof(tic_cartridge));
|
||||
memcpy(start, &embed, sizeof(embed));
|
||||
SDL_memcpy(&embed.file, &tic->cart, sizeof(tic_cartridge));
|
||||
SDL_memcpy(embed.file.code.data, tic->code.data, sizeof(tic_code));
|
||||
SDL_memcpy(start, &embed, sizeof(embed));
|
||||
embed.yes = false;
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
|
|
|
@ -89,8 +89,6 @@ static const char* getPMemName(Run* run)
|
|||
|
||||
static void tick(Run* run)
|
||||
{
|
||||
// tic_mem* tic = run->tic;
|
||||
|
||||
while(pollEvent());
|
||||
|
||||
if (getStudioMode() != TIC_RUN_MODE)
|
||||
|
@ -98,7 +96,7 @@ static void tick(Run* run)
|
|||
|
||||
if(!run->init)
|
||||
{
|
||||
if(processDoFile())
|
||||
if(!processDoFile())
|
||||
return;
|
||||
|
||||
run->tickData.start = run->tickData.counter(),
|
||||
|
|
|
@ -1411,6 +1411,11 @@ static void api_tick(tic_mem* memory, tic_tick_data* data)
|
|||
else if(!initLua(machine, code))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
machine->data->error(machine->data->data, "the code is empty");
|
||||
return;
|
||||
}
|
||||
|
||||
machine->state.scanline = memory->script == tic_script_js ? callJavascriptScanline : callLuaScanline;
|
||||
machine->state.initialized = true;
|
||||
|
|
Loading…
Reference in New Issue