mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 22:48:30 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user