diff options
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | gui/Plugin.c | 20 |
2 files changed, 20 insertions, 6 deletions
@@ -1,3 +1,9 @@ +Jun 4, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> + + * gui/Plugin.c: Hack-fixed the bug which causes crash when loading state + with dynarec CPU core. A large amount of refactor is needed for a proper + fix. + Jun 3, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> * libpcsxcore/cheat.c: Fixed endianness issue (not tested). diff --git a/gui/Plugin.c b/gui/Plugin.c index 4f9c3a3f..867fce03 100644 --- a/gui/Plugin.c +++ b/gui/Plugin.c @@ -75,8 +75,6 @@ void gpuShowPic() { } } - - void KeyStateSave(int i) { gchar *state_filename; @@ -93,10 +91,14 @@ void KeyStateLoad(int i) { state_load (state_filename); g_free (state_filename); -} + // HACKHACK: prevent crash when using recompiler due to execution not + // returned from compiled code. This WILL cause memory leak, however a + // large amount of refactor is needed for a proper fix. + if (Config.Cpu == CPU_DYNAREC) psxCpu->Execute(); +} -static short modctrl=0, modalt=0; +static short modctrl = 0, modalt = 0; /* Handle keyboard keystrokes */ void PADhandleKey(int key) { @@ -178,7 +180,7 @@ void PADhandleKey(int key) { state_save (state_filename); g_free (state_filename); - + if (ShowPic) { ShowPic = 0; gpuShowPic(); } break; @@ -191,8 +193,14 @@ void PADhandleKey(int key) { case XK_F3: state_filename = get_state_filename (StatesC); state_load (state_filename); - + g_free (state_filename); + + // HACKHACK: prevent crash when using recompiler due to execution not + // returned from compiled code. This WILL cause memory leak, however a + // large amount of refactor is needed for a proper fix. + if (Config.Cpu == CPU_DYNAREC) psxCpu->Execute(); + break; case XK_F4: gpuShowPic(); |
