Преглед на файлове

wasapi: Fixed incorrect assertions.

Fixes #6795.
(cherry-picked from commit 12486e144be0e7a37abd87b8bf90547a992ff66b)
Ryan C. Gordon преди 2 години
родител
ревизия
40698ee33c
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/audio/wasapi/SDL_wasapi_winrt.cpp

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

@@ -189,14 +189,14 @@ SDL_WasapiDeviceEventHandler::OnEnumerationCompleted(DeviceWatcher^ sender, Plat
 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);
 }