mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
[iOS] add setting to honor mute switch
This commit is contained in:
@ -212,6 +212,11 @@ ScreenHandler::ScreenHandler()
|
||||
else
|
||||
SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
|
||||
|
||||
#ifdef VCMI_IOS
|
||||
if(!settings["general"]["ignoreMuteSwitch"].Bool())
|
||||
SDL_SetHint(SDL_HINT_AUDIO_CATEGORY, "AVAudioSessionCategoryAmbient");
|
||||
#endif
|
||||
|
||||
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_GAMECONTROLLER))
|
||||
{
|
||||
logGlobal->error("Something was wrong: %s", SDL_GetError());
|
||||
|
Reference in New Issue
Block a user