diff options
author | Chris Robinson <[email protected]> | 2014-05-24 17:19:52 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-24 17:19:52 -0700 |
commit | 3d6ffa282d6148a4e080510d88e66414abcb7b33 (patch) | |
tree | eca06048ea7869ba7d6fe4e97d1d7d9e9ec6465f | |
parent | 4ca561acd379665b82ec9c42773aaec01df97891 (diff) |
Don't resume the backend if there's no contexts
-rw-r--r-- | Alc/ALc.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -3675,17 +3675,18 @@ ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device) LockLists(); if((device->Flags&DEVICE_PAUSED)) { - if(V0(device->Backend,start)() != ALC_FALSE) + device->Flags &= ~DEVICE_PAUSED; + if(device->ContextList != NULL) { - device->Flags |= DEVICE_RUNNING; - device->Flags &= ~DEVICE_PAUSED; - } - else - { - alcSetError(device, ALC_INVALID_DEVICE); - ALCdevice_Lock(device); - aluHandleDisconnect(device); - ALCdevice_Unlock(device); + if(V0(device->Backend,start)() != ALC_FALSE) + device->Flags |= DEVICE_RUNNING; + else + { + alcSetError(device, ALC_INVALID_DEVICE); + ALCdevice_Lock(device); + aluHandleDisconnect(device); + ALCdevice_Unlock(device); + } } } UnlockLists(); |