Quick Links: Gideros Home | Download Gideros | Developer Guide
Gideros Player - not multitouch aware on Windows + issue + crash
  • snooks +1 -1 (+2 / -0 )
    Member
    I've noticed that the Windows player hasn't yet been made to work with multitouch events. It would be great if this could be done so that Windows touch screen users don't have to use devices to test multitouch apps.

    There are two issues with the current implementation too.

    1) All touches are registered as id = 2 on the win32 player, whereas the count starts from id = 1 on Android and increments with each additional touch. This means that even testing single touches in a multitouch app is incompatible.

    2) The Windows player crashes when a 5th simultaneous touch is registered with this error:

    "attempt to index a function value
    stack traceback:"

    (no more info after colon). This example reproduces...
    local function onTouchBegin(event)
    print("onTouchBegin. touch.id = " .. event.touch.id)
    end
     
    stage:addEventListener(Event.TOUCHES_BEGIN, onTouchBegin)
    stage:addEventListener(Event.ENTER_FRAME, function() end, nil)



  • SinisterSoftSinisterSoft +1 -1
    Maintainer
    The players will have to be updated:

    I think this can be done with the Windows/Mac? player (Desktop QT) using this information:
    http://doc.qt.io/qt-5/qtouchevent.html

    On the Win32 player I think it can be done by intercepting WM_TOUCH, WM_TOUCHHITTESTING, etc messages in the Windows callback.

    With Win32 the window will also need to call the user32.dll "RegisterTouchWindow" function, a check will have to be made to see if this function exists - as it's not present on all versions of Windows (even if the Windows version number is the same!)...

    I think that the system metrics may also hold some touch information (SM_DIGITIZER) ?

    It looks like touch beyond 5 points might not be supported on some (all?) versions of Windows - might be wrong though (maybe handled differently?)

    POINTER_CHANGE_NONE
    POINTER_CHANGE_FIRSTBUTTON_DOWN
    POINTER_CHANGE_FIRSTBUTTON_UP
    POINTER_CHANGE_SECONDBUTTON_DOWN
    POINTER_CHANGE_SECONDBUTTON_UP
    POINTER_CHANGE_THIRDBUTTON_DOWN
    POINTER_CHANGE_THIRDBUTTON_UP
    POINTER_CHANGE_FOURTHBUTTON_DOWN
    POINTER_CHANGE_FOURTHBUTTON_UP
    POINTER_CHANGE_FIFTHBUTTON_DOWN
    POINTER_CHANGE_FIFTHBUTTON_UP

  • hgy29hgy29 +1 -1
    Maintainer
    I didn't actually check myself but QT player has code to handle multitouch already: https://github.com/gideros/gideros/blob/master/player/Sources/glcanvas.cpp#L1020

    EDIT: I checked and yes it doesn't work properly as @snook said
  • snooks +1 -1 (+1 / -0 )
    Member
    @SinisterSoft, I don't think that there's a hard limit (within reason) with Windows multitouch, WM_TOUCH here works with the full 10 points of my screen. Using the code from this article..

    https:--msdn.microsoft.com/en-us/library/windows/desktop/dd744775(v=vs.85).aspx

    (I can't post links, hence the --)

    (which has a bug in it, if you want to play with it, see my comment (I'm _-.'.-_ )).

    @hgy29, that sounds promising, hopefully it could be a case of just having to register the window then?

    Likes: SinisterSoft

  • hgy29hgy29 +1 -1 (+2 / -0 )
    Maintainer
    it looks like touch events are received, but not bridged correctly to gideros.

    Likes: snooks, antix

  • snooks +1 -1
    Member
    That's fantastic if you're on the case!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID

In this Discussion

Top Posters