mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 02:38:11 +00:00
Merge pull request #2654 from pponso1/master
iOS: Refactoring support for background Music.app.
This commit is contained in:
commit
0703aed61d
@ -124,9 +124,7 @@ void cocoagl_bind_game_view_fbo(void)
|
||||
{
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
/* Implicitly initializes your audio session */
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||
#endif
|
||||
if (g_context)
|
||||
[g_view bindDrawable];
|
||||
|
@ -47,9 +47,7 @@ void apple_rarch_exited(void);
|
||||
static void rarch_enable_ui(void)
|
||||
{
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||
#endif
|
||||
|
||||
bool boolean = true;
|
||||
@ -71,9 +69,7 @@ static void rarch_disable_ui(void)
|
||||
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -329,9 +325,7 @@ enum
|
||||
{
|
||||
#ifdef HAVE_AVFOUNDATION
|
||||
/* Implicitly initializes your audio session. */
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
[(RetroArch_iOS*)[[UIApplication sharedApplication] delegate] supportOtherAudioSessions];
|
||||
#endif
|
||||
return (RetroArch_iOS*)[[UIApplication sharedApplication] delegate];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user