1
0
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:
Ivan Savenko
2025-03-16 19:09:06 +02:00
committed by GitHub
5 changed files with 101 additions and 64 deletions

View File

@ -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());