diff options
author | Brian Paul <[email protected]> | 2003-02-20 15:43:52 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-02-20 15:43:52 +0000 |
commit | 60f84fcc91c5fb86843c528416399303da113a2f (patch) | |
tree | 698d04b625c6efac205d76ae7d68b074102090f2 /src/glut/dos/init.c | |
parent | 449e47f06a46c42fb9895d13f37b599600225e56 (diff) |
latest DOS updates (Daniel Borca)
Diffstat (limited to 'src/glut/dos/init.c')
-rw-r--r-- | src/glut/dos/init.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/glut/dos/init.c b/src/glut/dos/init.c index 0f848f6f360..6c034ff5e2b 100644 --- a/src/glut/dos/init.c +++ b/src/glut/dos/init.c @@ -38,6 +38,9 @@ GLboolean g_redisplay = GL_FALSE; GLuint g_bpp = DEFAULT_BPP;
GLuint g_refresh = 0;
GLuint g_screen_w, g_screen_h;
+GLint g_driver_caps;
+
+GLuint g_fps = 0;
GLuint g_display_mode = 0;
int g_init_x = 0, g_init_y = 0;
@@ -68,6 +71,13 @@ void APIENTRY glutInit (int *argc, char **argv) }
__glutProgramName = __glutStrdup(str);
+ /* check if GLUT_FPS env var is set */
+ if ((env = getenv("GLUT_FPS")) != NULL) {
+ if ((g_fps = atoi(env)) <= 0) {
+ g_fps = 5000; /* 5000 milliseconds */
+ }
+ }
+
/* Initialize timer */
glutGet(GLUT_ELAPSED_TIME);
}
@@ -106,9 +116,10 @@ void APIENTRY glutMainLoop (void) {
GLint screen_size[2];
- DMesaGetIntegerv(DMESA_SCREEN_SIZE, screen_size);
+ DMesaGetIntegerv(DMESA_GET_SCREEN_SIZE, screen_size);
g_screen_w = screen_size[0];
g_screen_h = screen_size[1];
+ DMesaGetIntegerv(DMESA_GET_DRIVER_CAPS, &g_driver_caps);
}
pc_install_keyb();
|