summaryrefslogtreecommitdiffstats
path: root/src/glut/directfb/events.c
diff options
context:
space:
mode:
authorClaudio Ciccani <[email protected]>2006-08-04 12:43:33 +0000
committerClaudio Ciccani <[email protected]>2006-08-04 12:43:33 +0000
commit21dc092324bf4491b3dc9b8882115e482993db1a (patch)
tree9b8939b8c1c08a224fac9d12ef0b566826858df7 /src/glut/directfb/events.c
parent3ab2dd9f912403cf6bd174c8f5f34ae4e3af1848 (diff)
Handle GLUT_DEVICE_KEY_REPEAT,GLUT_OWN_JOYSTICK,GLUT_JOYSTICK_POLL_RATE in glutDeviceGet().
Diffstat (limited to 'src/glut/directfb/events.c')
-rw-r--r--src/glut/directfb/events.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/glut/directfb/events.c b/src/glut/directfb/events.c
index 8c848ce26ff..4c474710abe 100644
--- a/src/glut/directfb/events.c
+++ b/src/glut/directfb/events.c
@@ -46,7 +46,13 @@ glutDeviceGet( GLenum type )
return dsc.max_button+1;
}
break;
+ case GLUT_DEVICE_IGNORE_KEY_REPEAT:
+ return g_ignore_key_repeat;
+ case GLUT_DEVICE_KEY_REPEAT:
+ return (g_ignore_key_repeat) ? GLUT_KEY_REPEAT_OFF
+ : GLUT_KEY_REPEAT_ON;
case GLUT_HAS_JOYSTICK:
+ case GLUT_OWNS_JOYSTICK:
return (g_game && joystick); /* only available in game mode */
case GLUT_JOYSTICK_BUTTONS:
if (joystick) {
@@ -62,8 +68,10 @@ glutDeviceGet( GLenum type )
return dsc.max_axis+1;
}
break;
- case GLUT_DEVICE_IGNORE_KEY_REPEAT:
- return g_ignore_key_repeat;
+ case GLUT_JOYSTICK_POLL_RATE:
+ if (joystick)
+ return 1; /* hack */
+ break;
default:
break;
}