Skip to content

fix: use functional interface for GL callback#843

Merged
Wyvest merged 1 commit into
Polyfrost:v1from
saadndm:v1-fix
Jul 24, 2026
Merged

fix: use functional interface for GL callback#843
Wyvest merged 1 commit into
Polyfrost:v1from
saadndm:v1-fix

Conversation

@saadndm

@saadndm saadndm commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Changes the Skiko OpenGL address callback to use a functional interface, fixing OneConfig GUI not initializing on wayland.

MC 26.2 uses org.lwjgl:lwjgl:3.4.1:unsafe, which falls back to libffi callbacks and hides this issue.

But 26.1, https://github.com/moehreag/legacy-lwjgl3 (for Ornithe), and eventually 26.3 all use regular LWJGL builds with FFM upcalls in Java 25.

LWJGL requires the FFM upcall interface to be annotated with @FunctionalInterface, currently causing this error on 26.1 Wayland:

[20:30:02] [Render thread/WARN] (GLInterfaceFactory) GLInterfaceFactory: failed to create getProc closure

java.lang.UnsupportedOperationException: The upcall interface must be annotated with @FunctionalInterface
	at knot//org.lwjgl.system.ffm.BCCallUp.<init>(BCCallUp.java:52)
	at knot//org.lwjgl.system.ffm.FFM.ffmUpcall(FFM.java:697)
	...

Tested manually to work on Wayland on 1.21, 26.1, 26.2

Related Issue(s)

Checklist

  • I made a clear description of what was changed
  • I stated why these changes were necessary
  • I updated documentation or said what needs to be updated
  • I made sure these changes are backwards compatible
  • This pull request is for one feature/bug fix

@Wyvest
Wyvest merged commit 8bd7706 into Polyfrost:v1 Jul 24, 2026
1 check passed
@saadndm
saadndm deleted the v1-fix branch July 24, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants