Add RARCH_CMD_LOAD_CONTENT

This commit is contained in:
twinaphex 2014-07-22 03:12:56 +02:00
parent 304af2f398
commit 78610e4d90
5 changed files with 17 additions and 8 deletions

View File

@ -210,7 +210,7 @@ static char** waiting_argv;
if (core_name)
{
strlcpy(g_extern.fullpath, self.file.UTF8String, sizeof(g_extern.fullpath));
load_menu_game_new_core();
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
}
else
[self chooseCore];
@ -241,7 +241,7 @@ static char** waiting_argv;
if (core_name)
{
strlcpy(g_extern.fullpath, self.file.UTF8String, sizeof(g_extern.fullpath));
load_menu_game_new_core();
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
}
else
[self performSelector:@selector(chooseCore) withObject:nil afterDelay:.5f];

View File

@ -2618,7 +2618,7 @@ static int menu_common_iterate(unsigned action)
{
strlcpy(g_settings.libretro, path, sizeof(g_settings.libretro));
strlcpy(g_extern.fullpath, driver.menu->deferred_path, sizeof(g_extern.fullpath));
load_menu_game_new_core();
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
driver.menu->msg_force = true;
ret = -1;
menu_flush_stack_type(MENU_SETTINGS);

View File

@ -672,10 +672,9 @@ static void process_pending_intent(void *data)
if (startgame)
{
RARCH_LOG("Starting new game %s ...\n", g_extern.fullpath);
g_extern.lifecycle_state &= ~(1ULL << MODE_MENU_PREINIT);
g_extern.lifecycle_state &= ~(1ULL << MODE_GAME);
load_menu_game_new_core();
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
}
CALL_VOID_METHOD(env, android_app->activity->clazz, android_app->clearPendingIntent);

View File

@ -90,9 +90,10 @@ extern "C" {
enum basic_event
{
RARCH_CMD_RESET = 1,
RARCH_CMD_LOAD_CONTENT,
RARCH_CMD_LOAD_STATE,
RARCH_CMD_SAVE_STATE,
RARCH_CMD_QUIT
RARCH_CMD_QUIT,
};
enum menu_enums

View File

@ -40,6 +40,10 @@
#include "input/input_common.h"
#include "git_version.h"
#ifdef HAVE_MENU
#include "frontend/menu/menu_common.h"
#endif
#ifdef _WIN32
#ifdef _XBOX
#include <xtl.h>
@ -3085,12 +3089,17 @@ void rarch_main_command(unsigned action)
{
switch (action)
{
case RARCH_CMD_RESET:
rarch_game_reset();
case RARCH_CMD_LOAD_CONTENT:
#ifdef HAVE_MENU
load_menu_game_new_core();
#endif
break;
case RARCH_CMD_LOAD_STATE:
rarch_load_state();
break;
case RARCH_CMD_RESET:
rarch_game_reset();
break;
case RARCH_CMD_SAVE_STATE:
rarch_save_state();
break;