Move S9xMovieUpdate to start of next frame.

This commit is contained in:
Brandon Wright 2018-12-12 12:36:56 -06:00
parent a718990735
commit bb66278585
2 changed files with 16 additions and 12 deletions

View File

@ -3321,8 +3321,6 @@ void S9xControlEOF (void)
do_polling(POLL_ALL);
S9xMovieUpdate();
pad_read_last = pad_read;
pad_read = false;
}

View File

@ -11,6 +11,7 @@
#include "apu/apu.h"
#include "fxemu.h"
#include "snapshot.h"
#include "movie.h"
#ifdef DEBUGGER
#include "debug.h"
#include "missing.h"
@ -18,7 +19,6 @@
static inline void S9xReschedule (void);
void S9xMainLoop (void)
{
#define CHECK_FOR_IRQ_CHANGE() \
@ -31,6 +31,12 @@ void S9xMainLoop (void)
Timings.IRQFlagChanging = IRQ_NONE; \
}
if (CPU.Flags & SCAN_KEYS_FLAG)
{
CPU.Flags &= ~SCAN_KEYS_FLAG;
S9xMovieUpdate();
}
for (;;)
{
if (CPU.NMIPending)
@ -120,7 +126,16 @@ void S9xMainLoop (void)
#endif
if (CPU.Flags & SCAN_KEYS_FLAG)
{
#ifdef DEBUGGER
if (!(CPU.Flags & FRAME_ADVANCE_FLAG))
#endif
{
S9xSyncSpeed();
}
break;
}
uint8 Op;
struct SOpcodes *Opcodes;
@ -155,15 +170,6 @@ void S9xMainLoop (void)
}
S9xPackStatus();
if (CPU.Flags & SCAN_KEYS_FLAG)
{
#ifdef DEBUGGER
if (!(CPU.Flags & FRAME_ADVANCE_FLAG))
#endif
S9xSyncSpeed();
CPU.Flags &= ~SCAN_KEYS_FLAG;
}
}
static inline void S9xReschedule (void)