Add color config

This commit is contained in:
Joey Yakimowich-Payne 2025-11-21 13:23:43 -07:00
commit 02bce399a5
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
3 changed files with 59 additions and 4 deletions

View file

@ -581,6 +581,11 @@ def main() -> None:
contexts[instance_id] = ctx
elif event.type == sdl2.SDL_CONTROLLERDEVICEREMOVED:
instance_id = event.cdevice.which
# ctx = contexts.get(instance_id)
# if ctx and sdl2.SDL_GameControllerGetAttached(ctx.controller):
# # Spurious detach; ignore.
# console.print(f"[yellow]Ignoring spurious remove for controller {instance_id}[/yellow]")
# continue
ctx = contexts.pop(instance_id, None)
if ctx:
console.print(f"[yellow]Controller {instance_id} removed[/yellow]")