From a1fdf46087de8e1719ec80ac1ca145dacfc8e640 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 11 Jun 2021 14:24:48 +0300 Subject: iOS: Audio remote control, Now Playing info Update the basic Now Playing info about the currently playing music, and respond to remote control commands. Seems to work with MP3 but not other audio formats, probably because those are played via custom decoders. There must be some API for updating the playback status manually. --- src/app.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index 73908a09..c2bd3da0 100644 --- a/src/app.c +++ b/src/app.c @@ -1089,6 +1089,13 @@ void processEvents_App(enum iAppEventMode eventMode) { postRefresh_App(); break; case SDL_APP_WILLENTERBACKGROUND: +#if defined (iPlatformAppleMobile) + updateNowPlayingInfo_iOS(); +#endif + setFreezeDraw_Window(d->window, iTrue); + savePrefs_App_(d); + saveState_App_(d); + break; case SDL_APP_TERMINATING: setFreezeDraw_Window(d->window, iTrue); savePrefs_App_(d); -- cgit v1.2.3