parent
0295f7472b
commit
287e78a5a9
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -15,3 +15,4 @@ struct CheatArea
|
|||
CheatArea* FindCheatArea(uint32_t address);
|
||||
|
||||
extern bool LagFlag;
|
||||
extern void (*InputCallback)();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue