Skip to content

Commit

Permalink
SDL3: Replace some <0 checks with false checks
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Oct 21, 2024
1 parent cdc08e7 commit 3a94eb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FAudio_platform_sdl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void FAudio_PlatformAddRef()
FAudio_INTERNAL_PrioritizeDirectSound();

/* SDL tracks ref counts for each subsystem */
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
if (!SDL_InitSubSystem(SDL_INIT_AUDIO))
{
SDL_Log("SDL_INIT_AUDIO failed: %s", SDL_GetError());
}
Expand Down Expand Up @@ -324,14 +324,14 @@ uint32_t FAudio_PlatformGetDeviceDetails(
/* Get the device format from the OS */
if (index == 0)
{
if (SDL_GetAudioDeviceFormat(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &spec, NULL) < 0)
if (!SDL_GetAudioDeviceFormat(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &spec, NULL))
{
SDL_zero(spec);
}
}
else
{
if (SDL_GetAudioDeviceFormat(devs[index - 1], &spec, NULL) < 0)
if (!SDL_GetAudioDeviceFormat(devs[index - 1], &spec, NULL))
{
SDL_zero(spec);
}
Expand Down

0 comments on commit 3a94eb7

Please sign in to comment.