hints: Renamed SDL_HINT_LOG_BACKENDS to SDL_DEBUG_LOGGING.

This still logs backend choices, but we might use it for other things. For
example, what Android device is being used, or all the devices we enumerated,
etc.

Ideally this eventually logs all the stuff we often have to ask followup
questions about.
This commit is contained in:
Ryan C. Gordon
2025-07-22 13:19:30 -04:00
parent af1c05fd58
commit 07ef532681
11 changed files with 29 additions and 25 deletions

View File

@@ -553,11 +553,12 @@ char *SDL_CreateDeviceName(Uint16 vendor, Uint16 product, const char *vendor_nam
return name;
}
void SDL_LogBackend(const char *subsystem, const char *backend)
#define SDL_DEBUG_LOG_INTRO "SDL_DEBUG: "
void SDL_DebugLogBackend(const char *subsystem, const char *backend)
{
if (SDL_GetHintBoolean(SDL_HINT_LOG_BACKENDS, false)) {
SDL_Log("SDL_BACKEND: %s -> '%s'", subsystem, backend);
if (SDL_GetHintBoolean(SDL_HINT_DEBUG_LOGGING, false)) {
SDL_Log(SDL_DEBUG_LOG_INTRO "chose %s backend '%s'", subsystem, backend);
}
}