aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwinaphex2017-01-22 21:30:05 +0100
committerGitHub2017-01-22 21:30:05 +0100
commit9357cf3b9fe9d20527ba61cee5d770a6dd8c3d8d (patch)
tree2dfe21f497359295e9d8d34aa571fd9687d55e10
parentabaa8b9e916f689ba162a684c2e23890cea7d6da (diff)
parent726da67c8bd8163a9b5a67f36c7e715f021df7df (diff)
downloadpcsx_rearmed-9357cf3b9fe9d20527ba61cee5d770a6dd8c3d8d.tar.gz
pcsx_rearmed-9357cf3b9fe9d20527ba61cee5d770a6dd8c3d8d.tar.bz2
pcsx_rearmed-9357cf3b9fe9d20527ba61cee5d770a6dd8c3d8d.zip
Merge pull request #94 from meepingsnesroms/master
Fix crash on restart from menu
-rw-r--r--frontend/libretro.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index 08ef052..06043e9 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -39,6 +39,9 @@
#define PORTS_NUMBER 8
+//hack to prevent retroarch freezing when reseting in the menu but not while running with the hot key
+int rebootemu = 0;
+
static retro_video_refresh_t video_cb;
static retro_input_poll_t input_poll_cb;
static retro_input_state_t input_state_cb;
@@ -1282,7 +1285,9 @@ size_t retro_get_memory_size(unsigned id)
void retro_reset(void)
{
- SysReset();
+ //hack to prevent retroarch freezing when reseting in the menu but not while running with the hot key
+ rebootemu = 1;
+ //SysReset();
}
static const unsigned short retro_psx_map[] = {
@@ -1475,6 +1480,11 @@ static int min(int a, int b)
void retro_run(void)
{
int i;
+ //SysReset must be run while core is running,Not in menu (Locks up Retroarch)
+ if(rebootemu != 0){
+ rebootemu = 0;
+ SysReset();
+ }
input_poll_cb();