v1993 / linuxmotehook

Cemuhook-compliant WiiMote motion provider for Linux
Apache License 2.0
14 stars 0 forks source link

Conflicts with Wii U Pro Controller #1

Closed Sayora77 closed 4 years ago

Sayora77 commented 4 years ago

When I start main.lua with a Wii U Pro Controller connected and a Wii Remote Plus it crashes and doesn't work.

v1993 commented 4 years ago

What is an error printed to console (please format it properly using ``` on each side of message and make sure it worked right using preview)?

Sayora77 commented 4 years ago

When starting with Wii U Pro Controller connected:

Note: using individual calibration values
WiiMote successfully registered (MAC 0x************)
lua: /home/pika/Downloads/linuxmotehook/wiimote.lua:135: No such device
stack traceback:
        [C]: in function 'assert'
        /home/pika/Downloads/linuxmotehook/wiimote.lua:135: in field 'setup'
        main.lua:104: in main chunk
        [C]: in ?

When connecting after starting script:

Note: using individual calibration values
WiiMote successfully registered (MAC 0x************)

(main.lua:5462): Lgi-WARNING **: 11:16:41.308: Error raised while calling 'lgi.cbk (function: 0x55b0b8cd0860): GLib': /home/pika/Downloads/linuxmotehook/wiimote.lua:135: No such device
v1993 commented 4 years ago

Hmm, interesting. Sadly, I think this is a problem with library I use for wiimote handling. Try replacing line 135 in wiimote.lua

    assert(iface:open(wii.core | wii.accel))

with

    iface:open(wii.core | wii.accel)

Does this help? It isn't a proper fix, but might work as workaround.

Sayora77 commented 4 years ago

Yes it does work. It creates an additional useless motion source for the Pro Controller but it can still use the Wii Remote's one thanks!

v1993 commented 4 years ago

Wow, that's weird. I probably should try to workaround this problem by handling open failure as a warning instead. Can you, please, test my fix/workaround when I'll do it?

Sayora77 commented 4 years ago

Ok, sure!

v1993 commented 4 years ago

Please check out v0.2.1, it should work this bug around while not adding useless motion provider.

Sayora77 commented 4 years ago

It does work properly. It just gives warnings, but still lets it connect properly. Thanks!

v1993 commented 4 years ago

Yes, warnings are kept to avoid silencing actual errors. If so, I consider this issue resolved. Also, this bug is probably actually fixed in newer versions of libxwiimote, but I use system-wide one.