From 46b6966cf711e6b16646d67ee5bf5c3d6b95e643 Mon Sep 17 00:00:00 2001 From: saphid <4596216+saphid@users.noreply.github.com> Date: Tue, 29 Sep 2026 09:41:42 +1000 Subject: [PATCH] frame_touch: build the socket path on the Frame, so Windows can import it for tests Co-Authored-By: Claude Opus 5.5 (1M context) --- ui/frame_touch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/frame_touch.py b/ui/frame_touch.py index 75f9c63..cf06d79 100644 --- a/ui/frame_touch.py +++ b/ui/frame_touch.py @@ -30,7 +30,7 @@ import subprocess import sys import time -SOCKET = f"/run/user/{os.getuid()}/gamescope-0-ei" +SOCKET = "/run/user/{uid}/gamescope-0-ei" # filled in on the Frame (Windows has no getuid; the tests import this) BUTTONS = {"left": 0x110, "right": 0x111, "middle": 0x112} # BTN_LEFT, BTN_RIGHT, BTN_MIDDLE SHIFT = 42 # KEY_LEFTSHIFT # Printable ASCII on a US layout: character -> (evdev key code, shifted). @@ -225,7 +225,7 @@ class Gamescope: self.L = L = libei() self.ei = L.ei_new_sender(None) L.ei_configure_name(self.ei, b"Frame Control") - if L.ei_setup_backend_socket(self.ei, SOCKET.encode()) != 0: + if L.ei_setup_backend_socket(self.ei, SOCKET.format(uid=os.getuid()).encode()) != 0: raise RuntimeError("Couldn't reach gamescope's input socket. Is the headset on?") self.fd = L.ei_get_fd(self.ei) self.device, self.sequence, self.held, self.keys, self.alive = None, 0, set(), set(), True