Valkirie / HandheldCompanion

ControllerService
Other
1.2k stars 92 forks source link

Citra Canary controller binding lost #931

Closed BriaN890501 closed 9 months ago

BriaN890501 commented 10 months ago

Device manufacturer

Device model Steam Deck LCD

Handheld Companinion Version 0.19.1.8

Describe the bug After version 0.19.x, keybinding on Citra emulator is lost on reboot, controller can be rebinded but still losts on reboot, had to revert to 0.18.0.6

To Reproduce Steps to reproduce the behavior:

  1. Install HC version 0.19.1.8
  2. Open citra
  3. no input observed
  4. rebind controller, which works
  5. reboot and binding is lost

Expected behavior Keybinding persists after updating HC / rebooting device

CasperH2O commented 10 months ago

@BriaN890501 , thanks for reporting in. Respectfully it sounds like a Citra issue, if HC is running with the same (virtual) controller connected and you start Citra, it should be able to see the same controller to connect as when it closes?

BriaN890501 commented 10 months ago

My bad. All the previous mentioned "reboot" refers to device reboot (in this case Steam Deck) It certainly works after rebinding and open / closing Citra

CasperH2O commented 10 months ago

@BriaN890501 altough currently the DSU server is broken on the last few HC versions, we have a fix coming for that. Perhaps you could configure a DSU client as controller input instead in Citra, will also allow for touch controls and motion (if applicable for the game)?

BriaN890501 commented 10 months ago

@CasperH2O I don't think configure a DSU client as controller input in Citra is available. However, I think I found the culprit. Citra seems to bind controller by specific hardware id, as referenced in this Citra issue: https://github.com/citra-emu/citra/issues/4509

The latest HC seems to be providing different "guid" to Citra on device reboot, thus not recognizing previously binded controller.

CasperH2O commented 10 months ago

@BriaN890501 ah, yes that makes sense, HC makes a new hardware controller to get it to slot 1.

You could try disabling Controller Manager on the Controller page in the main GUI?

BriaN890501 commented 10 months ago

Yeah, I've done that and rebooted device but it still assigns a new id. Is it a feature after 0.18.0.6? cause I've only encountered this behavior on newer versions.

Thanks for the active reply!

CasperH2O commented 10 months ago

@BriaN890501 yes, it's definitely new. It might also be that disabling it is actually not working: #912

CasperH2O commented 9 months ago

@BriaN890501 I recommend you make a HC Profile for Citra and tick the box to allow it access to the physical controller. Unless you need HCs virtual controller for say remapping the Nintendo Layout?

BriaN890501 commented 9 months ago

Tested just now with 0.20.3.1, unfortunately allowing citra to access physical controller doesn't solve the issue, the controller guid in citra's qt.config still changes on device reboot, even with controller management disabled.

Is it possible to add a toggle to disable HC from assigning new id to controller?

MSeys commented 9 months ago

@BriaN890501 set the emulated controller type to DualShock 4 for Citra. We only do "random"/ unique Ids for Xbox 360 emulation.

CasperH2O commented 9 months ago

Yes, @MSeys suggestion is good, you can further improve this by setting the preferred virtual control in the Citra Profile in HC to DS4.

BriaN890501 commented 9 months ago

Yeah, changing controller type to ds4 in citra profile fixed the issue! Thanks for the continuous support!