Create frontend_driver_set_fork

This commit is contained in:
twinaphex 2015-12-05 07:57:45 +01:00
parent f38cdd1a64
commit 26cd1a3702
4 changed files with 14 additions and 4 deletions

View File

@ -1332,8 +1332,7 @@ bool event_command(enum event_command cmd)
fill_pathname_join(new_path, g_defaults.dir.core, SALAMANDER_FILE, sizeof(new_path));
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, new_path);
#endif
if (driver->frontend_ctx && driver->frontend_ctx->set_fork)
driver->frontend_ctx->set_fork(true, false);
frontend_driver_set_fork(true, false);
}
break;
case EVENT_CMD_MENU_SAVE_CURRENT_CONFIG:

View File

@ -1303,8 +1303,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
}
#if defined(RARCH_CONSOLE)
if (driver->frontend_ctx && driver->frontend_ctx->set_fork)
driver->frontend_ctx->set_fork(true, true);
frontend_driver_set_fork(true, true);
#elif defined(HAVE_DYNAMIC)
rarch_ctl(RARCH_CTL_LOAD_CONTENT, NULL);
#endif

View File

@ -128,4 +128,13 @@ void frontend_driver_content_loaded(void)
return;
frontend->content_loaded();
}
void frontend_driver_set_fork(bool a, bool b)
{
frontend_ctx_driver_t *frontend = frontend_get_ptr();
if (!frontend || !frontend->set_fork)
return;
frontend->set_fork(a, b);
}
#endif

View File

@ -18,6 +18,7 @@
#define __FRONTEND_DRIVER_H
#include <stddef.h>
#include <boolean.h>
#ifdef HAVE_CONFIG_H
@ -113,6 +114,8 @@ int frontend_driver_parse_drive_list(void *data);
void frontend_driver_content_loaded(void);
void frontend_driver_set_fork(bool a, bool b);
#ifdef __cplusplus
}
#endif