We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1423 - Finger touch events don't report pressure
Summary: Finger touch events don't report pressure
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: All Android (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-19 08:34 UTC by Philip Taylor
Modified: 2012-02-20 20:54 UTC (History)
0 users

See Also:


Attachments
fix various bugs (2.00 KB, patch)
2012-02-19 08:34 UTC, Philip Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Taylor 2012-02-19 08:34:52 UTC
Created attachment 822 [details]
fix various bugs

SDL_touch.c never actually uses the 'pressurein' arguments to SDL_SendFingerDown/SDL_SendTouchMotion, so it doesn't report the real pressure. Also it uses touch->pressureres which is never initialised. Also it fails to initialise some fields of event.tfinger for certain events, so applications might try to use bogus data.

The attached patch seems to be enough to produce generally sensible output on Android.
Comment 1 Sam Lantinga 2012-02-20 20:54:53 UTC
The patch looks good, thanks!
http://hg.libsdl.org/SDL/rev/3809b2eee787