Set up groundwork for new mobile-friendly setting

This commit is contained in:
twinaphex 2015-07-09 03:47:07 +02:00
parent 0c11148273
commit 46cdc34b9b
2 changed files with 10 additions and 2 deletions

View File

@ -191,7 +191,7 @@ static int16_t input_state(unsigned port, unsigned device,
switch (device) switch (device)
{ {
case RETRO_DEVICE_JOYPAD: case RETRO_DEVICE_JOYPAD:
if (ol_state->buttons & (UINT64_C(1) << id)) if (ol_state && ol_state->buttons & (UINT64_C(1) << id))
res |= 1; res |= 1;
break; break;
case RETRO_DEVICE_KEYBOARD: case RETRO_DEVICE_KEYBOARD:
@ -209,7 +209,7 @@ static int16_t input_state(unsigned port, unsigned device,
base = 2; base = 2;
if (id == RETRO_DEVICE_ID_ANALOG_Y) if (id == RETRO_DEVICE_ID_ANALOG_Y)
base += 1; base += 1;
if (ol_state->analog[base]) if (ol_state && ol_state->analog[base])
res = ol_state->analog[base]; res = ol_state->analog[base];
} }
break; break;

View File

@ -434,11 +434,19 @@ static void do_state_check_menu_toggle(void)
if (menu_driver_alive()) if (menu_driver_alive())
{ {
if (global->main_is_init && (global->core_type != CORE_TYPE_DUMMY)) if (global->main_is_init && (global->core_type != CORE_TYPE_DUMMY))
{
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED); rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
#if 0
event_command(EVENT_CMD_OVERLAY_INIT);
#endif
}
return; return;
} }
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING); rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING);
#if 0
event_command(EVENT_CMD_OVERLAY_DEINIT);
#endif
} }
#endif #endif