Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Wayland, SDL2 seems to default to xwayland #4988

Closed
DanielGibson opened this issue Nov 21, 2021 · 4 comments · Fixed by #4306
Closed

On Wayland, SDL2 seems to default to xwayland #4988

DanielGibson opened this issue Nov 21, 2021 · 4 comments · Fixed by #4306

Comments

@DanielGibson
Copy link
Contributor

According to dhewm/dhewm3#425 SDL2 (@Yamagi confirms that it also happens with latest SDL git), SDL2 defaults to using X11 via xwayland instead of native wayland - SDL_GetCurrentVideoDriver() returns "x11" instead of "wayland".

@obedlink, the original dhewm3 bug reporter, uses "KDE-Neon, Radeon driver, Mesa 21.3", @Yamagi uses Gnome 41.1 (also with a current Radeon Mesa driver).

I think SDL2 should default to native wayland if available - it probably will give better performance and apparently when it goes via xwayland 8x MSAA isn't supported (while it works when enforcing the wayland backend with SDL_VIDEODRIVER=wayland).

Tagging @flibitijibibo as he has done lots of SDL wayland work recently and @icculus because if you agree that it should default to native wayland on wayland, it would probably nice to fix this before 2.0.18

@flibitijibibo
Copy link
Collaborator

Duplicate of #2710, see #4306. Just need surface suspension first!

@DanielGibson
Copy link
Contributor Author

Damn, sorry I didn't find the existing bug (and look at the existing PRs) first!
(I thought I searched for issues at least a few days ago, but maybe I included "videodriver" in the search)

@Mailaender
Copy link

On SDL 2.0.22 I still require SDL_VIDEODRIVER=wayland otherwise I get an X11 window.

@slouken
Copy link
Collaborator

slouken commented Jun 11, 2023

Yes, that's correct. X11 is the default in SDL 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants