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:
+29
-28
@@ -9,36 +9,37 @@ if $(TARGET_PLATFORM) != haiku {
|
|||||||
|
|
||||||
MergeObject <opengl>glut.o :
|
MergeObject <opengl>glut.o :
|
||||||
# C++ sources
|
# C++ sources
|
||||||
glutBlocker.cpp
|
glutBlocker.cpp
|
||||||
glutInit.cpp
|
glutInit.cpp
|
||||||
glutWindow.cpp
|
glutWindow.cpp
|
||||||
glutEvent.cpp
|
glutEvent.cpp
|
||||||
glutCallback.cpp
|
glutCallback.cpp
|
||||||
glutOverlay.cpp
|
glutOverlay.cpp
|
||||||
glutGet.cpp
|
glutGet.cpp
|
||||||
glutColor.cpp
|
glutColor.cpp
|
||||||
glutCursor.cpp
|
glutCursor.cpp
|
||||||
glutMenu.cpp
|
glutMenu.cpp
|
||||||
glutDstr.cpp
|
glutDstr.cpp
|
||||||
|
glutGameMode.cpp
|
||||||
beos_x11.cpp
|
beos_x11.cpp
|
||||||
|
|
||||||
# C sources
|
# C sources
|
||||||
glut_8x13.c
|
glut_8x13.c
|
||||||
glut_9x15.c
|
glut_9x15.c
|
||||||
glut_bitmap.c
|
glut_bitmap.c
|
||||||
glut_bwidth.c
|
glut_bwidth.c
|
||||||
glut_hel10.c
|
glut_hel10.c
|
||||||
glut_hel12.c
|
glut_hel12.c
|
||||||
glut_hel18.c
|
glut_hel18.c
|
||||||
glut_tr10.c
|
glut_tr10.c
|
||||||
glut_tr24.c
|
glut_tr24.c
|
||||||
glut_mroman.c
|
glut_mroman.c
|
||||||
glut_roman.c
|
glut_roman.c
|
||||||
glut_stroke.c
|
glut_stroke.c
|
||||||
glut_swidth.c
|
glut_swidth.c
|
||||||
glut_shapes.c
|
glut_shapes.c
|
||||||
glut_teapot.c
|
glut_teapot.c
|
||||||
glut_vidresize.c
|
glut_vidresize.c
|
||||||
glut_util.c
|
glut_util.c
|
||||||
glut_ext.c
|
glut_ext.c
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ int glutGet(GLenum state) {
|
|||||||
num++;
|
num++;
|
||||||
children = children->siblings;
|
children = children->siblings;
|
||||||
}
|
}
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
case GLUT_WINDOW_BUFFER_SIZE: // best guesses
|
case GLUT_WINDOW_BUFFER_SIZE: // best guesses
|
||||||
case GLUT_WINDOW_DEPTH_SIZE:
|
case GLUT_WINDOW_DEPTH_SIZE:
|
||||||
@@ -97,7 +97,7 @@ int glutGet(GLenum state) {
|
|||||||
case GLUT_WINDOW_NUM_SAMPLES:
|
case GLUT_WINDOW_NUM_SAMPLES:
|
||||||
case GLUT_WINDOW_STEREO:
|
case GLUT_WINDOW_STEREO:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case GLUT_WINDOW_CURSOR:
|
case GLUT_WINDOW_CURSOR:
|
||||||
return gState.currentWindow->cursor; // don't need to lock window since it won't change
|
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;
|
return 1;
|
||||||
|
|
||||||
case GLUT_HAS_SPACEBALL:
|
case GLUT_HAS_SPACEBALL:
|
||||||
case GLUT_HAS_DIAL_AND_BUTTON_BOX:
|
|
||||||
case GLUT_HAS_TABLET:
|
|
||||||
case GLUT_NUM_SPACEBALL_BUTTONS:
|
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_DIALS:
|
||||||
|
case GLUT_NUM_BUTTON_BOX_BUTTONS:
|
||||||
|
case GLUT_HAS_TABLET:
|
||||||
case GLUT_NUM_TABLET_BUTTONS:
|
case GLUT_NUM_TABLET_BUTTONS:
|
||||||
|
case GLUT_HAS_JOYSTICK:
|
||||||
|
case GLUT_JOYSTICK_POLL_RATE:
|
||||||
|
case GLUT_JOYSTICK_BUTTONS:
|
||||||
|
case GLUT_JOYSTICK_AXES:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case GLUT_NUM_MOUSE_BUTTONS:
|
case GLUT_NUM_MOUSE_BUTTONS:
|
||||||
{
|
{
|
||||||
int32 mouseButtons = 3; // good guess
|
int32 mouseButtons = 3; // good guess
|
||||||
@@ -189,6 +193,14 @@ int glutDeviceGet(GLenum info) {
|
|||||||
return mouseButtons;
|
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:
|
default:
|
||||||
__glutWarning("invalid glutDeviceGet parameter: %d", info);
|
__glutWarning("invalid glutDeviceGet parameter: %d", info);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user