android: implement fgPlatformSetCursor/fgPlatformWarpPointer
authorSylvain Beucler <beuc@beuc.net>
Wed, 2 May 2012 14:49:15 +0000 (14:49 +0000)
committerSylvain Beucler <beuc@beuc.net>
Wed, 2 May 2012 14:49:15 +0000 (14:49 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1279 7f0cb862-5218-0410-a997-914c9d46530a

src/android/fg_cursor_android.c

index 3b410ae..28838a9 100644 (file)
 
 void fgPlatformSetCursor ( SFG_Window *window, int cursorID )
 {
-  fprintf(stderr, "fgPlatformSetCursor: STUB\n");
+    // No-op: no visible cursor on touchscreens
 }
 
 void fgPlatformWarpPointer ( int x, int y )
 {
-  fprintf(stderr, "fgPlatformWarpPointer: STUB\n");
+    /* Even if there's no pointer on touchscreen, keep track of the
+       last position, e.g. for menus */
+    SFG_Window* window = fgStructure.CurrentWindow;
+    window->State.MouseX = x;
+    window->State.MouseY = y;
 }
-