Skip to content

Commit 8edb861

Browse files
committed
fix Windows: skip GLFW X11 platform hint on native Windows
The X11 forced platform hint is only needed for WSLg. On native Windows it causes "The requested platform is not supported" error.
1 parent ea98323 commit 8edb861

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rtxpy/engine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5548,7 +5548,8 @@ def run(self, start_position: Optional[Tuple[float, float, float]] = None,
55485548
# --- GLFW window creation ---
55495549
# Force X11 on GLFW 3.4+ to get window decorations (title bar with
55505550
# min/max/close). WSLg's Wayland compositor doesn't provide them.
5551-
if hasattr(glfw, 'PLATFORM'):
5551+
# Skip on native Windows where X11 is not available.
5552+
if os.name != 'nt' and hasattr(glfw, 'PLATFORM'):
55525553
glfw.init_hint(glfw.PLATFORM, glfw.PLATFORM_X11)
55535554
if not glfw.init():
55545555
raise RuntimeError("Failed to initialise GLFW")

0 commit comments

Comments
 (0)