SDL_MOUSEMOTION on android no longer sent?

Hi,

I realized that my touch doesnt work anymore on android in the newest repository version.

It looks like that SDL_MOUSEMOTION is no longer sent when a touch is received.

Switching back to the zipfile which is available on the website this is still in. But then
my mouse coordinates are all zero.

Any ideas?

andreas

I realized that my touch doesnt work anymore on android in the newest
repository version.

It looks like that SDL_MOUSEMOTION is no longer sent when a touch is
received.

Switching back to the zipfile which is available on the website this is
still in. But then my mouse coordinates are all zero.

Any ideas?

andreas

The Android touch functionality was updated to issue true multitouch events,
so you won’t see any SDL_MOUSEMOTION events. Try checking the documentation
for SDL_TouchFingerEvent (generated by SDL_FINGERMOTION, SDL_FINGERDOWN, etc)

Gabriel.

gabomdq wrote:

I realized that my touch doesnt work anymore on android in the newest
repository version.

It looks like that SDL_MOUSEMOTION is no longer sent when a touch is
received.

Switching back to the zipfile which is available on the website this is
still in. But then my mouse coordinates are all zero.

Any ideas?

andreas

The Android touch functionality was updated to issue true multitouch events,
so you won’t see any SDL_MOUSEMOTION events. Try checking the documentation
for SDL_TouchFingerEvent (generated by SDL_FINGERMOTION, SDL_FINGERDOWN, etc)

Gabriel.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Gabriel, thanks a lot for this super fast reply!!! So I suppose I better switch from the old version to the new implementation from the repository.

andreas

In general I don’t think we should ever be producing SDL_MOUSEMOTION events for multitouch screen interfaces, it’s even kind of dubious for single touch interfaces because it represents a different
kind of input entirely (where in essence the mouse button is pressed whenever a finger is on the screen and may cause sharp jumps in position).

I noticed that both mouse and touch events are generated on iPhoneOS in SDL 1.3 the last time I used it, which meant that I had to intentionally ignore mouse events on that platform and use the touch
events only.

A related quirky mess is on Android where you can physically hook up a real mouse or keyboard to some of these devices…On 11/01/2011 08:46 AM, akr wrote:

gabomdq wrote:

Quote:

I realized that my touch doesnt work anymore on android in the newest
repository version.

It looks like that SDL_MOUSEMOTION is no longer sent when a touch is
received.

Switching back to the zipfile which is available on the website this is
still in. But then my mouse coordinates are all zero.

Any ideas?

andreas

The Android touch functionality was updated to issue true multitouch events,
so you won’t see any SDL_MOUSEMOTION events. Try checking the documentation
for SDL_TouchFingerEvent (generated by SDL_FINGERMOTION, SDL_FINGERDOWN, etc)

Gabriel.


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Gabriel, thanks a lot for this super fast reply!!! So I suppose I better switch from the old version to the new implementation from the repository.

andreas


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

I noticed that both mouse and touch events are generated on iPhoneOS in SDL

1.3 the last time I used it, which meant that I had to intentionally ignore
mouse events on that platform and use the touch events only.

I think this is the best approach cause it allows a cross platform app
(that does not need multitouch at all) to work without large #ifdef blocks
or different sources for different platforms.–
Bye,
Gabry

I disagree - why should mouse events be generated for a non-mouse
interface? As for the #ifdef blocks argument, different handlers for
different platforms would take care of it.On Wed, 2 Nov 2011 11:38:43 +0100, Gabriele Greco wrote:

I noticed that both mouse and touch
events are generated on iPhoneOS in SDL 1.3 the last time I used it, which
meant that I had to intentionally ignore mouse events on that platform and
use the touch events only.

I think this is the best approach cause it
allows a cross platform app (that does not need multitouch at all) to work
without large #ifdef blocks or different sources for different platforms.

Bye, Gabry

SDL is very good at adapting code to run on all the various platforms, but one still needs a few fine tuning bits of code for each OS and that is just fine, I don’t mind a few #ifdefs for iOS or
Android for instance, I actually expect to have to do some of these, if only to provide the proper experience on each platform.

So with that said, I don’t think there is any good excuse to emit mouse motion events for a non-mouse interface, especially considering that touch screens do exist on other platforms and you always
want to run the right code for that.

An example is a PC with a multitouch screen connected to it, the input methods are fundamentally different depending on whether the user chooses to use the mouse or the touchscreen at any given moment.On 11/02/2011 04:47 AM, Vijay Varadan wrote:

I disagree - why should mouse events be generated for a non-mouse interface? As for the #ifdef blocks argument, different handlers for different platforms would take care of it.

On Wed, 2 Nov 2011 11:38:43 +0100, Gabriele Greco <gabriele.greco at darts.it> wrote:

    I noticed that both mouse and touch events are generated on iPhoneOS in SDL 1.3 the last time I used it, which meant that I had to intentionally ignore mouse events on that platform and use
    the touch events only.

I think this is the best approach cause it allows a cross platform app (that does not need multitouch at all) to work without large #ifdef blocks or different sources for different platforms.
--
Bye,
Gabry

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

It is easy to handle mouse clicks and touches uniformly, but if they’re
joined, then it is tougher to separate them when you really need it.

Jonny DOn Wed, Nov 2, 2011 at 7:54 AM, Forest Hale wrote:

SDL is very good at adapting code to run on all the various platforms, but
one still needs a few fine tuning bits of code for each OS and that is just
fine, I don’t mind a few #ifdefs for iOS or Android for instance, I
actually expect to have to do some of these, if only to provide the proper
experience on each platform.

So with that said, I don’t think there is any good excuse to emit mouse
motion events for a non-mouse interface, especially considering that touch
screens do exist on other platforms and you always want to run the right
code for that.

An example is a PC with a multitouch screen connected to it, the input
methods are fundamentally different depending on whether the user chooses
to use the mouse or the touchscreen at any given moment.

On 11/02/2011 04:47 AM, Vijay Varadan wrote:

I disagree - why should mouse events be generated for a non-mouse
interface? As for the #ifdef blocks argument, different handlers for
different platforms would take care of it.

On Wed, 2 Nov 2011 11:38:43 +0100, Gabriele Greco < gabriele.greco at darts.it> wrote:

   I noticed that both mouse and touch events are generated on

iPhoneOS in SDL 1.3 the last time I used it, which meant that I had to
intentionally ignore mouse events on that platform and use
the touch events only.

I think this is the best approach cause it allows a cross platform app
(that does not need multitouch at all) to work without large #ifdef blocks
or different sources for different platforms.

Bye,
Gabry

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/**
darkplaces http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged
demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

+1On 02/11/2011 13:11, Jonathan Dearborn wrote:

It is easy to handle mouse clicks and touches uniformly, but if they’re
joined, then it is tougher to separate them when you really need it.

On Mi? 02 Nov 2011 10:25:16 Tim Angus escribi?:> On 02/11/2011 13:11, Jonathan Dearborn wrote:

It is easy to handle mouse clicks and touches uniformly, but if they’re
joined, then it is tougher to separate them when you really need it.

+1

The patch I adapted originally kept the mouse click events and the touches,
then I removed per Tim’s suggestion and I thought it was for the best.
However…I hadn’t thought of the case where a mouse is plugged in, or a
touchpad (like the Asus Transformer has) is used…in fact I haven’t checked
what type of events that generates.

Gabriel.