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

Shared vs exclusive HID access #3

Open
dancol90 opened this issue Jun 7, 2020 · 3 comments
Open

Shared vs exclusive HID access #3

dancol90 opened this issue Jun 7, 2020 · 3 comments

Comments

@dancol90
Copy link

dancol90 commented Jun 7, 2020

Hi! mi-360 developer here. Nice project!

I saw that you don't enforce exclusive access to the HID devices when you open them, hence reverting to the standard shared mode. This leaves the Xiaomi Gamepad visible and accessible to the applications and games along with the virtual XBox controller.

Have you ever noticed some incompatibilities with some game leaving two game devices simultaneously available? Have you ever had problems with exclusive access too?

@grayver
Copy link
Owner

grayver commented Jun 7, 2020

Hi Daniele! Nice to meet you! Thanks for your project!

Actually, I didn't test my project in many games, just in couple platformers I played recently. I'm aware of the issue you describing and I see 2 devices in Steam client or in Gamepad Tester (https://html5gamepad.com/). But it doesn't bring any problems in games I've played.

I've read about different solutions described on the README page of HidGuardian (https://github.com/ViGEm/HidGuardian) and I suspect that this problem has no easy solution. I also suspect that exclusive capture of HID device is possible only in kernel mode (but I'm not sure, though). However, this is subject for research.

@grayver
Copy link
Owner

grayver commented Jun 7, 2020

Here is interesting reading on the subject:
signal11/hidapi#302

@dancol90
Copy link
Author

No, there's no easy solution. I found this MSDN page that also confirms that exclusive access is not viable for HID devices.

Since last version of mi-360, it will fallback to shared access if exclusive is not available, but it doesn't feel like the right thing to do

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