Skip to content

Commit

Permalink
quirks: Force "tucnak" to x11, software renderer, and no framebuffer …
Browse files Browse the repository at this point in the history
…texture.

It uses rendering and the event loop from different threads, so it upsets
OpenGL and is hard to work around, beyond just falling back to an
all-software rendering path (which means it has to use X11 too).

There is a real SDL2 target for this app, which doesn't have these
limitations, but this gets the SDL 1.2 target working.

Fixes #182.
  • Loading branch information
icculus committed Sep 1, 2022
1 parent 62c60ad commit e511d82
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,16 @@ directly, so this does not prevent the game from working on Wayland. No
XWayland needed!


## Tucnak (Linux)

There is an SDL2 target for libzia (which tucnak uses for rendering), and you
should use that in modern times. But if you're on the SDL 1.2 target,
tucnak tries to render from a background thread, and does its event loop on
another, so we can't cleanly hook in to make it draw from the main thread.

sdl12-compat will force SDL2 to use X11, software rendering, and no texture
framebuffer, to avoid using OpenGL, to avoid the threading problems this
will cause. The app is perfectly usable in this configuration (and largely
matches how they expected you to use it with SDL 1.2 anyhow).


7 changes: 7 additions & 0 deletions src/SDL12_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,13 @@ static QuirkEntryType quirks[] = {
{"dosbox_i686", "SDL12COMPAT_USE_KEYBOARD_LAYOUT", "0"},
{"dosbox_x86_64", "SDL12COMPAT_USE_KEYBOARD_LAYOUT", "0"},

/* Tucnak's 1.2 target wants to render and run its event loop from
background threads, which upsets OpenGL. Force software renderer and
x11. If you want Wayland, etc, use tuknak's existing SDL2 target. */
{"tucnak", "SDL_VIDEODRIVER", "x11"},
{"tucnak", "SDL_RENDER_DRIVER", "software"},
{"tucnak", "SDL_FRAMEBUFFER_ACCELERATION", "false"},

/* The 32-bit Steam build only of Multiwinia Quits but doesn't re-Init */
{"multiwinia.bin.x86", "SDL12COMPAT_NO_QUIT_VIDEO", "1"}
#else
Expand Down

0 comments on commit e511d82

Please sign in to comment.