Skip to content

Commit

Permalink
wasapi: properly report init failure if on pre-Vista version of Windows.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
icculus committed May 28, 2017
1 parent 604a4b1 commit e5918ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/audio/wasapi/SDL_wasapi.c
Expand Up @@ -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);
Expand Down

0 comments on commit e5918ac

Please sign in to comment.