Abstract SDL success/failure checks inside a compat macro

This commit is contained in:
Cameron Gutman committed 2025-01-30 23:36:46 -06:00
1 parent 3a22a01aef
commit 5290305944
8 files changed
+15 -13

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ SdlAudioRenderer::SdlAudioRenderer()
{
SDL_assert(!SDL_WasInit(SDL_INIT_AUDIO));
if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0) {
if (SDLC_FAILURE(SDL_InitSubSystem(SDL_INIT_AUDIO))) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"SDL_InitSubSystem(SDL_INIT_AUDIO) failed: %s",
SDL_GetError());