X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_callbacks.c;h=90baf105b5ad89ab4eac49e3661c90ef2808c17b;hb=b002d4d62a9591e15a8fc58d4043f103ce5d51de;hp=b741a0c19a53e0db21c9f2a32f47bd72891b26ce;hpb=646676b8dbf8ab504ac8a275fe9a63a403a3190b;p=freeglut diff --git a/src/freeglut_callbacks.c b/src/freeglut_callbacks.c index b741a0c..90baf10 100644 --- a/src/freeglut_callbacks.c +++ b/src/freeglut_callbacks.c @@ -49,6 +49,12 @@ void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ) { SET_CALLBACK( Display ); + + /* + * Force a redisplay with the new callback + */ + fgStructure.Window->State.Redisplay = TRUE; + } /* @@ -100,7 +106,7 @@ void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ), i /* * Create a new freeglut timer hook structure */ - timer = calloc( sizeof(SFG_Timer), 1 ); + timer = (SFG_Timer *)calloc( sizeof(SFG_Timer), 1 ); /* * Remember the callback address and timer hook's ID