Fix attempt #2 of a desync under high lua load, joypad.get, and a stateload from the user. Removed a call to FCEUD_UpdateInput, that's the whole fix. I mostly undid ugetab's recent changes in this change.
This commit is contained in:
parent
d5fa95c276
commit
45c10c1e23
|
@ -323,15 +323,10 @@ void FCEUD_UpdateInput()
|
||||||
bool joy=false,mouse=false;
|
bool joy=false,mouse=false;
|
||||||
EMOVIEMODE FCEUMOVState = FCEUMOV_Mode();
|
EMOVIEMODE FCEUMOVState = FCEUMOV_Mode();
|
||||||
|
|
||||||
extern bool justloadedstate;
|
|
||||||
if(((FCEUMOVState != MOVIEMODE_PLAY) && (FCEUMOVState != MOVIEMODE_RECORD)) || !justloadedstate) {
|
|
||||||
KeyboardUpdateState();
|
KeyboardUpdateState();
|
||||||
UpdateJoysticks();
|
UpdateJoysticks();
|
||||||
|
|
||||||
HandleHotkeys();
|
HandleHotkeys();
|
||||||
}
|
|
||||||
justloadedstate = false;
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
for(int x=0;x<2;x++)
|
for(int x=0;x<2;x++)
|
||||||
|
|
|
@ -81,7 +81,6 @@ bool justLagged = false;
|
||||||
bool frameAdvanceLagSkip = false; //If this is true, frame advance will skip over lag frame (i.e. it will emulate 2 frames instead of 1)
|
bool frameAdvanceLagSkip = false; //If this is true, frame advance will skip over lag frame (i.e. it will emulate 2 frames instead of 1)
|
||||||
bool AutoSS = false; //Flagged true when the first auto-savestate is made while a game is loaded, flagged false on game close
|
bool AutoSS = false; //Flagged true when the first auto-savestate is made while a game is loaded, flagged false on game close
|
||||||
bool movieSubtitles = true; //Toggle for displaying movie subtitles
|
bool movieSubtitles = true; //Toggle for displaying movie subtitles
|
||||||
bool justloadedstate = false;
|
|
||||||
|
|
||||||
FCEUGI::FCEUGI()
|
FCEUGI::FCEUGI()
|
||||||
: filename(0)
|
: filename(0)
|
||||||
|
|
|
@ -2116,8 +2116,8 @@ static int joy_get_internal(lua_State *L, bool reportUp, bool reportDown) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the OS-specific code to do the reading.
|
// Use the OS-specific code to do the reading.
|
||||||
extern void FCEUD_UpdateInput(void);
|
/*extern void FCEUD_UpdateInput(void); FatRatKnight: What's this call doing here?
|
||||||
FCEUD_UpdateInput();
|
FCEUD_UpdateInput(); I commented it out. Should we delete it?*/
|
||||||
extern SFORMAT FCEUCTRL_STATEINFO[];
|
extern SFORMAT FCEUCTRL_STATEINFO[];
|
||||||
uint8 buttons = ((uint8 *) FCEUCTRL_STATEINFO[1].v)[which - 1];
|
uint8 buttons = ((uint8 *) FCEUCTRL_STATEINFO[1].v)[which - 1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue