deuso / latx-build

Creative Commons Zero v1.0 Universal
51 stars 3 forks source link

1.5.1 rc 不支持手柄 #4

Closed phorcys closed 3 months ago

phorcys commented 4 months ago

loongarch 原生可以检测到手柄 但是latx就检测不到了,似乎是 udev权限导致的问题

可以使用 https://github.com/Grumbel/sdl-jstest

来简单测试

deuso commented 4 months ago

能否把原生运行的strace log发出来看下?

phorcys commented 4 months ago

sdl2-jstest.x86_64.log sdl2-jstest.loongarch64.log 这是测试日志,手柄是 xbox S ,蓝牙链接, xpadneo 驱动

deuso commented 4 months ago

看上去是一些ioctl未支持

#define JSIOCGVERSION           _IOR('j', 0x01, __u32)                          /* get driver version */

#define JSIOCGAXES              _IOR('j', 0x11, __u8)                           /* get number of axes */
#define JSIOCGBUTTONS           _IOR('j', 0x12, __u8)                           /* get number of buttons */
#define JSIOCGNAME(len)         _IOC(_IOC_READ, 'j', 0x13, len)                 /* get identifier string */

#define JSIOCSCORR              _IOW('j', 0x21, struct js_corr)                 /* set correction values */
#define JSIOCGCORR              _IOR('j', 0x22, struct js_corr)                 /* get correction values */

#define JSIOCSAXMAP             _IOW('j', 0x31, __u8[ABS_CNT])                  /* set axis mapping */
#define JSIOCGAXMAP             _IOR('j', 0x32, __u8[ABS_CNT])                  /* get axis mapping */
#define JSIOCSBTNMAP            _IOW('j', 0x33, __u16[KEY_MAX - BTN_MISC + 1])  /* set button mapping */
#define JSIOCGBTNMAP            _IOR('j', 0x34, __u16[KEY_MAX - BTN_MISC + 1])  /* get button mapping */

后面修一下就行了

deuso commented 3 months ago

1.5.2进行修复

phorcys commented 3 months ago

1.5.2-rc1 测试已经支持