Skip to content

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

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

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

Conversation

@bryanforbes

Copy link
Copy Markdown
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
@dmanlfc

dmanlfc commented May 9, 2026

Copy link
Copy Markdown
Collaborator

@nadenislamarre looks ok but @bryanforbes needs to rebase it

@nadenislamarre

Copy link
Copy Markdown
Collaborator

hard to tell with the quantity of code.
globally seems ok.
but bryanforbes is a trusted person, it is ok for me.

@nadenislamarre

Copy link
Copy Markdown
Collaborator

and the target is legit : reorganize configgen for which many features were added over the time.

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.

3 participants