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:
fatratknight 2010-04-26 01:58:49 +00:00
parent d5fa95c276
commit 45c10c1e23
3 changed files with 2 additions and 8 deletions

View File

@ -323,15 +323,10 @@ void FCEUD_UpdateInput()
bool joy=false,mouse=false;
EMOVIEMODE FCEUMOVState = FCEUMOV_Mode();
extern bool justloadedstate;
if(((FCEUMOVState != MOVIEMODE_PLAY) && (FCEUMOVState != MOVIEMODE_RECORD)) || !justloadedstate) {
KeyboardUpdateState();
UpdateJoysticks();
HandleHotkeys();
}
justloadedstate = false;
{
for(int x=0;x<2;x++)

View File

@ -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 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 justloadedstate = false;
FCEUGI::FCEUGI()
: filename(0)

View File

@ -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.
extern void FCEUD_UpdateInput(void);
FCEUD_UpdateInput();
/*extern void FCEUD_UpdateInput(void); FatRatKnight: What's this call doing here?
FCEUD_UpdateInput(); I commented it out. Should we delete it?*/
extern SFORMAT FCEUCTRL_STATEINFO[];
uint8 buttons = ((uint8 *) FCEUCTRL_STATEINFO[1].v)[which - 1];