yannbouteiller / vgamepad

Virtual XBox360 and DualShock4 gamepads in python
MIT License
169 stars 21 forks source link

VIGEM_ERROR_BUS_NOT_FOUND when used in proton #27

Closed Seraphli closed 5 months ago

Seraphli commented 5 months ago

Thanks for this lib. I tried it on Win10. This works. When running in proton, VIGEM_ERROR_BUS_NOT_FOUND returned. Can this lib run on proton? Is there any way to make it work? BTW, there is no problem when running the installation .

yannbouteiller commented 5 months ago

In proton I don't know, but it works fine outside of proton to control games that are running in proton, we do this in the TrackMania pipeline of TMRL.

I guess you have to hack your way into making proton run vigembus if you want proton to run vgamepad.

Seraphli commented 5 months ago

I guess so. May I ask where ViGEmClient.dll comes from? I noticed that the program has loaded this DLL.

yannbouteiller commented 5 months ago

It is the vigem client.

I don't really know what will happen to Nefarius' repos eventually. If someone takes it on to maintain a community-supported edition, we should switch to this.

yannbouteiller commented 5 months ago

(Closing the issue as support for Proton is not planned, but please feel free to continue using this thread for discussion if someone knows how to do it)

Seraphli commented 5 months ago

Thank you. I later checked the code and discovered this repository. My current finding is that I did not see this device registered successfully in Wine, which led to the BUS_NOT_FOUND error. If there is any way to resolve this, I will update on this issue.

yannbouteiller commented 5 months ago

Thank you. I later checked the code and discovered this repository. My current finding is that I did not see this device registered successfully in Wine, which led to the BUS_NOT_FOUND error. If there is any way to resolve this, I will update on this issue.

Sounds great, thanks :)

Seraphli commented 5 months ago

I spent some time researching this issue. During installation, ViGEmBus uses devcon.exe to install a virtual device, and this installation appears successful in Wine. However, it seems that Wine does not activate any virtual devices but only activates devices that are already present on the host machine, including virtual devices created with libevdev by vgamepad. Specifically, if you query with hDevInfo = setupapi.SetupDiGetClassDevsW(None, None, None, DIGCF_ALLCLASSES), you can find the installed ViGEmBus device, but querying with hDevInfo = setupapi.SetupDiGetClassDevsW(None, None, None, DIGCF_PRESENT | DIGCF_ALLCLASSES) does not show it. I guess there is no way to fix this.