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

[PoC] Mouse Gyro support (Primarily for steam deck) #870

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

garrettjoecox
Copy link
Contributor

@garrettjoecox garrettjoecox commented Nov 23, 2024

This injects the mouse delta as a gyro input, allowing the steam deck Gyro functionality to be used with our gyro functionality. Currently the window now captures the mouse unless the new modern menu is open. You would need to opt into this behavior.

The PR itself is hacky, I'd be interested in hearing what this may look like to get truly integrated into LUS cc @Archez @Kenix3 @briaguya-ai

75402566861__5CA3CF27-394A-4204-B310-EDBF09FAE0DB.mov

Build Artifacts

@briaguya-ai
Copy link
Contributor

i see there being a few options here:

  • hackiest: keeping this as-is so only ControlDeck and Controller are modified - i don't think that's a good idea to merge
  • kinda hacky: no new files, modify ControllerGyro::UpdatePad for reading the mouse data, not sure where setting relative mouse mode goes
  • least hacky: make a new class that inherits from ControllerGyroMapping (possibly rename SDLGyroMapping to SDLControllerGyroMapping and make a new SDLMouseGyroMapping), not sure where setting relative mouse mode goes, would also need to update the input editor(s) to support setting mouse as gyro
    • with this in place we could check to see if we have an SDLMouseGyroMapping to determine if we need to run any slightly hacky mouse logic that needs to live in somewhat less than ideal places
    • another big question here is does SDL mouse work with dxgi? if not we'd either need to make another class for dxgi or we'd need to add logic to ensure none of it shows up/is run when we aren't in SDL land

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