From 7fa7b0979d6413bf6a457339b5d4243f0cbeb9b2 Mon Sep 17 00:00:00 2001 From: Sergio Martin Date: Tue, 28 Jan 2025 18:16:44 +0100 Subject: [PATCH] Adding input callback --- source/quickerNES/core/core.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/quickerNES/core/core.hpp b/source/quickerNES/core/core.hpp index afc13fb..cf2c8bd 100644 --- a/source/quickerNES/core/core.hpp +++ b/source/quickerNES/core/core.hpp @@ -26,6 +26,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include +#ifdef QUICKERNES_ENABLE_INPUT_CALLBACK +extern void (*input_callback_cb)(void); +#endif + namespace quickerNES { @@ -844,6 +848,10 @@ class Core : private Cpu input_state.arkanoid_latch = current_arkanoid_latch; input_state.arkanoid_fire = current_arkanoid_fire; #endif + + #ifdef QUICKERNES_ENABLE_INPUT_CALLBACK + input_callback_cb(); + #endif } input_state.w4016 = data; return;