drfrag666 / gzdoom

GZDoom adds an OpenGL renderer to the ZDoom source port.
http://gzdoom.drdteam.org
GNU General Public License v3.0
73 stars 15 forks source link

No way to discriminate gamepad input #11

Closed Denshadego closed 4 years ago

Denshadego commented 4 years ago

Using LZDoom, when trying to set up a fake splitscreen scenario with two instances and two Xbox gamepads, after disabling all axis input from one joystick, button presses for actions made with triggers or face buttons occur simultaneously in both windows. Also tried with player one using Xpadder to simulate keyboard presses (with gamepad support disabled in that window), but the second player instance still reacts to the first player button presses.

I hope in the future there's a way to disable all input from one of two gamepads instead of only it's axis, or to differentiate one gamepad from another on the customize control menu ("ltrigger1" instead of global "ltrigger"). A function to receive keyboard input while in background would be a patch solution to make the Xpadder method viable, with both windows gamepad support disabled, but working through virtual keyboard inputs.

drfrag666 commented 4 years ago

I know, ZDoom only supported one joystick at the same time since there was only one player. I added support for up to 4 DirectInput joysticks with 32 button each and it's in the new release. Before all the buttons were the same for all joysticks (they sent the same events). I could try to do the same for XInput, since those controllers are compatible with DInput at least for now you could use them as DInput ones disabling XInput support in the game.

drfrag666 commented 4 years ago

Did you manage to make them work as DInput controllers? I'm asking since a don't own a single XInput controller let alone two and i'd need to do a blind attempt to fix them.

Denshadego commented 4 years ago

Yes! I'm sorry for not replying sooner. It worked like a charm using two Xbox Gamepads. I disabled the Xinput option in the menu, and used the controllers as Dinput. There should be a clarification for people downloading the fork though, specifying that the bindings are not automatic, as both instances will use the same controller for the player, so one has to delete all bindings and reassign them on each instance with the gamepad the player wants to use for said instance. Sounds convoluted but is not. Thanks a lot for your work, as of now, this is the best way to play local Doom MP in PC.

drfrag666 commented 4 years ago

Thanks, glad it's working. I don't think it's worth adding native support for multiple XInput controllers as i don't own any and i'd need to do it blindly. So for now i'm closing this.

drfrag666 commented 4 years ago

I'm thinking about attempting to add XInput too, could you do some testing?

Denshadego commented 4 years ago

Yes, of course!

El mar., 7 de ene. de 2020 19:52, dondiego notifications@github.com escribió:

Reopened #11 https://github.com/drfrag666/gzdoom/issues/11.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/drfrag666/gzdoom/issues/11?email_source=notifications&email_token=ALM6VVGCJ2FVSETK22XT2STQ4UBUNA5CNFSM4JFPHL32YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOV2M6PLY#event-2929321903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALM6VVFWVILW5LZ5PD5IJRDQ4UBUNANCNFSM4JFPHL3Q .

drfrag666 commented 4 years ago

Thanks, here it is. It's a blind shot. https://devbuilds.drdteam.org/lzdoom/lzdoom-d-x64-265-g1fed15efc.7z

Denshadego commented 4 years ago

I'm sorry for taking so long to test, being kinda busy here. Yes! it works just as direct input did. I disabled the directinput gamepad option to go only with xinput, did a mp test with two folders for each player and it works. Just as before, you have to exclude input for the one of the controllers in the options and assign manually the buttons for firing, open, run, etc, and they are assigned separately for each gamepad (eg.: righttrigger2) which is good. Thanks for the update, it works great so far.

On Mon, Jan 13, 2020 at 10:10 AM dondiego notifications@github.com wrote:

Thanks, here it is. It's a blind shot. https://devbuilds.drdteam.org/lzdoom/lzdoom-d-x64-265-g1fed15efc.7z

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/drfrag666/gzdoom/issues/11?email_source=notifications&email_token=ALM6VVDXKWJBJCWWP2KRJDDQ5RR3PA5CNFSM4JFPHL32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIYURZI#issuecomment-573655269, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALM6VVGOWNO6ZK3WNP247EDQ5RR3PANCNFSM4JFPHL3Q .

drfrag666 commented 4 years ago

Actually that was pretty quick. Great to know it's working, now i can close this for good. Thanks again.