diff --git a/output/dll/pce.wbx.gz b/output/dll/pce.wbx.gz index 995d692d43..5c567085c1 100644 Binary files a/output/dll/pce.wbx.gz and b/output/dll/pce.wbx.gz differ diff --git a/waterbox/nyma/NymaCore.cpp b/waterbox/nyma/NymaCore.cpp index 1cc35b9bee..a838eef6f9 100644 --- a/waterbox/nyma/NymaCore.cpp +++ b/waterbox/nyma/NymaCore.cpp @@ -27,6 +27,7 @@ enum { MAX_PORT_DATA = 16 }; static uint8_t InputPortData[(MAX_PORTS + 1) * MAX_PORT_DATA]; bool LagFlag; +void (*InputCallback)(); ECL_EXPORT void PreInit() { @@ -195,7 +196,9 @@ ECL_EXPORT void SetLayers(uint64_t layers) } ECL_EXPORT void SetInputCallback(void (*cb)()) -{} +{ + InputCallback = cb; +} // same information as PortInfo, but easier to marshal struct NPortInfo diff --git a/waterbox/nyma/common/nyma.h b/waterbox/nyma/common/nyma.h index a1bb05a8b9..c16f96a3ab 100644 --- a/waterbox/nyma/common/nyma.h +++ b/waterbox/nyma/common/nyma.h @@ -15,3 +15,4 @@ struct CheatArea CheatArea* FindCheatArea(uint32_t address); extern bool LagFlag; +extern void (*InputCallback)(); diff --git a/waterbox/nyma/pce.cpp b/waterbox/nyma/pce.cpp index f53b6e1b45..33fcc92a11 100644 --- a/waterbox/nyma/pce.cpp +++ b/waterbox/nyma/pce.cpp @@ -56,6 +56,8 @@ namespace MDFN_IEN_PCE uint8 INPUT_Read(int32 timestamp, unsigned int A) { LagFlag = false; + if (InputCallback) + InputCallback(); return ZZINPUT_Read(timestamp, A); } }