Joseba, I’m looking forward to your updates!
Thanks!
On Tue, Feb 12, 2013 at 11:10 AM, Joseba Garc?a Etxebarria <@Joseba_Garcia_Etxeba mailto:Joseba_Garcia_Etxeba> wrote:
Hi,
Yep, I'd like to see that included, too :)
I'd say both patches are complimentary in the sense that both make
sense if one wants to improve the input handling in Android. From a
SDL-user perspective I believe the SDL_HINT approach is the most
sensitive one, since behavior is very polarized in this regard.
If anybody is interested, I have improved the mouse handling code a
bit and it now can handle right mouse clicks and mouse hover movement
events in Android, too [1].
The problem with [1] is that it's written for recent versions of
Android and it's not really ready for being run in Android 2.3, which
I still consider a relevant version of Android.
After this thursday I'll work on lowering the required version of
Android for my joystick and mouse input codes and will update the
patches accordingly. Hopefully this weekend will be highly productive
in this regard :)
Kind regards,
Joseba
[1]
http://code.google.com/p/bennugd-monolithic/source/browse/branches/my_monolithic/projects/android/src/org/libsdl/app/SDLActivity.java#717
On Tue, Feb 12, 2013 at 6:12 PM, Gabriel Jacobo <gabomdq at gmail.com <mailto:gabomdq at gmail.com>> wrote:
> This patch
http://bugzilla.libsdl.org/attachment.cgi?id=999&action=diff by
> Joseba Garc?a Echebarria implements mouse movement for
Android…I’d like to
> incorporate it, but first my question to the community and our
fearless
> leaders Sam and Ryan is…do we really need/want SDL to inject fake
mouse
> events on a platform where an actual mouse can be plugged in (which
is not
> unlike desktop Linux for example)? Can’t we at least ifdef this
behaviour
> out by default and let anyone who likes/needs confusing duplicate
events
> enable it at configure time?
>
>
> 2013/2/8 John <john at leafygreengames.com
<mailto:john at leafygreengames.com>>
>>
>> Right. I wasn't sure what approach the SDL development community
would
>> prefer.
>> The hints mechanism seems awkward for this (it’s a string table
entry, yet
>> we only need 1 bit.) I’m happy to revisit other options.
>>
>>
>> On 02/08/2013 02:40 AM, Sik the hedgehog wrote:
>>>
>>> I imagine the reason it has a warning about its performance is
because
>>> it’s handling strings (hint IDs are strings as well as hint
values),
>>> and string comparisons are definitely more expensive than, say,
>>> checking the value of an integer. To what extent this hurts
depends on
>>> the situation.
>>>
>>> 2013/2/7, John <john at leafygreengames.com
<mailto:john at leafygreengames.com>>:
>>>>
>>>> (bugzilla kept crashing. Here is the report and patch.)
>>>>
>>>> Description:
>>>> On Android and UIKit, when SDL sees a touch/finger event, it
also sends
>>>> a
>>>> mouse
>>>> motion or mouse button event. When the user touches their
device, the
>>>> application will receive a touch event as well as a mouse down
event.
>>>> This
>>>> breaks existing applications which handle both types of events.
>>>> Applications
>>>> cannot tell whether a mouse event was already handled as a touch
event,
>>>> is
>>>> about
>>>> to be handled as a touch event, or is a new event.
>>>>
>>>> Solution:
>>>> Discussions on the SDL dev list were unclear whether this
behavior has a
>>>> purpose. The following patch is a compromise. Instead of
removing the
>>>> duplicate
>>>> events, the attached patch adds a new hint,
>>>> SDL_HINT_SIMULATE_INPUT_EVENTS,
>>>> leaving the above described behavior as the default, but
permitting
>>>> portable
>>>> apps to disable duplicate events. The hint API seemed to be the
least
>>>> intrusive
>>>> change. However, a note in the hint code raises concerns about
whether
>>>> it
>>>> is
>>>> efficient enough to be checked in the event code, so I added a
flag in
>>>> the
>>>> SDL_Mouse struct to mirror the hint. A simpler patch might be to
add a
>>>> new
>>>> API
>>>> call for this, or perhaps bit-level hints, rather than char*
hints.
>>>>
>>>> Advise:
>>>> Portable apps should either (1) not handle touch events at all,
or (2)
>>>> call
>>>> SDL_SetHint(SDL_HINT_SIMULATE_INPUT_EVENTS, “0”) to disable
duplicate
>>>> events.
>>>>
>>>>
>>>> Patch is based on HG tip: c259f0817583 Tue, 05 Feb 2013 12:10:54
-0800.
>>>> Patch checksum (MD5): 06d9ef060a0cad24c9a8d71ef701bce6
>>>>
>>>>
>>> _______________________________________________
>>> SDL mailing list
>>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>>
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
>
>
> --
> Gabriel.
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org