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

gamepad triggers simulate mouse wheel up/down #105

Merged
merged 1 commit into from
May 8, 2024

Conversation

rumly111
Copy link
Contributor

@rumly111 rumly111 commented May 8, 2024

I tried playing with gamepad, but I missed the mouse scroll up/down feature.
I know you can press the dpad up/down, but you have to press/release/press/release
it many times to scroll up or down.
So I injected some code into gamepad_timer_fn() to check if triggers are pressed, and
send mouse wheel events if needed.

@rumly111
Copy link
Contributor Author

rumly111 commented May 8, 2024

I wrote the gamepad handling in CataclysmDDA game (see sdl_gamepad.cpp), and I wanted to use similar approach here, but that would require rewriting a bunch of stuff,
so I changed my mind. Let me know if you think my added code is too ugly, and I'll try to think of something.

@hugeping hugeping merged commit 6d5502c into instead-hub:master May 8, 2024
@rumly111
Copy link
Contributor Author

rumly111 commented May 8, 2024

thanks

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.

None yet

2 participants