X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_structure.c;h=498dad3dac4ee9dea99fa90233d6b1ed5bc99a72;hb=4f58e4f75c3d57437da215f4119e9991b77272e0;hp=cd3a78147dddcbc0ecc128befabf5d7a70b867bc;hpb=34290224a4fea01b30fe3c83d3c6d00bd5945acd;p=freeglut diff --git a/src/freeglut_structure.c b/src/freeglut_structure.c index cd3a781..498dad3 100644 --- a/src/freeglut_structure.c +++ b/src/freeglut_structure.c @@ -29,7 +29,7 @@ #include "config.h" #endif -#include "../include/GL/freeglut.h" +#include #include "freeglut_internal.h" @@ -110,6 +110,9 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, window->IsMenu = isMenu; + window->State.IgnoreKeyRepeat = GL_FALSE; + window->State.KeyRepeating = GL_FALSE; + /* * Open the window now. The fgOpenWindow() function is system * dependant, and resides in freeglut_window.c. Uses fgState. @@ -405,7 +408,7 @@ void fgDestroyStructure( void ) */ while( fgStructure.Menus.First ) fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First ); - + while( fgStructure.Windows.First ) fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First ); } @@ -600,15 +603,13 @@ void fgListAppend(SFG_List *list, SFG_Node *node) void fgListRemove(SFG_List *list, SFG_Node *node) { - SFG_Node *ln; - - if( (ln = (SFG_Node *)node->Next) != NULL ) - ln->Prev = node->Prev; - if( (ln = (SFG_Node *)node->Prev) != NULL ) - ln->Next = node->Next; - if( (ln = (SFG_Node *)list->First) == node ) + if( node->Next ) + ( ( SFG_Node * )node->Next )->Prev = node->Prev; + if( node->Prev ) + ( ( SFG_Node * )node->Prev )->Next = node->Next; + if( ( ( SFG_Node * )list->First ) == node ) list->First = node->Next; - if( (ln = (SFG_Node *)list->Last) == node ) + if( ( ( SFG_Node * )list->Last ) == node ) list->Last = node->Prev; }