Fix FAudio crash on WIndows debug

Fix FAudio crash on WIndows debug
This commit is contained in:
Andy Vandijck 2025-06-30 19:08:07 +02:00
parent 4ba7796d46
commit ce7aa3fae3
2 changed files with 6 additions and 1 deletions

View File

@ -178,7 +178,10 @@ void FAudio_Output::close() {
VBAM_CHECK(FAudioSourceVoice_Stop(sVoice, 0, FAUDIO_COMMIT_NOW) == 0);
}
FAudioVoice_DestroyVoice(sVoice);
if ((sVoice != (FAudioMasteringVoice*)0xDDDDDDDDDDDDDDDD) && (sVoice)) {
FAudioVoice_DestroyVoice(sVoice);
}
sVoice = nullptr;
}

View File

@ -2412,6 +2412,8 @@ void SDLDrawingPanel::DrawingPanelInit()
systemScreenMessage(_("Failed to set OpenGL properties"));
}
SDL_SetHint(SDL_HINT_WINDOWS_USE_D3D9EX, false);
sdlwindow = SDL_CreateWindowWithProperties(props);
if (sdlwindow == NULL) {