Skip to content
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

[Libretro] Add options to manage each expansion slot #1368

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

bslenul
Copy link
Contributor

@bslenul bslenul commented Jan 15, 2024

Hey!

This is a PR for the Libretro core, it adds a "Controller Expansion Slots" category for core options (only shows for Dreamcast games):

image

this will let the user decides what expansion device they want for each slot (currently none/vmu/rumble):

image

The menu refreshes when changing controller type and will only show the slots available, for example having an arcade stick in port A will hide A2 and having a keyboard in port B will hide both B1 and B2:

image

It makes the expansion devices much more "malleable", for example before this PR with the "Controller" device type if the "Purupuru" option was enabled then all the slot 2 VMUs were disabled automatically and it was also impossible to disconnect any slot 1 VMU which has been requested multiple times (especially for Sonic Shuffle, see #723).

By default all slots 1 will be set to VMU and all slots 2 to Purupuru, to match the current core defaults.

I did some kind of a workaround in retro_set_controller_port_device() to avoid input descriptors and core options to be refreshed 4 times on startup, couldn't think of a better way of doing it... basically I don't refresh the first time until all ports are not set to "-1" anymore. If anyone has a better idea I'm all ears! I'm still lacking some "dev logic" :p

The PR does not affect existing VMUs but I'm still nervous with changes related to saves, I really hope everything is OK!
I feel a bit more confident with PRs lately but I'm still pretty noobish so if this is not good enough or anything let me know and I'll just close the PR, no hard feelings!

@flyinghead flyinghead merged commit 070ac71 into flyinghead:dev Jan 16, 2024
13 checks passed
@bslenul bslenul deleted the lr-port-settings branch January 16, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants