[14:59:00] Dominus: Marzo, could you review this new patch from me to unhide the mouse pointer on mouse movement and hide it on touching? https://pastebin.com/JqWKvDAa
[14:59:02] Dominus: The only way I can differ between Mouse and finger is via fingerdown event.tfinger.fingerId. For a real touch it almost always creates a new id. A real mouse click will always remain the same id regardless whether left or right. With the odditiy (SDL bug) that a left click will trigger two events, one with id 0 followed by an event with the id that remains the same. that's why I filter id 0 out.
[14:59:16] Dominus: The only problem *I* see is that if in fingerdown gets triggered on first mouseclick after the cursor unhides - unless SDL fixes that mess I could not see a better way and it is only a brief problem.
[14:59:33] Dominus: uint64 as the id is long. In mouse.cc I added the SDL_HINT_TOUCH_MOUSE_EVENTS for it to be a central place to switch it, since it switches the cursor in exult.cc, menulist.cc and somewhere in the gumps that I haven't yet touched.
[14:59:40] Dominus: in menulist I need to give the static uint64 a better name or can I reuse this finger_id somehow? Perhaps by adding it in exult.h?
[15:05:21] Marzo: Lets see: finger_id should be of type SDL_FingerID, which would be sint64 (it is signed, for some reason)
[15:06:27] Marzo: Maybe it should be named saved_finger_id or last_finger_id
[15:07:13] Dominus: yes :)
[15:08:00] Marzo: If you move the finger_id variable to the function which uses it, you can use the same name for both variables
[15:10:10] Marzo: Overall, looks good
[15:11:54] Dominus: but it's different functions that use finger_id, so I'm confused :)
[15:12:25] Marzo: Static variables declared in a function are local to the function, and can be used elsewhere
[15:13:04] Marzo: *can“t
[15:27:14] Dominus: ah, so I can reuse the name but can't reuse the value
[15:29:23] Dominus: ok, I'll use a better name and will add it to the gumps and then submit it. Cleaning up my debug couts and will add an explanation why I filter out id 0 and watch for the same id. Since it my be eventually be fixed by the SDL devs
[15:31:54] Dominus: Thanks for your review