From 091901ddfae7711953fb790f15a5b8eb2c42ed68 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Thu, 15 Feb 2018 17:06:03 +0300 Subject: [PATCH] no message --- src/run.c | 6 +++++- src/system.c | 1 + src/system.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/run.c b/src/run.c index f284578..e37d544 100644 --- a/src/run.c +++ b/src/run.c @@ -158,7 +158,11 @@ static void processDoFile(void* data, char* dst) static bool forceExit(void* data) { - return getStudioMode() != TIC_RUN_MODE; + getSystem()->poll(); + + tic_mem* tic = ((Run*)data)->tic; + + return tic->api.key(tic, tic_key_escape); } void initRun(Run* run, Console* console, tic_mem* tic) diff --git a/src/system.c b/src/system.c index 9725cc0..afa24d2 100644 --- a/src/system.c +++ b/src/system.c @@ -968,6 +968,7 @@ static System systemInterface = .openSystemPath = openSystemPath, .preseed = preseed, + .poll = pollEvent, }; #if defined(__EMSCRIPTEN__) diff --git a/src/system.h b/src/system.h index 0768788..df351f8 100644 --- a/src/system.h +++ b/src/system.h @@ -23,6 +23,7 @@ typedef struct void (*openSystemPath)(const char* path); void (*preseed)(); + void (*poll)(); } System;