mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-29 21:07:23 +02:00
Fix -Wdeclaration-after-statement warnings
This commit is contained in:
committed by
Anonymous Maarten
parent
354a35c1d7
commit
248cb3ca9c
@@ -455,12 +455,13 @@ static BOOL update_audio_session(_THIS, SDL_bool open, SDL_bool allow_playandrec
|
||||
|
||||
if ((open_playback_devices || open_capture_devices) && !session_active) {
|
||||
if (![session setActive:YES error:&err]) {
|
||||
NSString *desc;
|
||||
if ([err code] == AVAudioSessionErrorCodeResourceNotAvailable &&
|
||||
category == AVAudioSessionCategoryPlayAndRecord) {
|
||||
return update_audio_session(this, open, SDL_FALSE);
|
||||
}
|
||||
|
||||
NSString *desc = err.description;
|
||||
desc = err.description;
|
||||
SDL_SetError("Could not activate Audio Session: %s", desc.UTF8String);
|
||||
return NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user