mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Merge pull request #5547 from kambala-decapitator/ios-mute-switch
[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