Преглед изворни кода

wasapi: Fixed incorrect assertions.

Fixes #6795.
Ryan C. Gordon пре 3 година
родитељ
комит
12486e144b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/audio/wasapi/SDL_wasapi_winrt.cpp

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

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