mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 12:45:34 +00:00
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.
This commit is contained in:
parent
604a4b1b30
commit
e5918acf46
|
@ -909,7 +909,8 @@ WASAPI_Init(SDL_AudioDriverImpl * impl)
|
||||||
|
|
||||||
/* just skip the discussion with COM here. */
|
/* just skip the discussion with COM here. */
|
||||||
if (!WIN_IsWindowsVistaOrGreater()) {
|
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);
|
SDL_AtomicSet(&default_playback_generation, 1);
|
||||||
|
|
Loading…
Reference in a new issue