Skip to content

Use the HatDirection enum everywhere in Gremlin#634

Merged
WhiteMagic merged 5 commits into
WhiteMagic:developfrom
code-monet:enum_spread
Sep 16, 2025
Merged

Use the HatDirection enum everywhere in Gremlin#634
WhiteMagic merged 5 commits into
WhiteMagic:developfrom
code-monet:enum_spread

Conversation

@code-monet

Copy link
Copy Markdown
Contributor

..except in the vjoy and dill wrappers


It's quite possible I didn't catch all the paths where it's used, but I at least verified:

  1. Tests passing :)
  2. Input viewer works
  3. Macro action to and from hats work
  4. Condition action works

@WhiteMagic

Copy link
Copy Markdown
Owner

Great I'll look over that and see if I can remember any sneaky places the enum is used.

@WhiteMagic

Copy link
Copy Markdown
Owner

Overall looks good to me. I think you found all the places it's being used at the moment.

Two things we could think of:

  • hat_tuple_to_direction and hat_direction_to_tuple don't seem to be used anymore so should be safe to remove and declutter utils
  • It might make sense to push HatDirection into vJoy as well, as the transformation into vJoy "values" happens in there based on tuple info. But that may also be a "later" thing as it could have quite a few ramifications.

@code-monet

Copy link
Copy Markdown
Contributor Author

Did both, verified by running the E2E integration tests and manually running a profile with macros (I should create an E2E for that also since it has a vJoy action...)

If it looks good please go ahead and merge.

@WhiteMagic
WhiteMagic merged commit 12a8bae into WhiteMagic:develop Sep 16, 2025
1 check passed
@WhiteMagic

Copy link
Copy Markdown
Owner

Great, thanks a lot!

@code-monet
code-monet deleted the enum_spread branch September 16, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants