We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

SDL_TouchFingerEvent uses absolute value

asked 2018-01-15 00:37:41 +0300

Radu gravatar image

I have an application that uses SDL. It seems that The touch finger event returns an absolute value, rather than 0-1 You can see the problem in this thread: http://talk.maemo.org/showthread.php?t=100154

On a side note, why can't SDL apps use the landscape mode?

edit retag flag offensive close delete

Comments

Just notice that too. Do you also see that you only get coordinates when you move from side to side (y), top - down (x) is always set to zero.

gmelchett ( 2018-01-18 13:16:26 +0300 )edit

Realized a few days ago that pygame_sdl2 works fine regarding x and y coordinates - must be my C program that is buggy.

gmelchett ( 2018-01-24 20:36:13 +0300 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2018-01-18 13:28:30 +0300

gmelchett gravatar image

See: https://bugzilla.libsdl.org/show_bug.cgi?id=2307

Fix merged last october. So we need a newer libsdl2

edit flag offensive delete publish link more

Comments

Thanks! I don't actually have a Sailfish compatible phone, I was thinking to get one to do some development, but I wanted to make sure SDL works properly on it. So the SDL version available in the repository is an old one, and some developer needs to add the fixed one?

Radu ( 2018-01-18 13:33:48 +0300 )edit

It is not that hard to handle both. Just scale x and y related to the resolution for older versions.

gmelchett ( 2018-01-24 20:37:53 +0300 )edit

Of course it's not hard, but that shouldn't happen. People porting games are going to waste a lot of time finding out what the problem is, and the fix is already there, it's just that SDL needs to be updated in the repository.

Radu ( 2018-01-25 00:34:07 +0300 )edit

Sorry and I agree with you. It is a bad API bug.

gmelchett ( 2018-01-25 14:18:17 +0300 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2018-01-15 00:37:41 +0300

Seen: 198 times

Last updated: Jan 18 '18