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

Do MOUSEBUTTONUP event on MOUSEWHEEL #2242

Merged
merged 4 commits into from
Oct 25, 2020
Merged

Do MOUSEBUTTONUP event on MOUSEWHEEL #2242

merged 4 commits into from
Oct 25, 2020

Conversation

ankith26
Copy link
Contributor

Probably fixes #2240

@ankith26
Copy link
Contributor Author

Tested this PR locally, and it works as expected

@ankith26
Copy link
Contributor Author

Overall, this PR makes many changes to ensure that output is much more similar to pygame 1.9.6

@@ -157,6 +157,14 @@ _pg_remove_pending_PGS_VIDEOEXPOSE(void * userdata, SDL_Event *event)
return 1;
}

static int
Copy link
Contributor

Choose a reason for hiding this comment

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

Small note: C already has a function, int abs(int n), defined in <stdlib.h>, that does exactly what this function is doing (see: https://en.cppreference.com/w/c/numeric/math/abs).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm ok, I didn’t know it was there. Anyways, we can save an include by defining the function ourselves right ;)

Copy link
Member

Choose a reason for hiding this comment

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

There is also SDL_abs.

Copy link
Member

@illume illume left a comment

Choose a reason for hiding this comment

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

👍 thanks. Seems to work fine on my mac.

@illume illume merged commit f5f8b2d into master Oct 25, 2020
@ankith26 ankith26 deleted the ankith26-patch-2 branch October 25, 2020 12:18
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.

pygame2 does not generate MOUSEBUTTONUP events for mouse wheel
3 participants