mirror of https://github.com/snes9xgit/snes9x.git
Change the reset timing of pad_read to resolve a sort of traditional 1-frame delay problems. It still has 1-frame delay problem. However, unless you're using non-Windows port or MessagesInImage=TRUE, you shouldn't experience it anymore.
For me, it's not so easy to solve those traditional timing issues... Add IPPU.InMainLoop for future use.
This commit is contained in:
parent
d11b17327c
commit
d5945b06de
|
@ -3320,12 +3320,6 @@ void S9xControlEOF (void)
|
|||
do_polling(POLL_ALL);
|
||||
|
||||
S9xMovieUpdate();
|
||||
|
||||
if(!pad_read)
|
||||
IPPU.PadIgnoredFrames++;
|
||||
|
||||
pad_read_last = pad_read;
|
||||
pad_read = false;
|
||||
}
|
||||
|
||||
void S9xSetControllerCrosshair (enum crosscontrols ctl, int8 idx, const char *fg, const char *bg)
|
||||
|
|
24
cpuexec.cpp
24
cpuexec.cpp
|
@ -188,11 +188,15 @@
|
|||
#include "missing.h"
|
||||
#endif
|
||||
|
||||
static inline void StartS9xMainLoop (void);
|
||||
static inline void EndS9xMainLoop (void);
|
||||
static inline void S9xReschedule (void);
|
||||
|
||||
|
||||
void S9xMainLoop (void)
|
||||
{
|
||||
StartS9xMainLoop();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (CPU.NMILine)
|
||||
|
@ -308,6 +312,26 @@ void S9xMainLoop (void)
|
|||
S9xSyncSpeed();
|
||||
CPU.Flags &= ~SCAN_KEYS_FLAG;
|
||||
}
|
||||
|
||||
EndS9xMainLoop();
|
||||
}
|
||||
|
||||
static inline void StartS9xMainLoop (void)
|
||||
{
|
||||
extern bool8 pad_read, pad_read_last;
|
||||
pad_read_last = pad_read;
|
||||
pad_read = FALSE;
|
||||
|
||||
IPPU.InMainLoop = TRUE;
|
||||
}
|
||||
|
||||
static inline void EndS9xMainLoop (void)
|
||||
{
|
||||
extern bool8 pad_read;
|
||||
if(!pad_read)
|
||||
IPPU.PadIgnoredFrames++;
|
||||
|
||||
IPPU.InMainLoop = FALSE;
|
||||
}
|
||||
|
||||
static inline void S9xReschedule (void)
|
||||
|
|
Loading…
Reference in New Issue