/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
/*
- * Executes a single iteration in the FreeGLUT processing loop.
+ * Executes a single iteration in the freeglut processing loop.
*/
void FGAPIENTRY glutMainLoopEvent( void )
{
}
/*
- * Enters the FreeGLUT processing loop. Stays until the "ExecState" changes to "GLUT_EXEC_STATE_STOP".
+ * Enters the freeglut processing loop. Stays until the "ExecState" changes to "GLUT_EXEC_STATE_STOP".
*/
void FGAPIENTRY glutMainLoop( void )
{
}
/*
- * Leaves the FreeGLUT processing loop.
+ * Leaves the freeglut processing loop.
*/
void FGAPIENTRY glutLeaveMainLoop( void )
{
*/
if( window->Callbacks.KeyboardUp != NULL )
window->Callbacks.KeyboardUp( 127, window->State.MouseX, window->State.MouseY );
+
+ break ;
default:
- /*
- * Call the KeyboardUp callback for a regular character if there is one.
- */
- if( window->Callbacks.KeyboardUp != NULL )
- window->Callbacks.KeyboardUp( wParam, window->State.MouseX, window->State.MouseY );
+ {
+ /*
+ * Call the KeyboardUp callback for a regular character if there is one.
+ */
+ BYTE state[ 256 ];
+ WORD code[ 2 ];
+
+ GetKeyboardState(state);
+
+ if ( ToAscii( wParam, 0, state, code, 0 ) == 1 )
+ wParam=code[ 0 ];
+
+ if( window->Callbacks.KeyboardUp != NULL )
+ window->Callbacks.KeyboardUp( (char)wParam, window->State.MouseX, window->State.MouseY );
+ }
}
/*
/*
* Have the special callback executed:
*/
- window->Callbacks.Keyboard( wParam, window->State.MouseX, window->State.MouseY );
+ window->Callbacks.Keyboard( (char)wParam, window->State.MouseX, window->State.MouseY );
/*
* Thrash the modifiers register now