From 44563686324b75236f225a2f4f8504d0aedf6442 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 12 May 2010 13:06:23 +0000 Subject: [PATCH] Loadstate now updates input display even with no movie loaded. --- changelog.txt | 2 +- src/state.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index cad5d32d..170a174d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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. diff --git a/src/state.cpp b/src/state.cpp index 212d0f92..675e5cf1 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -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; }