fabiangreffrath / woof

Woof! is a continuation of the Boom/MBF bloodline of Doom source ports.
GNU General Public License v2.0
186 stars 32 forks source link

Add custom gamepad mapping #1739

Open ceski-1 opened 1 month ago

ceski-1 commented 1 month ago

This is an experiment to work around cases where controller mappings haven't been added to SDL's database yet. For example, ChopBlock223 has a unique controller without a mapping. There is a test app that can be used to create a mapping string which can be provided to the SDL devs, but it may take a long time until it shows up in a new release.

I compiled the test app here: controllermap-win64.zip

It prompts the user to press every controller input:

1

Then it outputs a controller mapping string at the end:

2

Which can be copied to woof.cfg:

3

If this initial experiment works okay, it can be developed further to be more streamlined so that the test app is not needed. I was thinking of a sub-menu in Woof that does the same thing as the test app, one level deeper than General > Gamepad, if that's possible. But the details can be worked out later.

rfomin commented 1 month ago

I was thinking of a sub-menu in Woof that does the same thing as the test app, one level deeper than General > Gamepad, if that's possible.

Not sure if it will work now, but I like the idea. We can use it for Audio->Eq.

fabiangreffrath commented 1 month ago

Not sure if it will work now, but I like the idea. We can use it for Audio->Eq.

You mean a nested sub-menu? Yes, we may use this in other situations as well.

ceski-1 commented 1 month ago

We can use it for Audio->Eq.

Yes, that's what I was thinking as well.

Chonkblonk commented 1 week ago

Was I supposed to copypaste the result here?

030000004c0500006802000000000000,SplitFish Game Controller,platform:Windows,crc:5628,a:b0,b:b16,leftstick:b1,leftshoulder:b17,rightshoulder:b10,dpup:b4,dpdown:b6,dpleft:b7,dpright:b5,leftx:a0,lefty:a1,lefttrigger:b8,

030000004c0500006802000000000000,SplitFish Game Controller,platform:Windows,crc:5628,a:b0,b:b16,leftstick:b1,leftshoulder:b17,rightshoulder:b10,dpup:b4,dpdown:b6,dpleft:b7,dpright:b5,leftx:a0,lefty:a1,lefttrigger:b8, Press any key to continue . . .

ceski-1 commented 1 week ago

@Chonkblonk Okay great, the next step would be to download this build and run it once to generate a woof.cfg. Then copy the controller map text into joy_mapping and then launch Woof again and see if every button can be configured correctly.

Or to make it easier, here's a default woof.cfg with your controller map already applied: woof_splitfish.zip

Chonkblonk commented 5 days ago

It works perfectly.

Chonkblonk commented 4 days ago

So, uh, do I need to provide any more input at this time?

ceski-1 commented 4 days ago

So, uh, do I need to provide any more input at this time?

That's it for now. I'll try to develop this further at some point, thank you.

ceski-1 commented 2 days ago

@Chonkblonk Okay some good news, I added your controller to SDL so in the future it will just work automatically. It may take a while until the next SDL release, so I'll still try to develop some kind of input mapping for Woof in the meantime.

fabiangreffrath commented 2 days ago

@ceski-1 This is great news, thank you!