mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-26 19:47:42 +00:00
With DISPLAY set but XAUTHORITY missing or stale, the X server rejects the connection, XOpenDisplay() returns NULL, and iokitd passed that NULL display to eglGetPlatformDisplay(). Mesa's X11 platform expects a real Display there, so iokitd faulted and launchd restarted it every 10 seconds while /tmp/lolsig.log filled with frames (issue #140). IOSurfaceRoot now checks the display first, stays at EGL_NO_DISPLAY and prints one line when it is missing. createSurface() already returns KERN_FAILURE for !hasDisplay(), so surfaces fail closed instead of the process crashing. The destructor also skips eglTerminate() when no display was initialized. Documents that DISPLAY alone is not enough on servers and SSH sessions, and adds a display probe to tools/env-check.sh: it reports DISPLAY/XAUTHORITY and warns when xdpyinfo cannot open the display that Darling will inherit. Signed-off-by: zero <zero@localhost>