Skip to content

Mac: hid_open_path in non exclusive mode - #148

Closed
mattsains wants to merge 1 commit into
libusb:masterfrom
mattsains:master
Closed

Mac: hid_open_path in non exclusive mode#148
mattsains wants to merge 1 commit into
libusb:masterfrom
mattsains:master

Conversation

@mattsains

Copy link
Copy Markdown

@Youw

Youw commented Feb 22, 2020

Copy link
Copy Markdown
Member

The point is to be able to do it conditionally
The old behavior is might be required too

@mattsains

mattsains commented Feb 22, 2020

Copy link
Copy Markdown
Author

Can you do that with hidapi on Linux? My understand is that in Linux, hidapi does not use the device in exclusive mode. My intention with this PR is to make sure the behaviour on Mac is the same.

My motivation: I developed an application using this library on Linux, and it works great, but when I use the same application on Mac, it steals hid events from the rest of the environment. Essentially hidapi does not have consistency cross platform, and this impacts the functionality of cross platform applications using it

@Youw

Youw commented Feb 22, 2020

Copy link
Copy Markdown
Member

And you're not the first one :)
There're users, who are already using the library. They are relying on backward compatibility, when updating it.

@mattsains

Copy link
Copy Markdown
Author

Do you have examples of users who are expecting hidapi to work this way on Mac?

@Youw

Youw commented Feb 22, 2020

Copy link
Copy Markdown
Member

I don't

Do you have proof there is none?

@mattsains

Copy link
Copy Markdown
Author

No, but I do have a bunch who didn’t expect it to work the way it does, especially since the behaviour is different for different operating systems, and I don’t think this difference is documented.

I don’t really have the space to implement a new feature to specify which mode to use, so if you’re uncomfortable making the change proposed here then feel free to close this pr and I’ll just use my fork in my project and this bug will have to remain until someone else has time to fix it

@Youw

Youw commented Feb 22, 2020

Copy link
Copy Markdown
Member

"I don't have space/time" - is not a good excuse to fix something for some users, and potentially break something for others (we've been there)

I do believe we need to fix this, and yes, someone has to spend additional time to have this fix, AND allow the old behavior, AND don't break API/ABI compatibility for those who don't care

That "someone" is likely going to be myself

Since you came here and raised the issue one more time, I'll move it higher in my TODO list, but I strongly disagree to accept half measures

There'is other active maintainers/contributors, @libusb/hidapi @z3ntu, you'r opinion is welcome here too.

@mattsains

Copy link
Copy Markdown
Author

Although I disagree, I understand your position. Good luck with the project. It would be nice to see this fixed.

@mattsains mattsains closed this Feb 22, 2020
@Youw

Youw commented Feb 22, 2020

Copy link
Copy Markdown
Member

Thanks, we'll do our best

@mcuee mcuee added the macOS Related to macOS backend label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS Related to macOS backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants