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

Some assorted fixes #12274

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Some assorted fixes #12274

wants to merge 2 commits into from

Conversation

wtay
Copy link
Contributor

@wtay wtay commented Feb 12, 2025

OpenscanHub found a bunch of issues in the SDL3 code, which may or may not be false positives.

I think that the 2 attached patches fix an actual problem and I ask to review and apply them.

@@ -346,7 +346,7 @@ void SDL_SendPenTouch(Uint64 timestamp, SDL_PenID instance_id, SDL_Window *windo
if (eraser && ((input_state & SDL_PEN_INPUT_ERASER_TIP) == 0)) {
input_state |= SDL_PEN_INPUT_ERASER_TIP;
send_event = true;
} else if (!down && (input_state & SDL_PEN_INPUT_ERASER_TIP)) {
} else if (!eraser && (input_state & SDL_PEN_INPUT_ERASER_TIP)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this change is correct. I think eraser is just a flag to know whether the contact tool is an eraser, and the down flag tells whether it's in contact or not. @icculus, can you confirm?

@@ -1518,6 +1518,7 @@ static SDL_sensorlist_item *GetSensor(SDL_joylist_item *item)
return NULL;
}
if (ioctl(fd_item, EVIOCGUNIQ(sizeof(uniq_item) - 1), &uniq_item) < 0) {
close(fd_item);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like a good fix, thanks!

@slouken slouken added this to the 3.2.6 milestone Feb 21, 2025
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