Expanded glutDeviceGet() support. Now reports the key repeat settings I added a few days ago.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37786 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a67d485cf3
commit
a7bc66a9f5
@ -9,36 +9,37 @@ if $(TARGET_PLATFORM) != haiku {
|
||||
|
||||
MergeObject <opengl>glut.o :
|
||||
# C++ sources
|
||||
glutBlocker.cpp
|
||||
glutInit.cpp
|
||||
glutWindow.cpp
|
||||
glutEvent.cpp
|
||||
glutCallback.cpp
|
||||
glutOverlay.cpp
|
||||
glutGet.cpp
|
||||
glutColor.cpp
|
||||
glutCursor.cpp
|
||||
glutMenu.cpp
|
||||
glutDstr.cpp
|
||||
glutBlocker.cpp
|
||||
glutInit.cpp
|
||||
glutWindow.cpp
|
||||
glutEvent.cpp
|
||||
glutCallback.cpp
|
||||
glutOverlay.cpp
|
||||
glutGet.cpp
|
||||
glutColor.cpp
|
||||
glutCursor.cpp
|
||||
glutMenu.cpp
|
||||
glutDstr.cpp
|
||||
glutGameMode.cpp
|
||||
beos_x11.cpp
|
||||
|
||||
# C sources
|
||||
glut_8x13.c
|
||||
glut_9x15.c
|
||||
glut_bitmap.c
|
||||
glut_bwidth.c
|
||||
glut_hel10.c
|
||||
glut_hel12.c
|
||||
glut_hel18.c
|
||||
glut_tr10.c
|
||||
glut_tr24.c
|
||||
glut_mroman.c
|
||||
glut_roman.c
|
||||
glut_stroke.c
|
||||
glut_swidth.c
|
||||
glut_shapes.c
|
||||
glut_teapot.c
|
||||
glut_vidresize.c
|
||||
glut_util.c
|
||||
glut_8x13.c
|
||||
glut_9x15.c
|
||||
glut_bitmap.c
|
||||
glut_bwidth.c
|
||||
glut_hel10.c
|
||||
glut_hel12.c
|
||||
glut_hel18.c
|
||||
glut_tr10.c
|
||||
glut_tr24.c
|
||||
glut_mroman.c
|
||||
glut_roman.c
|
||||
glut_stroke.c
|
||||
glut_swidth.c
|
||||
glut_shapes.c
|
||||
glut_teapot.c
|
||||
glut_vidresize.c
|
||||
glut_util.c
|
||||
glut_ext.c
|
||||
;
|
||||
|
@ -72,7 +72,7 @@ int glutGet(GLenum state) {
|
||||
num++;
|
||||
children = children->siblings;
|
||||
}
|
||||
return num;
|
||||
return num;
|
||||
}
|
||||
case GLUT_WINDOW_BUFFER_SIZE: // best guesses
|
||||
case GLUT_WINDOW_DEPTH_SIZE:
|
||||
@ -97,7 +97,7 @@ int glutGet(GLenum state) {
|
||||
case GLUT_WINDOW_NUM_SAMPLES:
|
||||
case GLUT_WINDOW_STEREO:
|
||||
return 0;
|
||||
|
||||
|
||||
case GLUT_WINDOW_CURSOR:
|
||||
return gState.currentWindow->cursor; // don't need to lock window since it won't change
|
||||
|
||||
@ -172,14 +172,18 @@ int glutDeviceGet(GLenum info) {
|
||||
return 1;
|
||||
|
||||
case GLUT_HAS_SPACEBALL:
|
||||
case GLUT_HAS_DIAL_AND_BUTTON_BOX:
|
||||
case GLUT_HAS_TABLET:
|
||||
case GLUT_NUM_SPACEBALL_BUTTONS:
|
||||
case GLUT_NUM_BUTTON_BOX_BUTTONS:
|
||||
case GLUT_HAS_DIAL_AND_BUTTON_BOX:
|
||||
case GLUT_NUM_DIALS:
|
||||
case GLUT_NUM_BUTTON_BOX_BUTTONS:
|
||||
case GLUT_HAS_TABLET:
|
||||
case GLUT_NUM_TABLET_BUTTONS:
|
||||
case GLUT_HAS_JOYSTICK:
|
||||
case GLUT_JOYSTICK_POLL_RATE:
|
||||
case GLUT_JOYSTICK_BUTTONS:
|
||||
case GLUT_JOYSTICK_AXES:
|
||||
return 0;
|
||||
|
||||
|
||||
case GLUT_NUM_MOUSE_BUTTONS:
|
||||
{
|
||||
int32 mouseButtons = 3; // good guess
|
||||
@ -189,6 +193,14 @@ int glutDeviceGet(GLenum info) {
|
||||
return mouseButtons;
|
||||
}
|
||||
|
||||
case GLUT_DEVICE_IGNORE_KEY_REPEAT:
|
||||
if (gState.currentWindow)
|
||||
return gState.currentWindow->ignoreKeyRepeat;
|
||||
return 0;
|
||||
|
||||
case GLUT_DEVICE_KEY_REPEAT:
|
||||
return GLUT_KEY_REPEAT_DEFAULT;
|
||||
|
||||
default:
|
||||
__glutWarning("invalid glutDeviceGet parameter: %d", info);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user