Description
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.1
Reported for operating system, platform: Windows (All), x86_64
Comments on the original bug report:
On 2016-07-07 22:14:20 +0000, Stefan Murawski wrote:
So I decided to create this feature-request/bug-report, since it seems that this strangely has not been done before.
On Windows, more advanced, say anything other than x/y position and left/right click, is not supported.
To list a few of these feature that might be supported by tablets:
- pressure
- z position (stylus being recognized before touching the surface)
- rotation
- angle
- differentiation between different tips and stylii
and very likely more that I didn't think about.The, I would guess, most wanted feature would be to get the pressure, this has quite a few potential uses in games and non-game applications. (Painting Programs are a very good example!)
Getting this data on Windows is not really an easy task, there are two major competing apis available.
One is Wintab, which has been created by Wacom which is used by their tablets and (a bit more poorly) by some 3rd Party developers like for example Huion.
This one is, in my opinion, actually the easier to use one, you can get some results rather quickly and examples are a bit more common since this has been around for quite some time.The other way to get this data would be from Microsofts APIs, for SDL it seems that the RealTimeStylus Interface would be the most useful one.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms701683(v=vs.85).aspxAnders Ekermo, has created a blog post 3 years ago about this, and has even posted a working example using SDL and the RealTimeStylus Interface.
http://backworlds.com/under-pressure/While it's good to know that this works and that someone could use that example to add tablet support to his program, this is not a really clean or intuitive solution and it also won't translate into SDL Ports for other languages.
So, if SDL would support this directly someone using PySDL would be able to simply get the same inputs from tablets without having to bash their head open trying to speak to the RealTimeStylus Interface.
(Silently raises hand, Microsofts APIs are really confusing, even more if you want to use them from a not supported language like python.)So in short: Please support the RealTimeStylus Interface so we can create more SDL programs with pressure support, thanks.
On 2017-08-12 01:13:33 +0000, Sam Lantinga wrote:
This is good feedback for SDL 2.1, thanks!