-
Notifications
You must be signed in to change notification settings - Fork 32
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
xarcade2jstick opens the wrong FD #39
Labels
Comments
Would you say that this patch should be integrated into the master branch? |
I think so. It's slightly more brittle due to having to parse the number
out of the filename, but it's worth fixing this bug. Although, I don't see
anybody else with the same issue, so maybe it's not so important after all.
…On Wed, Mar 13, 2019, 11:32 PM Florian ***@***.***> wrote:
Would you say that this patch should be integrated into the master branch?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA_TdJx2zPcP6USaxN35pUEf63GUvp5qks5vWezrgaJpZM4J9e9z>
.
|
It would be great if someone could create a PR for the patch above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On my system the board shows up as two distinct devices under
/dev/input
. Due to precarious circumstances, they are/dev/input/event9
and/dev/input/event10
, but because xarcade2jstick simply opens the first one it finds andglob(3)
returns the entries in lexicographical order, xarcade2jstick opens/dev/input/event10
instead of the correct one,/dev/input/event9
. This (event9
andevent10
) is the only case where it happens because the numbers straddle the single- and double-digit boundary. (I suppose it also happens atevent99
andevent100
.)Operating under the assumption that the lower number is better, I've patched the driver to sort the entries based on the number. This may not be a correct assumption, which is why I've created this as an issue instead of a PR. The patch follows:
The text was updated successfully, but these errors were encountered: