X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_structure.c;h=d50063f52a44d43ea6489a20118724c3ecf49d92;hb=99d53f15a4216240088132f6af9cb194b519b1cc;hp=e7790379e0d5a48d1f97842c9f5225c8ebf057ca;hpb=0ad162e4550450e4c5e0d930e564e88d1a197575;p=freeglut diff --git a/src/fg_structure.c b/src/fg_structure.c index e779037..d50063f 100644 --- a/src/fg_structure.c +++ b/src/fg_structure.c @@ -49,6 +49,7 @@ SFG_Structure fgStructure = { { NULL, NULL }, /* The list of windows */ /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ extern void fgPlatformCreateWindow ( SFG_Window *window ); +extern void fghDefaultReshape(int width, int height); static void fghClearCallBacks( SFG_Window *window ) { @@ -77,6 +78,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, fgPlatformCreateWindow ( window ); fghClearCallBacks( window ); + SET_WCB( *window, Reshape, fghDefaultReshape); /* Initialize the object properties */ window->ID = ++fgStructure.WindowID; @@ -94,7 +96,7 @@ SFG_Window* fgCreateWindow( SFG_Window* parent, const char* title, window->State.Cursor = GLUT_CURSOR_INHERIT; /* Mark window as menu if a menu is to be created */ - window->IsMenu = isMenu; + window->IsMenu = isMenu; /* * Open the window now. The fgOpenWindow() function is system @@ -531,7 +533,7 @@ static void fghcbMenuByID( SFG_Menu *menu, return; /* Check the menu's ID. */ - if( menu->ID == (int)(enumerator->data) ) + if( menu->ID == *( int *)(enumerator->data) ) { enumerator->found = GL_TRUE; enumerator->data = menu; @@ -550,7 +552,7 @@ SFG_Menu* fgMenuByID( int menuID ) /* This is easy and makes use of the menus enumeration defined above */ enumerator.found = GL_FALSE; - enumerator.data = (void *)menuID; + enumerator.data = (void *)&menuID; fgEnumMenus( fghcbMenuByID, &enumerator ); if( enumerator.found )