Adding input callback

This commit is contained in:
Sergio Martin 2025-01-28 18:16:44 +01:00
parent 61ff28710c
commit 7fa7b0979d
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <stdexcept>
#include <string>
#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;