From: <dc...@us...> - 2017-06-14 20:51:10
|
Revision: 1804 http://sourceforge.net/p/freeglut/code/1804 Author: dcnieho Date: 2017-06-14 20:51:09 +0000 (Wed, 14 Jun 2017) Log Message: ----------- multi-touch callback had a copy paste error in the draw loop (thanks sorav for reporting) (cherry picked from commit a40f9e9c4efdb519cf623cfb1fde5e5c1156da9b) Modified Paths: -------------- trunk/freeglut/freeglut/progs/demos/multi-touch/multi-touch.c Modified: trunk/freeglut/freeglut/progs/demos/multi-touch/multi-touch.c =================================================================== --- trunk/freeglut/freeglut/progs/demos/multi-touch/multi-touch.c 2017-05-25 06:34:57 UTC (rev 1803) +++ trunk/freeglut/freeglut/progs/demos/multi-touch/multi-touch.c 2017-06-14 20:51:09 UTC (rev 1804) @@ -58,7 +58,7 @@ glVertexPointer(2, GL_FLOAT, 0, square); for (d = 0; d < NUM_DEVICES; d++) { int c; - for (c = 0; d < NUM_DEVICES; d++) { + for (c = 0; c < NUM_CURSORS; c++) { Cursor C = &cursors[d][c]; if (C->on) { glMatrixMode(GL_MODELVIEW); @@ -110,7 +110,7 @@ /* void onMultiButton(int cursor_id, int button, int state, int x, int y) { */ void onMultiButton(int cursor_id, int x, int y, int button, int state) { if (cursor_id > NUM_CURSORS) { - fprintf(stderr, "cursor_id(%d) > NUM_CURSORS(%d)\n", cursor_id, NUM_CURSORS); + fprintf(stderr, "cursor_id (%d) > NUM_CURSORS (%d)\n", cursor_id, NUM_CURSORS); return; } if (button == 0) { @@ -123,7 +123,7 @@ void onMultiMotion(int cursor_id, int x, int y) { if (cursor_id > NUM_CURSORS) { - fprintf(stderr, "cursor_id(%d) > NUM_CURSORS(%d)\n", cursor_id, NUM_CURSORS); + fprintf(stderr, "cursor_id (%d) > NUM_CURSORS (%d)\n", cursor_id, NUM_CURSORS); return; } cursors[0][cursor_id].x = (float)x; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |