Add RETRO_ENVIRONMENT_EXEC_ESCAPE -yes, I need this - when we are in

retro_run - we need to escape first before we can get the next libretro
core with input data running. This is not needed when we do exec without
being in the main program loop. Anyway, one does not work for the other -
so we need both.
This commit is contained in:
twinaphex 2013-08-25 19:42:24 +02:00
parent 6a3303d2b4
commit 95f5e6aa96
3 changed files with 14 additions and 4 deletions

View File

@ -766,7 +766,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_EXEC:
RARCH_LOG("Environ (Private) EXEC.\n");
case RETRO_ENVIRONMENT_EXEC_ESCAPE:
if (data)
strlcpy(g_extern.fullpath, (const char*)data, sizeof(g_extern.fullpath));
@ -780,7 +780,14 @@ bool rarch_environment_cb(unsigned cmd, void *data)
#elif defined(HAVE_DYNAMIC)
g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_GAME);
#endif
g_extern.exec = true;
if (cmd == RETRO_ENVIRONMENT_EXEC_ESCAPE)
{
RARCH_LOG("Environ (Private) EXEC_ESCAPE.\n");
g_extern.exec = true;
}
else
RARCH_LOG("Environ (Private) EXEC.\n");
break;

View File

@ -35,6 +35,11 @@
// const char * --
// Requests that this core is deinitialized, and a new core is loaded.
// The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game.
#define RETRO_ENVIRONMENT_EXEC_ESCAPE (RETRO_ENVIRONMENT_PRIVATE | 2)
// const char * --
// Requests that this core is deinitialized, and a new core is loaded. It also escapes the main loop the core is currently
// bound to.
// The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game.
#endif

View File

@ -2719,7 +2719,6 @@ static void do_state_checks(void)
if (!g_extern.netplay)
{
#endif
#if !defined(RARCH_PERFORMANCE_MODE)
check_pause();
check_oneshot();
@ -2728,7 +2727,6 @@ static void do_state_checks(void)
if (g_extern.is_paused && !g_extern.is_oneshot)
return;
#endif
check_fast_forward_button();