-
Notifications
You must be signed in to change notification settings - Fork 14
Add Nintendo/Xbox button layout option #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Nintendo and Xbox button layout options by introducing a new config file and modifying UI/input handling to toggle between the layouts and persist the selection in the .env file.
- Introduces config.py to centralize button colors and layout definitions.
- Updates UI rendering and input processing in RomM/ui.py and RomM/romm.py to use get_controller_layout().
- Adjusts main.py to initialize controller layout settings and logging paths.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
RomM/ui.py | Removed hard-coded color definitions in favor of config-based layout retrieval. |
RomM/romm.py | Updated button configuration and input key checking to support layout toggling. |
RomM/main.py | Loads and sets the controller layout from the environment before starting the app. |
RomM/config.py | New file defining button layout configurations and helper functions. |
Comments suppressed due to low confidence (1)
RomM/romm.py:738
- Consider adding automated tests to cover the new toggle layout functionality to ensure proper behavior when switching between Nintendo and Xbox layouts.
elif selected_pos == self.start_menu_options[2][1]:
config.py
.env
on toggle