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
|
#ifdef HAVE_AVFOUNDATION
|
||||||
/* Implicitly initializes your audio session */
|
/* Implicitly initializes your audio session */
|
||||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
|
||||||
[audioSession setActive:YES error:nil];
|
|
||||||
#endif
|
#endif
|
||||||
if (g_context)
|
if (g_context)
|
||||||
[g_view bindDrawable];
|
[g_view bindDrawable];
|
||||||
|
|
|
@ -47,9 +47,7 @@ void apple_rarch_exited(void);
|
||||||
static void rarch_enable_ui(void)
|
static void rarch_enable_ui(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_AVFOUNDATION
|
#ifdef HAVE_AVFOUNDATION
|
||||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
|
||||||
[audioSession setActive:YES error:nil];
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool boolean = true;
|
bool boolean = true;
|
||||||
|
@ -71,9 +69,7 @@ static void rarch_disable_ui(void)
|
||||||
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
||||||
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);
|
||||||
#ifdef HAVE_AVFOUNDATION
|
#ifdef HAVE_AVFOUNDATION
|
||||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
[[RetroArch_iOS get] supportOtherAudioSessions];
|
||||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
|
||||||
[audioSession setActive:YES error:nil];
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,9 +325,7 @@ enum
|
||||||
{
|
{
|
||||||
#ifdef HAVE_AVFOUNDATION
|
#ifdef HAVE_AVFOUNDATION
|
||||||
/* Implicitly initializes your audio session. */
|
/* Implicitly initializes your audio session. */
|
||||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
[(RetroArch_iOS*)[[UIApplication sharedApplication] delegate] supportOtherAudioSessions];
|
||||||
[audioSession setCategory: AVAudioSessionCategoryAmbient error: nil];
|
|
||||||
[audioSession setActive:YES error:nil];
|
|
||||||
#endif
|
#endif
|
||||||
return (RetroArch_iOS*)[[UIApplication sharedApplication] delegate];
|
return (RetroArch_iOS*)[[UIApplication sharedApplication] delegate];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue