MissingNO123 / GCIR

Gamepad to Luma3DS InputRedirect, in Python
8 stars 2 forks source link

ZL/ZR Stuck sending input, even when unmapped. #10

Open CocoaCherry opened 7 years ago

CocoaCherry commented 7 years ago

Hello! Hoping you're having a good day! So, I just discovered your project and I've been trying to make it work with a Wii Classic Controller. It was a success while using it in games without Circle Pad Pro support, however, and I've tried with different controllers and configurations. But every time I get into a game that supports the Circle Pad Pro (In my case Smash Bros 3Ds, Monster Hunter Generations, MH4 Ultimate and Resident Evil - Revelations) the ZL and ZR won't stop sending input to the 3Ds, effectively getting stuck. In Resident Evil I can't stop aiming and shooting uncontrollably, in Smash I can't stop shielding and in both Monster Hunter titles the Camera won't stop spinning, all of them actions that are mapped to those two buttons. The problem won't even stop if I remove them from the buttonMappings dictionary, Am I overlooking something? I hope you can help me, if not, I hope I could bring bring your attention to this. Here's a link to the configuration in case you need it, but I doubt it's this since I only changed it a little bit. Cheers! https://pastebin.com/NnLZ2ep3

Edit: Btw, I forgot to mention, the right stick works without a problem. it's only those two buttons.

MissingNO123 commented 7 years ago

Actually, you just figured out a problem that's been bugging me since the beginning, which is that this program for some reason doesn't work in games using extended memory mode, since I tested it and it works fine in other games that use the Circle Pad Pro (Shantae and the Pirate's Curse). I'll have to ask Luma Devs if it's a problem on their end.

CocoaCherry commented 7 years ago

Well, that's sad, hopefully it can be fixed soon. On that note, another thing I just noticed is, remember when I said the right stick works without problems? I was wrong. The X and Y axis work as intended. Left goes left, up goes up and so on... But Up and Left goes Downwards and to the right and this happens for every diagonal direction, they go to the opposite side of what they should.

hlixed commented 7 years ago

I don't know why that might be happening, but you could always use a hacky sort of fix and multiply the left stick's coordinates by -1:

                        if event.axis == 0: server.circle_pad_coords[0] = int(32767*event.value) #ls x
                        if event.axis == 1: server.circle_pad_coords[1] = int(-32767*event.value) #ls y

->

                        if event.axis == 0: server.circle_pad_coords[0] = int(-32767*event.value) #ls x
                        if event.axis == 1: server.circle_pad_coords[1] = int(32767*event.value) #ls y

The problem is, you put wiiclassic.py up on pastebin, so you can't really change it. Why not fork this repository by clicking the fork button on the top right, and add wiiclassic.py in a new commit on your own fork? That way you can just tell people to download from your own fork, and it'll always be up to date. If you're new to github, here's a good guide on how forks work. If you do that, make sure to update README.md with information on how to use wiiclassic.py and what the difference is in your fork!

MissingNO123 commented 7 years ago

Actually, that's an error on my part, since the right stick input is rotated 45 degrees to match the new3DS C-stick but I never thought to account for the integer overflow that happens when converting an input taken from the right stick pushed to one corner.