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

UI: Device emulation - Steel Battalion Controller #1803

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

faha223
Copy link
Contributor

@faha223 faha223 commented Dec 6, 2024

This PR adds the emulation of the Steel Battalion Controller. This controller uses different Input and Output XID reports than the Xbox Controller S. I split out the XID Gamepad-specific code from the XID shared code, and added an XID header. The new xid-gamepad.c and xid-steel-battalion.c both reference that header but they have their own code for handling USB endpoint transfers.

Since the Steel Battalion controller doesn't have an internal USB Hub, it's not possible to insert XMUs or other peripherals in the expansion slots. For this reason, rebinding XMUs is disabled and the Expansion Slots section is not rendered when the Steel Battalion controller driver is selected.

This PR shares some changes with #1802

faha223 added 8 commits March 9, 2024 21:14
build: Update arm64 target, handle target/arch independent pkg names
nv2a: Scale line thickness by surface scale factor
…d driver is the Steel Battalion controller driver.

Added a check for HasInternalHub in xemu_input_rebind_xmu to prevent the emulator from automatically trying to rebind the xmu when switching to a Steel Battalion controller with XMUs bound
Changed the Aiming lever binding to use Mouse using the same logic as the Lightgun to track the mouse position within the viewport
Updated xemu-input to work with the new changes
Removed the right mouse button click to open the popup menu because it was conflicting with using the right mouse button as Lock On button
@faha223
Copy link
Contributor Author

faha223 commented Dec 15, 2024

In the most recent commit, I changed the keybindings for the Steel Battalion controller to use the mouse for the aiming lever. I mapped the X and Y axes of the stick to the mouse position within the window, and I mapped the main weapon, lock on, and sub weapon controls to the mouse left, mouse right, and mouse x/y buttons (the thumb buttons).

As a result I felt it was necessary to remove the right mouse button binding to show the popup menu because it was interfering with using the right mouse button in-game

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.

1 participant