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

controller rework v2 #371

Open
briaguya-ai opened this issue Nov 12, 2023 · 5 comments
Open

controller rework v2 #371

briaguya-ai opened this issue Nov 12, 2023 · 5 comments

Comments

@briaguya-ai
Copy link
Collaborator

briaguya-ai commented Nov 12, 2023

wii u related

  • figure out wonkyness with wiimote+nunchuk mappings (it seems nunchuck buttons aren't getting set but the wiimote equivalent are - this is happening in KPadStatus - hold vs nunchuck.hold)

imgui related

  • pressing the menubar toggle button on a controller toggles it twice
    • imgui logic for reading from controllers feels kind of wonky in general, i tried a few things here and nothing felt consistent, i think a true solution to this issue will come with remappable hotkeys outside of imgui (i'm thinking another tab like ports that has hotkey config, then we can use the controldeck and controller and read from the devices with a ___ToHotkeyMapping (this would get us remappable hotkeys)
  • game pausing for disconnect/remap screens
  • disconnected controllers as vector to show which ports are disconnected when multiple disconnected
  • add colored font awesome icon for each controller with a mapping in a port tab
  • persist controller button names when controller is disconnected
  • (super nitpicky) get it so the controller config menu remembers the ordering of mappings when closing and opening the game
  • wrap mappings to next line instead of overflowing to the right, put analog stick preview to the right
  • advanced devices tab functionality
    • show buttons pressed
    • button to force rumble
    • button to force LED
    • sticks
    • gyro
  • have buttons (n64 buttons at the beginnings of lines) light up when an associated mapped button is pressed

not sure if it's a problem

  • handle disconnected controller mappings more elegantly, right now they just fill up the config (this might become an issue with manual clearing, in which case it'll move up to v1)

code cleanup

  • move some of the shared logic out of ControllerStick/ControllerButton/ControllerGyro/ControllerRumble/ControllerLED (maybe just wait and do this as part of attachments)

additional functionality

  • attachments
    • i see the reasoning here, but i don't see a clear path forward for this given the current limitations in how we handle "controller output." i plan to build things in a modular way that should make moving to an attachment system straightforward, but i think it makes sense to make those architectural decisions in a PR separate from this one
  • "chord" style mapping - make it possible to require multiple physical buttons be pressed to activate a virtual button/axis
  • deadzone math #351
    (see nitpick appendix)

new controller types

  • TAS
    • flag on controller that short circuits ReadToPad and reads from tas instead
    • flag on controller that writes to tas file
    • need to byteswap KiritoDv@bd01dd7
    • ui needs to make it clear that restarting is needed (maybe force now?)
@Malkierian
Copy link
Contributor

Ability to toggle background/unfocused input.

@briaguya-ai
Copy link
Collaborator Author

briaguya-ai commented Dec 19, 2023

  • stick range (some devices can't reach 100% of SDL range, provide a way to increase sensitivity so the actual max can be used as 100% in LUS) stick sensitivity HarbourMasters/Shipwright#3725
  • gamecube trigger digital buttons (this might require implementing a native gc controller backend, but worth looking into if this can be done with SDL)

@briaguya-ai
Copy link
Collaborator Author

native switch - need this for motion controls and to avoid the sdl "always have 8 devices connected" wonkyness

@briaguya-ai
Copy link
Collaborator Author

briaguya-ai commented Dec 19, 2023

keyboard mapping when controller mapping window outside of main soh window:

platform gfx backend working?
linux opengl ✔️
windows directx
windows opengl ✔️
mac opengl ✔️
mac metal ✔️

@briaguya-ai
Copy link
Collaborator Author

add more robust "clear all" functionality, some controllers/systems have managed to get into states where the same device is duplicated in the config and it's not something that's easy to repro. while the best UX would be to have this never happen, until it is fully understood it will be good to have a way to get back to a functional state (even if that means losing mappings) where the entire controllers section of the config is cleared

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

No branches or pull requests

2 participants