From e5918acf464f64a104d1e2d0a4ec97b77920e70f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 28 May 2017 00:41:55 -0400 Subject: [PATCH] wasapi: properly report init failure if on pre-Vista version of Windows. We really should change the Init interface to return 0 on success and -1 on error, like everything else, to avoid this sort of confusion. --- src/audio/wasapi/SDL_wasapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/wasapi/SDL_wasapi.c b/src/audio/wasapi/SDL_wasapi.c index 69a5e9701..645473563 100644 --- a/src/audio/wasapi/SDL_wasapi.c +++ b/src/audio/wasapi/SDL_wasapi.c @@ -909,7 +909,8 @@ WASAPI_Init(SDL_AudioDriverImpl * impl) /* just skip the discussion with COM here. */ if (!WIN_IsWindowsVistaOrGreater()) { - return SDL_SetError("WASAPI support requires Windows Vista or later"); + SDL_SetError("WASAPI support requires Windows Vista or later"); + return 0; } SDL_AtomicSet(&default_playback_generation, 1);