You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users are trained to use SDL_VIDEODRIVER=wayland for native Wayland support.
Renaming that env var to SDL_VIDEO_DRIVER breaks this.
As SDL3 is ABI-stable now it's probably too late to undo the renaming, but if the SDL_VIDEO_DRIVER env var isn't set it could (should!) still fall back to SDL_VIDEODRIVER.
Probably same for SDL_AUDIODRIVER/SDL_AUDIO_DRIVER.
I briefly looked at the code and am not sure how to best implement this: Hardcode the case in SDL_Get_Hint() and friends (if(result == NULL && strcmp(name, SDL_HINT_VIDEO_DRIVER) == 0) result = SDL_getenv("SDL_VIDEODRIVER");), or somehow handle this in the callers of SDL_GetHint(SDL_VIDEO_DRIVER)?
The latter is probably harder to do correctly if I want to respect hint priorities..
By the way, the (public) Hint API is missing a getter for a hints priority.
The text was updated successfully, but these errors were encountered:
Not 100% sure if this is the best way to implement this, but I think doing this at all (before the first official) SDL3 release does make a lot of sense, and at least my solution is simple ;)
Users are trained to use
SDL_VIDEODRIVER=wayland
for native Wayland support.Renaming that env var to
SDL_VIDEO_DRIVER
breaks this.As SDL3 is ABI-stable now it's probably too late to undo the renaming, but if the
SDL_VIDEO_DRIVER
env var isn't set it could (should!) still fall back toSDL_VIDEODRIVER
.Probably same for SDL_AUDIODRIVER/SDL_AUDIO_DRIVER.
I briefly looked at the code and am not sure how to best implement this: Hardcode the case in
SDL_Get_Hint()
and friends (if(result == NULL && strcmp(name, SDL_HINT_VIDEO_DRIVER) == 0) result = SDL_getenv("SDL_VIDEODRIVER");
), or somehow handle this in the callers ofSDL_GetHint(SDL_VIDEO_DRIVER)
?The latter is probably harder to do correctly if I want to respect hint priorities..
By the way, the (public) Hint API is missing a getter for a hints priority.
The text was updated successfully, but these errors were encountered: