Move ifdef guards to fix unused variable warning

This commit is contained in:
Cameron Gutman
2026-04-08 21:26:33 -05:00
parent eb3d8ad92c
commit 1ec1a3d7ad

View File

@@ -817,7 +817,6 @@ int main(int argc, char *argv[])
}
}
#if !defined(Q_OS_WIN32) && !defined(Q_OS_DARWIN)
// SDL 3.4.0 and 3.4.2 have bugs in atomic KMSDRM support that break us,
// so disable atomic on the affected SDL3 versions. Since not all versions
// of sdl2-compat will set the SDL3_VERSION hint, we assume that versions
@@ -825,11 +824,12 @@ int main(int argc, char *argv[])
// as SDL 3.4.4 with the atomic fixes).
if ((sdl3VersionInt != 0 && sdl3VersionInt < SDL_VERSIONNUM(3, 4, 4)) ||
(runtimeVersion.patch >= 50 && runtimeVersion.patch < 66)) {
#if !defined(Q_OS_WIN32) && !defined(Q_OS_DARWIN)
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Setting SDL_KMSDRM_ATOMIC=0 for older sdl2-compat/SDL3 version");
SDL_SetHint("SDL_KMSDRM_ATOMIC", "0");
}
#endif
}
// Apply the initial translation based on user preference
StreamingPreferences::get()->retranslate();