X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2Fmulti-touch%2Fmulti-touch.c;fp=progs%2Fdemos%2Fmulti-touch%2Fmulti-touch.c;h=f294a1b6ab2bb66f373fb5947f631361a1c1319e;hb=d225ac34a598c827ff73e35cbbfd0660c90c8a06;hp=a68807f580005895c621d1da71eba1b15a4b7fff;hpb=f95379ab42dfd28ea1297aa774fd01c6c50b1a1a;p=freeglut diff --git a/progs/demos/multi-touch/multi-touch.c b/progs/demos/multi-touch/multi-touch.c index a68807f..f294a1b 100644 --- a/progs/demos/multi-touch/multi-touch.c +++ b/progs/demos/multi-touch/multi-touch.c @@ -49,7 +49,7 @@ static float square[] = { .5, .5, }; -void onDisplay() { +void onDisplay(void) { int d; glClearColor(0,0,0,1); glClear(GL_COLOR_BUFFER_BIT); @@ -95,15 +95,15 @@ void onDisplay() { void onMouse(int button, int state, int x, int y) { if (button == 0) { cursors[0][0].on = (state == GLUT_DOWN); - cursors[0][0].x = x; - cursors[0][0].y = y; + cursors[0][0].x = (float)x; + cursors[0][0].y = (float)y; printf("normal click\n"); } } void onMotion(int x, int y) { - cursors[0][0].x = x; - cursors[0][0].y = y; + cursors[0][0].x = (float)x; + cursors[0][0].y = (float)y; } /* Using FG2.8 (reversed) prototype for now */ @@ -115,8 +115,8 @@ void onMultiButton(int cursor_id, int x, int y, int button, int state) { } if (button == 0) { cursors[0][cursor_id].on = (state == GLUT_DOWN); - cursors[0][cursor_id].x = x; - cursors[0][cursor_id].y = y; + cursors[0][cursor_id].x = (float)x; + cursors[0][cursor_id].y = (float)y; printf("multi-touch %d click\n", cursor_id); } } @@ -126,8 +126,8 @@ void onMultiMotion(int cursor_id, int x, int y) { fprintf(stderr, "cursor_id(%d) > NUM_CURSORS(%d)\n", cursor_id, NUM_CURSORS); return; } - cursors[0][cursor_id].x = x; - cursors[0][cursor_id].y = y; + cursors[0][cursor_id].x = (float)x; + cursors[0][cursor_id].y = (float)y; } void onReshape(int width, int height) { @@ -137,7 +137,7 @@ void onReshape(int width, int height) { glOrtho(0, width, height, 0, -1, 1); } -void onIdle() { +void onIdle(void) { glutPostRedisplay(); }