Skip to content

refactor(configgen): evmapy controller monitor and hotkeygen mouse reset#15386

Open
bryanforbes wants to merge 1 commit intobatocera-linux:masterfrom
bryanforbes:refactor/configgen-controller-monitor
Open

refactor(configgen): evmapy controller monitor and hotkeygen mouse reset#15386
bryanforbes wants to merge 1 commit intobatocera-linux:masterfrom
bryanforbes:refactor/configgen-controller-monitor

Conversation

@bryanforbes
Copy link
Contributor

Move controller monitoring logic from emulatorlauncher.py into evmapy module as a _ControllerMonitor dataclass, encapsulating thread management, SDL2/pyudev usage, and controller state tracking. The evmapy context manager now returns self and exposes start_monitoring_controllers() for deferred thread startup.

Convert hotkeygen's set_hotkeygen_context() generator function into a HotkeygenManager dataclass-based context manager, and move the mouse reset logic into it as reset_mouse().

Remove global mutable state (_active_player_controllers, _evmapy_instance, _player_controllers_lock) and the standalone _controller_monitor_thread/_reconfigure_evmapy_on_the_fly functions from emulatorlauncher.py.

Move controller monitoring logic from emulatorlauncher.py into
evmapy module as a _ControllerMonitor dataclass, encapsulating
thread management, SDL2/pyudev usage, and controller state
tracking. The evmapy context manager now returns self and exposes
start_monitoring_controllers() for deferred thread startup.

Convert hotkeygen's set_hotkeygen_context() generator function
into a HotkeygenManager dataclass-based context manager, and
move the mouse reset logic into it as reset_mouse().

Remove global mutable state (_active_player_controllers,
_evmapy_instance, _player_controllers_lock) and the standalone
_controller_monitor_thread/_reconfigure_evmapy_on_the_fly
functions from emulatorlauncher.py.
@bryanforbes bryanforbes added the 44 label Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant