Controller support

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Controller support

Re: Controller support

by mjr4077au » Sat Jun 13, 2020 1:19 am

This can be closed by way of https://github.com/coelckers/Raze/commi ... 3cc7710ecb. Joysticks have been tested with another user successfully following changes to the code.

Re: Controller support

by mjr4077au » Thu Jun 11, 2020 6:48 am

@bisk89, thank you for your patience :). Are you able to build from this branch and test joysticks in Duke 3D on macOS for me? This is tested on an XInput Xbox 360 controller under Windows. https://github.com/mjr4077au/Raze/tree/JoyFixes. `duke_compatibility_15` should be off as well.

I'm interested in feedback on:

- Does it work?
- How's the out of box sensitivity (was going for playability at 1.5x sensitivity)?
- What you think as a game pad/joystick user would be optimal?

Re: Controller support

by bisk89 » Fri Apr 17, 2020 3:47 am

mjr4077au & Graf Zahl, thank you for your response. Then I will wait patiently :)

Re: Controller support

by Graf Zahl » Tue Apr 14, 2020 5:53 am

mjr4077au wrote:
bisk89 wrote:Any chances for fixing this issue soon? Please :)
There's so much work that Graf's doing right now to try and unify the backends between GZDoom and Raze, similar to how the music system is unified by use of the ZMusic library. It's highly likely that joypads aren't working due to some bullshit minute difference between the two projects, etc.(
These problems are a real pain in the ass. Once the backends are unified they should be reduced quite a bit because feedback for one engine will quickly be picked up by the other - and GZDoom simply has a lot more users.

One problem of course is that some of the design flaws owed to ZDoom's long history need to be fixed as well.

Re: Controller support

by mjr4077au » Tue Apr 14, 2020 4:16 am

bisk89 wrote:Any chances for fixing this issue soon? Please :)
There's so much work that Graf's doing right now to try and unify the backends between GZDoom and Raze, similar to how the music system is unified by use of the ZMusic library. It's highly likely that joypads aren't working due to some bullshit minute difference between the two projects, etc.

Will try to take a further look but as you might have seen from some recent bug posts, the Linux experience isn't great at the moment as a whole and Blood isn't loading either due to some palette changes. Probably a bit higher in priority, sadly :(

Re: Controller support

by bisk89 » Tue Apr 14, 2020 4:07 am

Any chances for fixing this issue soon? Please :)

Re: Controller support

by bisk89 » Wed Apr 08, 2020 2:18 pm

mjr4077au wrote:So when enabling controller support, it now enables without a restart which is great, but there's two active code paths at play as per the screenshot.

When I move in the menu, input is recognised twice and therefore goes skips options etc. Unfortunately the net result is this still doesn't work in-game.
controllerWoes.PNG
I'm not 100% sure, but it also happens sometimes in GZdoom

Re: Controller support

by mjr4077au » Wed Apr 08, 2020 5:25 am

So when enabling controller support, it now enables without a restart which is great, but there's two active code paths at play as per the screenshot.

When I move in the menu, input is recognised twice and therefore goes skips options etc. Unfortunately the net result is this still doesn't work in-game.
controllerWoes.PNG

Re: Controller support

by bisk89 » Wed Apr 08, 2020 4:46 am

Tested, but still not working for me :(

Re: Controller support

by Graf Zahl » Wed Apr 08, 2020 2:45 am

in_joystick was the inherited one from early porting work. I switched all places over to use use_joystick which is the one used everywhere in the backend and removed in_joystick.

Re: Controller support

by mjr4077au » Wed Apr 08, 2020 2:27 am

Graf Zahl wrote:I think I found the problem here.
First, as has been said, there are 2 CVARs that control this, but the worse part is that after migrating to GZDoom's input system the joystick polling code wasn't reactivated again when use_joystick was toggled.
Nice one! Happy to test locally if you don't have a suitable pad at home?

Are you planning to ditch in_joystick? It was the lesser used of the two from my review.

Re: Controller support

by Graf Zahl » Wed Apr 08, 2020 2:24 am

I think I found the problem here.
First, as has been said, there are 2 CVARs that control this, but the worse part is that after migrating to GZDoom's input system the joystick polling code wasn't reactivated again when use_joystick was toggled.

Re: Controller support

by bisk89 » Sun Apr 05, 2020 8:44 am

mjr4077au wrote:bisk89, from the console while in-game, can you please type 'in_joystick 1'? When joysticks are enabled from the menu at the moment, it sets use_joystick to true/1, however the game is checking whether to get joystick axes only if in_joystick is true/1.
Tried while ago, but just as you thought, it changes nothing

Re: Controller support

by mjr4077au » Sun Apr 05, 2020 6:18 am

_mental_, thanks for providing that build script. Awesome stuff :D

bisk89, from the console while in-game, can you please type 'in_joystick 1'? When joysticks are enabled from the menu at the moment, it sets use_joystick to true/1, however the game is checking whether to get joystick axes only if in_joystick is true/1.

Fixing this did not resolve the issues for me on Windows, but interested in feedback from a macOS user to eliminate an OS-specific issue.

Re: Controller support

by bisk89 » Sun Apr 05, 2020 5:36 am

Thanks for the script, It worked (finally! :)). Unfortunately my analog sticks don't work, just like before :cry:
mjr4077au wrote:Will concentrate more effort around what CONTROL_GetInput() in inputstate.cpp is doing and work backwards from there. This is the function each game calls when it requests input from the mouse and joystick.

great :D

Top