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