Explorar el Código

wasapi: Fixed incorrect assertions.

Fixes #6795.

(cherry picked from commit 12486e144be0e7a37abd87b8bf90547a992ff66b)
Ryan C. Gordon hace 3 años
padre
commit
e986c7984b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/audio/wasapi/SDL_wasapi_winrt.cpp

+ 2 - 2
src/audio/wasapi/SDL_wasapi_winrt.cpp

@@ -182,13 +182,13 @@ void SDL_WasapiDeviceEventHandler::OnEnumerationCompleted(DeviceWatcher ^ sender
 
 
 void SDL_WasapiDeviceEventHandler::OnDefaultRenderDeviceChanged(Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args)
 void SDL_WasapiDeviceEventHandler::OnDefaultRenderDeviceChanged(Platform::Object ^ sender, DefaultAudioRenderDeviceChangedEventArgs ^ args)
 {
 {
-    SDL_assert(this->iscapture);
+    SDL_assert(!this->iscapture);
     SDL_AtomicAdd(&SDL_IMMDevice_DefaultPlaybackGeneration, 1);
     SDL_AtomicAdd(&SDL_IMMDevice_DefaultPlaybackGeneration, 1);
 }
 }
 
 
 void SDL_WasapiDeviceEventHandler::OnDefaultCaptureDeviceChanged(Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args)
 void SDL_WasapiDeviceEventHandler::OnDefaultCaptureDeviceChanged(Platform::Object ^ sender, DefaultAudioCaptureDeviceChangedEventArgs ^ args)
 {
 {
-    SDL_assert(!this->iscapture);
+    SDL_assert(this->iscapture);
     SDL_AtomicAdd(&SDL_IMMDevice_DefaultCaptureGeneration, 1);
     SDL_AtomicAdd(&SDL_IMMDevice_DefaultCaptureGeneration, 1);
 }
 }