Skip to content

Fixed bug #13493: Assertion failure at SDL_AddTouch with Android API 28 #13716

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

1bsyl
Copy link
Contributor

@1bsyl 1bsyl commented Aug 8, 2025

Java touch id should be -1 because it's reserved for internal SDL synthetic events.
It should also not be 0, because this is SDL invalid value.

@@ -25,3 +25,4 @@
extern void Android_InitTouch(void);
extern void Android_QuitTouch(void);
extern void Android_OnTouch(SDL_Window *window, int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p);
extern SDL_TouchID Android_ConvertTouchdId_Java_to_SDL(int touch_device_id_in);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Naming suggestion:

Suggested change
extern SDL_TouchID Android_ConvertTouchdId_Java_to_SDL(int touch_device_id_in);
extern SDL_TouchID Android_ConvertJavaTouchID(int touchID);

…droid API 28

Java touch id should be -1 because it's reserved for internal SDL
synthetic events.
It should also not be 0, because this is SDL invalid value.
@1bsyl 1bsyl force-pushed the br_fix_android_touch_id branch from 2edb264 to e23a072 Compare August 9, 2025 05:07
@1bsyl
Copy link
Contributor Author

1bsyl commented Aug 9, 2025

@slouken patch updated thanks

@slouken slouken added this to the 3.4.0 milestone Aug 9, 2025
@1bsyl 1bsyl merged commit 970c0bf into libsdl-org:main Aug 12, 2025
41 checks passed
@1bsyl 1bsyl deleted the br_fix_android_touch_id branch August 12, 2025 16:34
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