Skip to content

Add hidden DisableDPadAsAnalogInput option - #604

Merged
hyperbx merged 1 commit into
hedge-dev:mainfrom
Refragg:dpad-as-analog-input-option
Mar 6, 2025
Merged

Add hidden DisableDPadAsAnalogInput option#604
hyperbx merged 1 commit into
hedge-dev:mainfrom
Refragg:dpad-as-analog-input-option

Conversation

@Refragg

@Refragg Refragg commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

This PR adds a configuration entry in the 'Codes' section named DPadAsAnalogInput allowing someone to enable or disable the movement of Sonic / the world map cursor using the directional pad buttons.
This default behavior on the original game was to not move Sonic / the world map cursor when the dpad was used, I thought it would be good to let people choose this if they want. Let me know if anything else needs to be changed.

@DeaTh-G

DeaTh-G commented Mar 2, 2025

Copy link
Copy Markdown
Contributor

The d-pad controls are added into the recompilation as an enhancement and are purposefully not exposed on a toggle.

@DeaTh-G DeaTh-G closed this Mar 2, 2025
@DeaTh-G DeaTh-G reopened this Mar 2, 2025
@Refragg

Refragg commented Mar 2, 2025

Copy link
Copy Markdown
Contributor Author

I understand, maybe this option could still exist while staying on by default? I know that it personally does bother me a bunch, it can be annoying for some tricks in the game.

@blueskythlikesclouds

Copy link
Copy Markdown
Member

What tricks can it be problematic with? Does it get in the way of some pausing tricks or similar?

@Refragg

Refragg commented Mar 2, 2025

Copy link
Copy Markdown
Contributor Author

It's probably not things that a casual player would run into but for example with speedrunning, there is one notorious trick named XP glitch where the dpad and the left stick are used at the same time and it does not really play nicely.

@blueskythlikesclouds

Copy link
Copy Markdown
Member

Oh okay, that's valid.

@Refragg
Refragg force-pushed the dpad-as-analog-input-option branch from 1763117 to 93a1db3 Compare March 2, 2025 18:03
@Refragg

Refragg commented Mar 2, 2025

Copy link
Copy Markdown
Contributor Author

Okay, I've inverted the option so that the dpad movement is enabled by default and I changed it's name to DisableDPadAsAnalogInput instead.

Comment thread UnleashedRecomp/patches/input_patches.cpp Outdated
@Refragg
Refragg force-pushed the dpad-as-analog-input-option branch from 93a1db3 to c454c83 Compare March 2, 2025 20:19
@Refragg Refragg changed the title Add hidden DPadAsAnalogInput option Add hidden DisableDPadAsAnalogInput option Mar 2, 2025

@blueskythlikesclouds blueskythlikesclouds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few issues:

  • Space hurrier hooks aren't checking for the bool.
  • IsDPadThreshold isn't checking for the bool, causing the DS4/DualSense touchpad to stop if you press the D-Pad keys despite them not moving the cursor.

@Refragg

Refragg commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Right, I didn't touch these as I wasn't sure what they were doing. Also, I don't have access to a DS4 controller so I won't be able to test this. Either way, I'll get to this later today.

This commit adds a configuration entry in the 'Codes' section named DisableDPadAsAnalogInput allowing someone to enable or disable the movement of Sonic / the world map cursor using the directional pad buttons.
@Refragg
Refragg force-pushed the dpad-as-analog-input-option branch from c454c83 to 23900ca Compare March 3, 2025 16:42
@Refragg

Refragg commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Alright, again, I can't test these changes as I don't have a DS4 and I don't know what SpaceHurrier is but i think that's what you wanted me to add, right?

@hyperbx

hyperbx commented Mar 3, 2025

Copy link
Copy Markdown
Member

PostureSpaceHurrierDPadSupport is for the Gaia Colossus posture.

@Refragg

Refragg commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Ah alright, that makes more sense now, thanks for that information.

@Refragg

Refragg commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Interestingly, from my testing, it looks like those space hurrier hooks might not even be needed. If I remove their entire code, when the dpad analog input is enabled, Gaia Colossus still moves. He doesn't move when the analog input is disabled regardless of whether the original hook code runs or not. Unless the space hurrier posture doesn't actually mean the movement of Gaia Colossus?

@hyperbx

hyperbx commented Mar 3, 2025

Copy link
Copy Markdown
Member

They're needed for the leaning animations.

@Refragg

Refragg commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Fair enough, I didn't quite understand it i suppose, apologies for my lack of knowledge on all this 😅

@DeaTh-G DeaTh-G added this to the v1.0.2 milestone Mar 4, 2025
@raixstailo

Copy link
Copy Markdown

Hi, as a former unleashed runner I gotta say that moving sonic with the dpad buttons is very annoying to me as it makes some speedrun tricks very hard to perform. I know it was added as an enhanced to the game, but I'd love if we could disable it. So my question is: is this going to be added in the future? Please do it or I will need to buy a xbox controller (I have a ps5 controller)

@hyperbx

hyperbx commented Mar 5, 2025

Copy link
Copy Markdown
Member

This PR adds the ability to disable D-Pad support using a HMM code, please wait for v1.0.2.

@raixstailo

Copy link
Copy Markdown

Thank you so much.

@RagdollClash RagdollClash added the hmm code Issue caused by a feature exposed as a hmm code label Mar 5, 2025
@hyperbx
hyperbx merged commit c07a754 into hedge-dev:main Mar 6, 2025
@Refragg

Refragg commented Mar 6, 2025

Copy link
Copy Markdown
Contributor Author

Thank you for the merge! I just have one last question, do you want me to make a PR to the HMMCodes repository to add the code or do you guys prefer to handle that yourselves?

Refragg added a commit to Refragg/HMMCodes that referenced this pull request Mar 6, 2025
Enabling this code will disable analog movement with the dpad (Sonic's movement, the world map cursor movement...). The dpad will still work for the menus.

See hedge-dev/UnleashedRecomp#604.
Refragg added a commit to Refragg/HMMCodes that referenced this pull request Mar 6, 2025
Enabling this code will disable analog movement with the dpad (Sonic's movement, the world map cursor movement...). The dpad will still work for the menus.

See hedge-dev/UnleashedRecomp#604.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hmm code Issue caused by a feature exposed as a hmm code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants