From 55a6728db231024276a0680734638c2bc81a351f Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Tue, 21 Nov 2017 20:04:04 +0300 Subject: [PATCH] added live cart reloading #374 --- src/console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/console.c b/src/console.c index 8f06b81..4e479c4 100644 --- a/src/console.c +++ b/src/console.c @@ -53,6 +53,7 @@ static struct char prefix[32]; bool yes; bool fast; + bool cmd; bool menu; tic_cartridge file; } embed = @@ -60,6 +61,7 @@ static struct .prefix = "C8B39163816B47209E721136D37B8031", .yes = false, .fast = false, + .cmd = false, }; static const char DefaultLuaTicPath[] = TIC_LOCAL "default.tic"; @@ -2541,7 +2543,7 @@ static void tick(Console* console) { if(console->tickCounter >= (u32)(embed.fast ? 1 : TIC_FRAMERATE)) { - if(!embed.fast) + if(!embed.fast && !embed.cmd) console->showGameMenu = true; memcpy(&console->tic->cart, &embed.file, sizeof(tic_cartridge)); @@ -2599,6 +2601,7 @@ static void cmdLoadCart(Console* console, const char* name) strcpy(console->romName, fsFilename(name)); embed.yes = true; + embed.cmd = true; SDL_free(data); }