Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add horizontal mouse wheel support #544

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andrikpowell
Copy link
Contributor

@andrikpowell andrikpowell commented Nov 30, 2024

This was slightly more difficult than it should've been. Code is adapted from Woof, and so it works the same way.

Required a delay event only for mouse scroll actions, requiring a new type of input. Vertical and Horizontal scroll now use the same new input. (This is all done in the same way as Woof)

@andrikpowell andrikpowell force-pushed the dsda-horiz-mouse-wheel-input branch from d17bf4f to 2b4e71f Compare December 1, 2024 00:55
@rfomin
Copy link
Collaborator

rfomin commented Dec 1, 2024

I'm pretty sure we shouldn't allow using the mouse wheel for movement, it's considered cheating. Woof used to have a check for this: fabiangreffrath/woof#703 It was removed during the refactoring, and I didn't restore it, but Woof is not as strict as DSDA-Doom. We should at least ask on the speedrunning discord.

Also:

- Close an exploit in mousewheel input

@andrikpowell
Copy link
Contributor Author

andrikpowell commented Dec 1, 2024

I'm pretty sure we shouldn't allow using the mouse wheel for movement, it's considered cheating.

I agree. Checking with the previous versions, the mousewheel up/down is disabled when it comes to movement or turning, and adding the new mouseb input type unintentionally removed that limitation.

I've since reverted the new mouse button type to use the traditional way input was dealt with. I can't seem to find the exact code that blocks the movement/turning specifically for the mousewheel, so this is my temp fix. On top of that DSDA has it's own input system that's quite a bit different from Woof, so going the Woof route may not be the best approach.

One thing we will be missing out on though is the mouse buttons having a delay tied to them. The most easiest way to see this was in movement/turning (even though we don't want this, it's a good test to see if the delay input is working as it should).

The best example of this is binding the automap zoom in/out to the horizontal scroll, as without the delay it is choppy instead of a short smooth gradual step. Although then again, I don't think there's many key actions where you would notice a difference between a gradual or instant input, besides movement/turning.

@andrikpowell andrikpowell force-pushed the dsda-horiz-mouse-wheel-input branch from d3ce7e8 to 3e0e792 Compare December 1, 2024 13:21
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