isXander / Controlify

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

[Bug] Trigger buttons crossed between two controllers used in separate game instances #117

Open trypspace opened 1 year ago

trypspace commented 1 year ago

Current Behaviour

I'm running two simultaneous, equally modded java game instances (under Nucleus Coop, to simulate split screen), each with its own separate controller (both XInput Gamepad GLFW). Player 1 runs a single player game, Player 2 joins through multiplayer over LAN (emulated in the same machine). This setup worked well in previous game runs using Midnight Controls instead of Controlify. No other controller mods are being run in the current instances.

After selecting which controller is used by each player, input seems at first to work well in both game instances, but if P2 attacks (RT) that triggers the attack function in both game instances simultaneously, P1 and P2. Also, once RT buttons get entangled, left stick in P1 controller often stops working.

Expected Behaviour

Right Trigger in P2 game instance triggers attack in P2 game only, and it does not affect P1 controller function.

Screenshots

No response

Reproduction Steps

  1. Plug in controllers 1 and 2
  2. Run two-player split screen Minecraft in Nucleus Coop, assigning controllers to P1-P2
  3. Once the two game instances are running in the selected display layout, confirm that controller 1 is selected in Controlify settings for P1, and controller 2 for P2
  4. Start Single Player world with P1, Open LAN game
  5. Join the LAN game with P2 in Multiplayer
  6. Test controllers in game with both instances, starting with P2 Right Trigger

Logs

No response

Mod Version

1.4.4 + 1.20.1

Controller

EasySMX Wired Controller, Thrustmaster GP XID Pro Edition

Bluetooth

Operating System

Windows

ARM

Additional Information

Edit: I have tried unplugging and plugging again the controller in game, problem persists - or gets worse.

Just to make sure...

zydezu commented 10 months ago

This quirk also applies to mod configured controls - like a zoom button. A workaround is to unbind all keys from the controller not in use on each instance.