diff android/dw.cpp @ 2608:a11522c30345

Android: Add initial code to handle button presses and long clicks on DWRender. Android Studio seems to think there is something wrong with the setOnTouchListener() code but it seems to work.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 16 Jul 2021 18:55:05 +0000
parents 3b9bbd69bb9c
children dcd71b04cc46
line wrap: on
line diff
--- a/android/dw.cpp	Fri Jul 16 02:58:43 2021 +0000
+++ b/android/dw.cpp	Fri Jul 16 18:55:05 2021 +0000
@@ -311,7 +311,7 @@
             case 4:
             {
                 int (* API buttonfunc)(HWND, int, int, int, void *) = (int (* API)(HWND, int, int, int, void *))handler->signalfunction;
-                int button = 1;
+                int button = params[5] ? DW_POINTER_TO_INT(params[5]) : 1;
 
                 retval = buttonfunc(handler->window, DW_POINTER_TO_INT(params[3]), DW_POINTER_TO_INT(params[4]), button, handler->data);
                 break;