multi-touch callback had a copy paste error in the draw loop (thanks sorav for reporting)
(cherry picked from commit a40f9e9c4e
)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1804 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
d860b2e225
commit
26a9d9ca03
@ -58,7 +58,7 @@ void onDisplay(void) {
|
|||||||
glVertexPointer(2, GL_FLOAT, 0, square);
|
glVertexPointer(2, GL_FLOAT, 0, square);
|
||||||
for (d = 0; d < NUM_DEVICES; d++) {
|
for (d = 0; d < NUM_DEVICES; d++) {
|
||||||
int c;
|
int c;
|
||||||
for (c = 0; d < NUM_DEVICES; d++) {
|
for (c = 0; c < NUM_CURSORS; c++) {
|
||||||
Cursor C = &cursors[d][c];
|
Cursor C = &cursors[d][c];
|
||||||
if (C->on) {
|
if (C->on) {
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
@ -110,7 +110,7 @@ void onMotion(int x, int y) {
|
|||||||
/* void onMultiButton(int cursor_id, int button, int state, int x, int y) { */
|
/* 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) {
|
void onMultiButton(int cursor_id, int x, int y, int button, int state) {
|
||||||
if (cursor_id > NUM_CURSORS) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (button == 0) {
|
if (button == 0) {
|
||||||
@ -123,7 +123,7 @@ void onMultiButton(int cursor_id, int x, int y, int button, int state) {
|
|||||||
|
|
||||||
void onMultiMotion(int cursor_id, int x, int y) {
|
void onMultiMotion(int cursor_id, int x, int y) {
|
||||||
if (cursor_id > NUM_CURSORS) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
cursors[0][cursor_id].x = (float)x;
|
cursors[0][cursor_id].x = (float)x;
|
||||||
|
Reference in New Issue
Block a user