mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
(iOS)Add a RGUI toggle button to the cocoa pause menu
This commit is contained in:
parent
63d0f97df7
commit
6b2b56675c
@ -133,15 +133,26 @@ void* rarch_main_ios(void* args)
|
||||
else if (g_extern.lifecycle_mode_state & (1ULL << MODE_GAME))
|
||||
{
|
||||
while ((g_extern.is_paused && !g_extern.is_oneshot) ? rarch_main_idle_iterate() : rarch_main_iterate())
|
||||
{
|
||||
process_events();
|
||||
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_GAME)))
|
||||
break;
|
||||
}
|
||||
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
|
||||
}
|
||||
else if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= 1ULL << MODE_MENU_PREINIT;
|
||||
while (!g_extern.system.shutdown && menu_iterate())
|
||||
{
|
||||
process_events();
|
||||
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU)))
|
||||
break;
|
||||
}
|
||||
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
|
||||
}
|
||||
else
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -182,6 +182,20 @@ static void event_set_state_slot(void* userdata)
|
||||
g_extern.state_slot = (uint32_t)userdata;
|
||||
}
|
||||
|
||||
static void event_show_rgui(void* userdata)
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU))
|
||||
{
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU);
|
||||
}
|
||||
}
|
||||
|
||||
static void event_quit(void* userdata)
|
||||
{
|
||||
g_extern.system.shutdown = true;
|
||||
@ -424,6 +438,14 @@ static void event_reload_config(void* userdata)
|
||||
ios_frontend_post_event(event_set_state_slot, (void*)((UISegmentedControl*)sender).selectedSegmentIndex);
|
||||
}
|
||||
|
||||
- (IBAction)showRGUI:(id)sender
|
||||
{
|
||||
if (_isRunning)
|
||||
ios_frontend_post_event(event_show_rgui, 0);
|
||||
|
||||
[self closePauseMenu:sender];
|
||||
}
|
||||
|
||||
- (IBAction)closePauseMenu:(id)sender
|
||||
{
|
||||
[[RAGameView get] closePauseMenu];
|
||||
|
Loading…
Reference in New Issue
Block a user