switchbrew / libnx

Library for Switch Homebrew

Home Page:https://switchbrew.github.io/libnx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UsbHsInterfaceInfo has swapped input and output endpoint descs?

cathery opened this issue · comments

I'm running pacman release of libnx (2.5.0) on system version 8.0.1 and AMS 0.9.4

I'm getting this issue after querying available interfaces where all interfaces' infos seem to have input_endpoint_descs and output_endpoint_descs swapped with each other, which results in IN endpoints having the 0x00 address (OUT), and OUT endpoints in having the 0x80 address (IN).

Can someone else confirm this? Here's a screenshot from my applet example

example

Known issue, also happens with the switch-examples app. This was a system-side change with [8.0.0+] going by testing, however when I last checked the sysmodule code there wasn't much difference. :-/

FWIW you could also get endpoints via control-transfer(s).

alright, how should i address this? invert them in my code for the time being, check for hosversion? or will this be accounted for in the library?

libnx will eventually handle it - and see previous comment (example already has some related code for it).

"invert them in my code" Would silently break with a libnx version that has it fixed. :/

alright thank you, i'm looking forward to the next release

Re-opening, it's not fixed yet :p

Can you post the lsusb -v output for the device(s) you were using at the time of the above screenshot?

The devices i used were Xbox 360 Controller (4 interfaces) and Xbox One controller (3 interfaces), here's the pastebin, i'm not very familiar with linux so sorry if i missed anything
https://pastebin.com/UeWAfBCp

ok