From 2d8c8bc6faad386dd2f5e801ad4bfc76e290a3ad Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 11 Jun 2025 14:24:55 -0500 Subject: [PATCH] set default audio driver to "winmm" on Vista issue #2545 --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 6151846bc..f6bfef35f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -759,6 +759,12 @@ int main(int argc, char** argv) { return 1; } +#if defined(HAVE_SDL2) && defined(_WIN32) && !defined(SUPPORT_XP) + if (!IsWindows7OrGreater()) { + SDL_SetHint("SDL_HINT_AUDIODRIVER","winmm"); + } +#endif + #ifdef HAVE_GUI if (e.preInit(consoleMode || benchMode || infoMode || outputMode)) { if (consoleMode || benchMode || infoMode || outputMode) { @@ -789,7 +795,6 @@ int main(int argc, char** argv) { } #endif - if (!fileName.empty() && ((!e.getConfBool("tutIntroPlayed",TUT_INTRO_PLAYED)) || e.getConfInt("alwaysPlayIntro",0)!=3 || consoleMode || benchMode || infoMode || outputMode)) { logI("loading module..."); FILE* f=ps_fopen(fileName.c_str(),"rb");