Skip to content

Commit 548399c

Browse files
committed
fixed cart loading in cli mode
1 parent 981d415 commit 548399c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/studio/screens/console.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "studio/config.h"
2929
#include "ext/png.h"
3030
#include "ext/json.h"
31-
// #include "zip.h"
3231
#include "retro_endianness.h"
3332

3433
#if defined(TIC80_PRO)
@@ -4314,7 +4313,11 @@ static void tick(Console* console)
43144313
}
43154314
else
43164315
{
4317-
runGame(console->studio);
4316+
if(!console->args.cli)
4317+
{
4318+
runGame(console->studio);
4319+
}
4320+
43184321
commandDone(console);
43194322
}
43204323
}
@@ -4338,6 +4341,7 @@ static void tick(Console* console)
43384341

43394342
tic_api_cls(tic, TIC_COLOR_BG);
43404343
drawConsoleText(console);
4344+
console->tickCounter++;
43414345

43424346
{
43434347
if(console->cursor.delay)
@@ -4364,7 +4368,6 @@ static void tick(Console* console)
43644368
}
43654369
}
43664370

4367-
console->tickCounter++;
43684371
}
43694372

43704373
static inline bool isslash(char c)

src/system/sokol/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,6 @@ static void init(void *userdata)
468468
#endif
469469
});
470470

471-
stm_setup();
472-
473471
app->image = sg_make_image(&(sg_image_desc)
474472
{
475473
.width = TIC80_FULLWIDTH,
@@ -1044,6 +1042,8 @@ void force_exit()
10441042

10451043
sapp_desc sokol_start(s32 argc, char* argv[])
10461044
{
1045+
stm_setup();
1046+
10471047
App *app = NEW(App);
10481048
memset(app, 0, sizeof *app);
10491049

@@ -1059,7 +1059,7 @@ sapp_desc sokol_start(s32 argc, char* argv[])
10591059
if(!cli)
10601060
{
10611061
app->audio.desc.num_channels = TIC80_SAMPLE_CHANNELS;
1062-
saudio_setup(&app->audio.desc);
1062+
saudio_setup(&app->audio.desc);
10631063
}
10641064

10651065
const char* path = ssys_app_folder(TIC_PACKAGE, TIC_NAME);

0 commit comments

Comments
 (0)