hints: Added SDL_HINT_LOG_BACKENDS.

Fixes #13354.
This commit is contained in:
Ryan C. Gordon
2025-07-14 00:14:15 -04:00
parent 277f91c317
commit 10004ab0ea
12 changed files with 57 additions and 7 deletions

View File

@@ -512,10 +512,12 @@ static void MaybeInitializeLibUring(void)
{
if (SDL_ShouldInit(&liburing_init)) {
if (LoadLibUring()) {
SDL_LogBackend("asyncio", "liburing");
CreateAsyncIOQueue = SDL_SYS_CreateAsyncIOQueue_liburing;
QuitAsyncIO = SDL_SYS_QuitAsyncIO_liburing;
AsyncIOFromFile = SDL_SYS_AsyncIOFromFile_liburing;
} else { // can't use liburing? Use the "generic" threadpool implementation instead.
SDL_LogBackend("asyncio", "generic");
CreateAsyncIOQueue = SDL_SYS_CreateAsyncIOQueue_Generic;
QuitAsyncIO = SDL_SYS_QuitAsyncIO_Generic;
AsyncIOFromFile = SDL_SYS_AsyncIOFromFile_Generic;

View File

@@ -511,10 +511,12 @@ static void MaybeInitializeWinIoRing(void)
{
if (SDL_ShouldInit(&ioring_init)) {
if (LoadWinIoRing()) {
SDL_LogBackend("asyncio", "ioring");
CreateAsyncIOQueue = SDL_SYS_CreateAsyncIOQueue_ioring;
QuitAsyncIO = SDL_SYS_QuitAsyncIO_ioring;
AsyncIOFromFile = SDL_SYS_AsyncIOFromFile_ioring;
} else { // can't use ioring? Use the "generic" threadpool implementation instead.
SDL_LogBackend("asyncio", "generic");
CreateAsyncIOQueue = SDL_SYS_CreateAsyncIOQueue_Generic;
QuitAsyncIO = SDL_SYS_QuitAsyncIO_Generic;
AsyncIOFromFile = SDL_SYS_AsyncIOFromFile_Generic;