Loadstate now updates input display even with no movie loaded.

This commit is contained in:
adelikat 2010-05-12 13:06:23 +00:00
parent 14d628ff81
commit 4456368632
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
11-may-2010 - 10-may-2010 - adelikat - Loadstate updates input display
11-may-2010 - ugetab - Win32 - Added Ram Search hotkeys for the first 6 search types in the list.
10-may-2010 - adelikat - Loadstate while movie is loaded updates input display
10-may-2010 - ugetab - Added gui.getpixel() which gets any gui.pixel() set pixel colors, and possibly other functions. Added emu.getscreenpixel() which gets the RGB and Palette of any pixel on the screen.
08-may-2010 - ugetab - Added savestate.object() which is savestate.create() with intuitive numbering under windows
08-may-2010 - ugetab - Added emu.addgamegenie() and emu.delgamegenie() LUA functions.

View File

@ -775,8 +775,11 @@ bool FCEUSS_Load(const char *fname)
//Update input display if movie is loaded
extern uint32 cur_input_display;
if (FCEUMOV_Mode(MOVIEMODE_RECORD) || FCEUMOV_Mode(MOVIEMODE_PLAY))
extern uint8 FCEU_GetJoyJoy(void);
if (FCEUMOV_Mode(MOVIEMODE_RECORD) || FCEUMOV_Mode(MOVIEMODE_PLAY)) //adelikat: just doing GetJoyJoy regardless should work, but I just felt conceptually movies should be relying on movie data. There might be some fringe cases where this is necessary.
memcpy(&cur_input_display,currMovieData.records[currFrameCounter-1].joysticks.data,4);
else
cur_input_display = FCEU_GetJoyJoy();
return true;
}