SDL icon indicating copy to clipboard operation
SDL copied to clipboard

SDL 2.30.x Vita Touch broken

Open rsn8887 opened this issue 1 year ago • 2 comments

This commit broke front panel touch on Vita: https://github.com/libsdl-org/SDL/commit/847a6cce964fff7fe59c028a8ee49e35529175a2

You changed the Touch_ID only in one place, but you also have to change the other instructions in the code in these places: https://github.com/libsdl-org/SDL/blob/847a6cce964fff7fe59c028a8ee49e35529175a2/src/video/vita/SDL_vitatouch.c#L126

https://github.com/libsdl-org/SDL/blob/847a6cce964fff7fe59c028a8ee49e35529175a2/src/video/vita/SDL_vitatouch.c#L136

https://github.com/libsdl-org/SDL/blob/847a6cce964fff7fe59c028a8ee49e35529175a2/src/video/vita/SDL_vitatouch.c#L163

(SDL_TouchID)port should be (SDL_TouchID)(port + 1)

Please test next time.

I'd rather say that https://github.com/libsdl-org/SDL/commit/847a6cce964fff7fe59c028a8ee49e35529175a2

should be reverted. Changing ports like that breaks every single Vita app that uses Touch_ID, and is an API-breaking change that should be made in SDL3, not SDL2.

rsn8887 avatar Nov 10 '24 03:11 rsn8887

I changed that because this was actually a bug that violates of SDL2's specification on the touch device retrieving function where 0 return means an error, not an actual device, and that confuses the universal code (at my program was actual condition that checks for 0, and if 0 - an error, that happen on every platform, and on Vita this was set wrong, so, because of that, back touch worked, but front touch didn't, and therefore, because of that, I had to set a workaround to don't use the 0 check on Vita exclusively).

Anyway, thanks for the catch, this probably should be fixed where that thing is missed up.

Changing ports like that breaks every single Vita app that uses Touch_ID

Only apps that do use the raw touch ID instead of requesting touch IDs via function (which is generally mistake if develop program for general use on multiple platforms, not for Vita exclusively).

Wohlstand avatar Nov 10 '24 04:11 Wohlstand

Ok I made a PR that I think fixes this issue the correct way: https://github.com/libsdl-org/SDL/pull/11442

rsn8887 avatar Nov 10 '24 04:11 rsn8887