isXander / Controlify

Another controller mod - for fabric!
https://www.isxander.dev/mods/controlify
GNU Lesser General Public License v3.0
159 stars 37 forks source link

Some issues i've encountered while trying to setup Controlify on 1.20-pre4 #77

Open vico93 opened 1 year ago

vico93 commented 1 year ago

Describe the bug First things first: i don't know exacly if this is related to the MC version, the fact i'm running both Minecraft and the current profile/installation in different folders than usual (the Minecraft root was changed to C:\Jogos\Minecraft using --workDir launcher parameter, and the game directory of the installation i'm testing the mod is under .\profiles\vicocraft-1.20 inside the folder above) or because i have DS4Windows (althrough stopped), HidHide and FakerInput installed on my machine (taking the opportunity to ping @Ryochan7 to help figuring out if DS4W is interfering in any capacity Controllify even stopped).

So, basically, I'm having a lot of issues since i started trying to test Controllify on my installation (for a friend), first of all i stopped DS4Windows to not take over the controller as usual (Hide DS4 controller is ON, that's why i needed to stop it), on the first run of Minecraft with controllify it asked me to download the native stuff for the mod to run at its plenty, i did YES but the screen doesn't reacted at all, even with controlify-natives\sdl2-jni-natives-2.26.5-18-windows64.dll appearing on my game directory.

So i close the game and opened again, when it opened, althrough the Square and Circle icons appeared on the Options and Exit Game buttons, i cant control it either with D-Pad or Left Thumbstick. Tried to regain control with the mouse just causes a "fight" for the cursor between the controller (i think) and the mouse that ends up only with the controller being disabled, and from that point i regain control with my mouse: image So i go to Options > Controls > Controller Settings and mark Load Natives to Yes, restart the game, same error happens. Back to the Controller Settings i try to activate my Dualshock 4 but when i click on Save a very similar issue happen: the Square button appears on Done button but i cant control either with my DS4 or with mouse, no button on the controller works and the mouse try to move the cursor but it insists in stay on a point, and then the controller "gives up" and is disabled.

So í'm clueless of what is happening. Like i said in #68, i don't want to remove DS4Windows and its company software (HidHide and FakerInput) because that's the only way to play with my DualShock 4 and have stuff like force feedback and such in a couple of games and emulators.

Minecraft Info (please complete the following information):

isXander commented 1 year ago

From my testing, DS4Windows does not cause any issues with Controlify. What you are experiencing is the Controlify thinks the controller is constantly giving input, so one tick it changes to controller mode, the next to mouse and keyboard. Repeat.

To fix this, we need to identify where this input is coming from. First, make sure your thumbstick deadzones are calibrated correctly, second, try the latest commit of Controlify from GitHub actions.

If not, let me know and I'll try to help you further.

vico93 commented 1 year ago

Will try it ASAP. Thanks!

vico93 commented 1 year ago

So, the first topic: just grabbed the Controllify latest build on Actions, YACL 3.0.0-beta.5+1.20 on a fresh installation and booted the game. Callibrated my pad and then proceeded to the Native Library menu.

Unfortunately, even after clicking Yes (Sim on the print) and having the native downloaded, it doesnt advance. It stays on that screen, both Yes or No options doesnt do anything. image

vico93 commented 1 year ago

After closing the game and starting again (also closing Steam and other things that could interfere with the mod <> controller interaction) i still got the same error of before: no buttons of axis work at all on the menu, and trying to grab the mouse back just start that "battle" i did, where the cursor want to stay on the previous position, no matter how hard we try to move - and, after a while, the controller got disabled with that toast.

I tried then heading to the mod menu to access the mod options, it shows the controller with that black/magenta checkerboard image instead of what i suppose to be the controller icon, and when i tried to enter it's settings, got this error: GIST

On the gist there is also the latest.log to see if it can shed some light on the issue.

vico93 commented 1 year ago

Okay, there is some weird things happen on my end, i think.

I was doing this "tests" with DS4Windows opened but "stopped" (i.e., without actively trying to patch the controller), but when i headed to Windows's joy.cpl i noticed the Wireless Controller wasnt giving any output at all.

So, after starting DS4W again it resumed sending output, i went again in joy.cpl and all controllers were being shown on the virtual Xbox controller it creates. The strange is that before i tried to open Minecraft for the first time, the controls were working normally on the Wireless Controller entry, it was after i got that crash that the controls stopped work on there.

Even the controller icon works as intended when under DS4W: image

Unfortunately, as i suspected, neither Gyro or Vibration works when the controller is under DS4W disguise: image

Well, pingging @Ryochan7 to see if he thinks i should open a ticket on DS4W repo about this, as it seems to not be caused by Controllify at all.

isXander commented 1 year ago

I got this working with a DS4 controller with the following settings:

isXander commented 1 year ago

Did you get this working?

Ryochan7 commented 1 year ago

I was doing this "tests" with DS4Windows opened but "stopped" (i.e., without actively trying to patch the controller), but when i headed to Windows's joy.cpl i noticed the Wireless Controller wasnt giving any output at all.

Must be using a Bluetooth connection. Once a Bluetooth connected DS4 is opened in proper DS4 mode (for using Gyro, Touchpad, Rumble), the old DirectInput interface exposed in joy.cpl will be seen as a dead controller. That is how the hardware works in general on Windows as Steam Input exhibits the same behavior; that does not happen when the DS4 is connected to the PC via a USB connection. That is another reason why hiding the real DS4 is sometimes necessary. I usually use a controller wired via USB.

I would think that Controlify would open the controller in DS4 mode as well to utilize the Gyro and Rumble motors. I would think things should work fine if you make sure DS4Windows is not using the controller at the same time as Controlify.

vico93 commented 1 year ago

Did you get this working?

Uh sorry for not testing that yet, i was busy trying to fix via datapacks the crap worldgen Mojang introduced past 1.18, so i didnt had time to test Controllify with the new setting on profile.

Must be using a Bluetooth connection. Once a Bluetooth connected DS4 is opened in proper DS4 mode (for using Gyro, Touchpad, Rumble), the old DirectInput interface exposed in joy.cpl will be seen as a dead controller. That is how the hardware works in general on Windows as Steam Input exhibits the same behavior; that does not happen when the DS4 is connected to the PC via a USB connection. That is another reason why hiding the real DS4 is sometimes necessary. I usually use a controller wired via USB.

I would think that Controlify would open the controller in DS4 mode as well to utilize the Gyro and Rumble motors. I would think things should work fine if you make sure DS4Windows is not using the controller at the same time as Controlify.

I forgot to point that - yeah, i'm using the controllers by bluetooth because i dont have a cable long enough to connect on the PC (actually, i don't even have enough ports free to connect it)

vico93 commented 1 year ago

Okay, i tested again right now with 1.3.0-beta.2, and the first thing i noticed is that trying to navigate in any part of the Controller Settings menu is giving me this crash periodically. That's hampering much of the test i'm wanting to do.

From what i was able to test, making a DS4W profile with the settings you suggested makes Controllify to not detect any controller on the system. Switching back to the profile i used to have enables the virtual x360 controller to show up, but without gyro or vibration support.