From e168af86e8c8ab1ac30817bb570b374964da72a2 Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Wed, 4 May 2005 12:51:53 +0000 Subject: [PATCH] Making the \"key repeat\" initialization consistent with the rest of its usage; also making the \"initDisplayString\" ever-so-slightly mroe general git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@592 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freeglut_init.c b/src/freeglut_init.c index 89e4c43..078192c 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -60,7 +60,7 @@ SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */ GL_FALSE, /* UseCurrentContext */ GL_FALSE, /* GLDebugSwitch */ GL_FALSE, /* XSyncSwitch */ - GL_TRUE, /* KeyRepeat */ + GLUT_KEY_REPEAT_ON, /* KeyRepeat */ 0xffffffff, /* Modifiers */ 0, /* FPSInterval */ 0, /* SwapCount */ @@ -265,7 +265,7 @@ void fgDeinitialize( void ) fgState.ActionOnWindowClose = GLUT_ACTION_EXIT; fgState.ExecState = GLUT_EXEC_STATE_INIT; - fgState.KeyRepeat = GL_TRUE; + fgState.KeyRepeat = GLUT_KEY_REPEAT_ON; fgState.Modifiers = 0xffffffff; fgState.GameModeSize.X = 640; @@ -685,7 +685,6 @@ void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode ) /* -- INIT DISPLAY STRING PARSING ------------------------------------------ */ -#define NUM_TOKENS 36 static char* Tokens[] = { "alpha", "acca", "acc", "blue", "buffer", "conformant", "depth", "double", @@ -696,6 +695,7 @@ static char* Tokens[] = "xstaticgrey", "xgreyscale", "xstaticcolour", "xpseudocolour", "xtruecolour", "xdirectcolour", "borderless", "aux" }; +#define NUM_TOKENS (sizeof(Tokens) / sizeof(*Tokens)) void FGAPIENTRY glutInitDisplayString( const char* displayMode ) { -- 1.7.10.4