aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2026-03-27 19:49:01 -0400
committerJack Jamison <jackqjamison@gmail.com>2026-03-27 19:49:01 -0400
commit861af260e7ed5f667e0579c4b35aaf9c930c8c58 (patch)
treefcbf7e3087a46cfb579a524de3e90f95741a7234
parentecb26e4c0b0e33c82edbdabc2b71c716b5c92bd3 (diff)
update sdl blog with more details
-rw-r--r--zola-static/content/blog/sdl-native-wayland/index.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/zola-static/content/blog/sdl-native-wayland/index.md b/zola-static/content/blog/sdl-native-wayland/index.md
index 1f163f7..ff59edf 100644
--- a/zola-static/content/blog/sdl-native-wayland/index.md
+++ b/zola-static/content/blog/sdl-native-wayland/index.md
@@ -7,7 +7,10 @@ updated = 2025-08-08
[SDL3](https://wiki.libsdl.org/SDL3/FrontPage) is a great platform abstraction layer. On Linux, it compiles with support for both [X Window System](https://www.x.org/wiki/) and [Wayland](https://wayland.freedesktop.org/). This is great because it makes your app compatible with just about any desktop environment or window manager. In the [SDL3 documentation](https://wiki.libsdl.org/SDL3/README-wayland) it says that
> Wayland is a replacement for the X11 window system protocol and architecture and is favored over X11 by default in SDL3
-However, if your compositor does not implement the `wp_fifo_manager_v1` protocol SDL will fall back to XWayland. My compositor doesn't have it, and here's how I forced SDL to use Wayland anyway (for c++).
+However, if your compositor does not implement the `wp_fifo_manager_v1` protocol
+SDL will fall back to XWayland. My compositor doesn't have it, and here's how I
+forced SDL to use Wayland anyway (for c++). This code sets an SDL hint, so it
+has to be inserted before `SDL_Init`.
```c++
for (int i = 0; i < SDL_GetNumVideoDrivers(); i++) {
if (std::string(SDL_GetVideoDriver(i)) == "wayland") {