(Blackberry) Starts up in RGUI mode now - should (hopefully) allow

for dynamic changing of libretro core and selection of ROM instead
of hardcoded paths.
This commit is contained in:
twinaphex 2013-03-24 01:00:00 +01:00
parent 3ad52ccfa2
commit 82329cf097
5 changed files with 20 additions and 33 deletions

View File

@ -281,7 +281,7 @@ void driver_set_monitor_refresh_rate(float hz)
void global_init_drivers(void)
{
init_drivers_pre(); // Set driver.* function callbacks.
#ifdef RARCH_CONSOLE
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
driver.video->start(); // Statically starts video driver. Sets driver.video_data.
#endif
driver.input_data = driver.input->init();

View File

@ -348,8 +348,7 @@ typedef struct video_driver
void (*free)(void *data);
const char *ident;
// Callbacks essentially useless on PC, but useful on consoles where the drivers are used for more stuff.
#ifdef RARCH_CONSOLE
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
void (*start)(void);
void (*stop)(void);
void (*restart)(void);

View File

@ -28,11 +28,13 @@ int rarch_main(int argc, char *argv[])
rarch_main_clear_state();
config_load();
global_init_drivers();
g_extern.verbose = true;
#ifdef HAVE_RGUI
menu_init();
g_extern.lifecycle_mode_state |= 1ULL << MODE_INIT;
g_extern.lifecycle_mode_state |= 1ULL << MODE_MENU;
for (;;)
{
@ -48,12 +50,16 @@ int rarch_main(int argc, char *argv[])
struct rarch_main_wrap args = {0};
args.verbose = g_extern.verbose;
args.sram_path = NULL;
args.state_path = NULL;
args.rom_path = "shared/documents/roms/snes9x-next/ChronoTrigger.smc";
args.libretro_path = "app/native/lib/test.so";
args.config_path = "app/native/retroarch.cfg";
args.verbose = g_extern.verbose;
args.sram_path = (g_extern.lifecycle_mode_state & (1ULL << MODE_LOAD_GAME_SRAM_DIR_ENABLE)) ? g_extern.console.main_wrap.default_sram_dir : NULL;
args.state_path = (g_extern.lifecycle_mode_state & (1ULL << MODE_LOAD_GAME_STATE_DIR_ENABLE)) ? g_extern.console.main_wrap.default_savestate_dir : NULL;
args.rom_path = g_extern.fullpath;
args.libretro_path = g_settings.libretro;
if (path_file_exists(g_extern.config_path))
args.config_path = g_extern.config_path;
else
args.config_path = NULL;
int init_ret = rarch_main_init_wrap(&args);
if (init_ret == 0)
@ -82,24 +88,6 @@ int rarch_main(int argc, char *argv[])
menu_free();
if (g_extern.main_is_init)
rarch_main_deinit();
#else
struct rarch_main_wrap args = {0};
args.verbose = g_extern.verbose;
args.sram_path = NULL;
args.state_path = NULL;
args.rom_path = "shared/documents/roms/snes9x-next/ChronoTrigger.smc";
args.libretro_path = "app/native/lib/test.so";
args.config_path = "app/native/retroarch.cfg";
rarch_init_msg_queue();
int init_ret;
if ((init_ret = rarch_main_init_wrap(&args))) return init_ret;
while ((g_extern.is_paused && !g_extern.is_oneshot) ? rarch_main_idle_iterate() : rarch_main_iterate());
rarch_main_deinit();
#endif
rarch_deinit_msg_queue();

View File

@ -2043,7 +2043,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
}
#endif
#ifdef RARCH_CONSOLE
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
static void gl_get_poke_interface(void *data, const video_poke_interface_t **iface);
static void gl_start(void)
@ -2371,7 +2371,7 @@ const video_driver_t video_gl = {
gl_free,
"gl",
#ifdef RARCH_CONSOLE
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
gl_start,
gl_stop,
gl_restart,

View File

@ -693,7 +693,7 @@ static void thread_get_poke_interface(void *data, const video_poke_interface_t *
thr->driver->poke_interface(thr->driver_data, &thr->poke);
}
#if defined(HAVE_RMENU)
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
// all stubs for now, might not have to implement them unless we want to port this to consoles
static void thread_start(void) {}
static void thread_stop(void) {}
@ -709,7 +709,7 @@ static const video_driver_t video_thread = {
thread_set_shader,
thread_free,
"Thread wrapper",
#if defined(HAVE_RMENU)
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
thread_start,
thread_stop,
thread_restart,