Skip to content

webos: don't fail video init when the webOS ABI fix library is missing - #11

Merged
mariotaku merged 2 commits into
webOS-2.30.xfrom
webos/abifix-runtime
Sep 13, 2026
Merged

mariotaku merged 2 commits into
webOS-2.30.xfrom
webos/abifix-runtime

Conversation

@mariotaku

@mariotaku mariotaku commented Sep 13, 2026

Copy link
Copy Markdown
Member

libwayland-webos-client.so.1 doesn't exist on 64-bit targets, and its absence was fatal: WaylandWebOS_AbiFixInit() failing set rc = 0 in SDL_WAYLAND_LoadSymbols(), so Wayland_CreateDevice() returned NULL and SDL_Init(SDL_INIT_VIDEO) failed. Reported in #10.

  • SDL_waylanddyn.c: drop the eager WaylandWebOS_AbiFixInit() call. It was the rc = 0, and it's redundant now that the interface resolves lazily — the SDL_WAYLAND_SHARED=OFF build never reached it anyway.
  • SDL_waylandwebos_abifix.c: resolve lazily and NULL-check instead of SDL_assert, which compiles out under NDEBUG and leaves LoadMapping() dereferencing a null interface. Log at debug level when the library is absent.

No build-time switch: the opcodes are read by name from whichever wl_interface the target actually exports, which covers retail firmware, a source-built stack and an absent library alike. SDL_WEBOS_BROKEN_ABI is unrelated — it adds inputSource to SDL's own event structs to match LG's libSDL2.

Builds clean default, -DSDL_WEBOS_BROKEN_ABI=ON, -DSDL_WAYLAND_SHARED=OFF. Not tested on hardware.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JFTrxsLqHkdfDB8hgdT74y

Mariotaku and others added 2 commits September 13, 2026 17:41
libwayland-webos-client.so.1 being absent is no longer fatal; the
wl_webos_input_manager interface is resolved lazily at its use site
instead. 64-bit targets have no such library at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JFTrxsLqHkdfDB8hgdT74y
Resolving the interface at the bind site already loads the library, so the
eager call only repeated a failed dlopen on targets without it. The static
wayland build never reached it at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JFTrxsLqHkdfDB8hgdT74y
@cscd98

cscd98 commented Sep 13, 2026

Copy link
Copy Markdown

Tested, works great 👍 thanks

@mariotaku
mariotaku marked this pull request as ready for review September 13, 2026 13:44
@mariotaku
mariotaku merged commit a768a4b into webOS-2.30.x Sep 13, 2026
6 of 8 checks passed
@mariotaku
mariotaku deleted the webos/abifix-runtime branch September 13, 2026 13:44
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 this pull request may close these issues.

2 participants