Patch for touchscreen coordinates

Hello,

A patch has been added to SDL 2.0.9 (https://hg.libsdl.org/SDL/rev/f100ca4dd31e), so ready for the next 2.0.10, to support eGalax touchscreen. (see EVDEV KeyCode 330)

Unfortunately, this patch doesn’t report touchscreen coordinates according to window size/resolution which is to be considered as an issue.

This behavior is for example different on Android platform where touch events coordinates are calculated according to screen size and resolution and reported as well.

So I propose to add this fix in SDL implementation for the following video drivers as it was done for Android:
video/vivante
video/raspberry
video/kmsdrm

That way, touch events will report mouse motion event with right coordinates, so your SDL application will behave in the same way whatever you use a mouse or a touchscreen to control it.

Waiting for your comment to get it in the next 2.0.10 release…

Alain

Hello.

That way, touch events will report mouse motion event with right coordinates, so your SDL application will behave in the same way whatever you use a mouse or a touchscreen to control it.

I reported this problem EVDEV KeyCode 330 for a Raspberry Pi back on January. Thank you for looking into it.

The proposed behavior is the desired one. I’ll be glad to find it included in the next release.