mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 19:21:49 +01:00
[SDL] SDL_OpenAudio returns negative error codes in SDL2
SDL1.2 just returns -1, which this code was still checking for
This commit is contained in:
parent
cb5b682872
commit
6e9cb90da4
@ -82,7 +82,7 @@ static int sdl_sound_init()
|
|||||||
as_desired.samples = SOUND_SAMPLES_SIZE;
|
as_desired.samples = SOUND_SAMPLES_SIZE;
|
||||||
as_desired.callback = sdl_sound_callback;
|
as_desired.callback = sdl_sound_callback;
|
||||||
|
|
||||||
if(SDL_OpenAudio(&as_desired, NULL) == -1) {
|
if(SDL_OpenAudio(&as_desired, NULL) < 0) {
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "SDL Audio open failed", sdl_video.window);
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "SDL Audio open failed", sdl_video.window);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user