diff --git a/freeglut/freeglut/src/freeglut_callbacks.c b/freeglut/freeglut/src/freeglut_callbacks.c index 705c3d6..d7c998a 100644 --- a/freeglut/freeglut/src/freeglut_callbacks.c +++ b/freeglut/freeglut/src/freeglut_callbacks.c @@ -128,7 +128,7 @@ void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ), static void fghVisibility( int status ) { int glut_status = GLUT_VISIBLE; - + freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Window ); diff --git a/freeglut/freeglut/src/freeglut_cursor.c b/freeglut/freeglut/src/freeglut_cursor.c index 23839a5..50f0b42 100644 --- a/freeglut/freeglut/src/freeglut_cursor.c +++ b/freeglut/freeglut/src/freeglut_cursor.c @@ -53,7 +53,7 @@ int fgGetCursorError( Cursor cursor ) { int ret = 0; char buf[ 256 ]; - + switch( cursor ) { case BadAlloc: @@ -110,7 +110,7 @@ void FGAPIENTRY glutSetCursor( int cursorID ) if( GLUT_CURSOR_FULL_CROSSHAIR == cursorID ) cursorID = GLUT_CURSOR_CROSSHAIR; - + switch( cursorID ) { MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, XC_right_ptr); @@ -162,7 +162,7 @@ void FGAPIENTRY glutSetCursor( int cursorID ) 0, 0 ); break; } - + case GLUT_CURSOR_INHERIT: break; @@ -222,7 +222,7 @@ void FGAPIENTRY glutSetCursor( int cursorID ) MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS ); /* MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO ); */ ZAP_CURSOR( GLUT_CURSOR_NONE, NULL ); - + default: MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_ARROW ); } diff --git a/freeglut/freeglut/src/freeglut_ext.c b/freeglut/freeglut/src/freeglut_ext.c index 79a64e4..9c8da14 100644 --- a/freeglut/freeglut/src/freeglut_ext.c +++ b/freeglut/freeglut/src/freeglut_ext.c @@ -179,7 +179,7 @@ static struct name_address_pair glut_functions[] = { "glutGetProcAddress", (void *) glutGetProcAddress }, { "glutMouseWheelFunc", (void *) glutMouseWheelFunc }, { NULL, NULL } -}; +}; void *FGAPIENTRY glutGetProcAddress( const char *procName ) diff --git a/freeglut/freeglut/src/freeglut_font.c b/freeglut/freeglut/src/freeglut_font.c index 4bf8ddd..59c1c1f 100644 --- a/freeglut/freeglut/src/freeglut_font.c +++ b/freeglut/freeglut/src/freeglut_font.c @@ -280,7 +280,7 @@ void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string ) glEnd( ); } - + length += schar->Right; glTranslatef( schar->Right, 0.0, 0.0 ); } @@ -302,7 +302,7 @@ int FGAPIENTRY glutStrokeWidth( void* fontID, int character ) ); schar = font->Characters[ character ]; freeglut_return_val_if_fail( schar, 0 ); - + return ( int )( schar->Right + 0.5 ); } diff --git a/freeglut/freeglut/src/freeglut_font_data.c b/freeglut/freeglut/src/freeglut_font_data.c index 566aeba..349c15d 100644 --- a/freeglut/freeglut/src/freeglut_font_data.c +++ b/freeglut/freeglut/src/freeglut_font_data.c @@ -33,7 +33,7 @@ /* * Following fonts are defined in this file: - * + * * 1. fgFontFixed8x13 <-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1> * 2. fgFontFixed9x15 <-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1> * 3. fgFontHelvetica10 <-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1> diff --git a/freeglut/freeglut/src/freeglut_gamemode.c b/freeglut/freeglut/src/freeglut_gamemode.c index 0344525..703005d 100644 --- a/freeglut/freeglut/src/freeglut_gamemode.c +++ b/freeglut/freeglut/src/freeglut_gamemode.c @@ -89,7 +89,7 @@ void fghRememberState( void ) /* * Query the current display settings: */ - fgDisplay.DisplayModeValid = + fgDisplay.DisplayModeValid = XF86VidModeGetModeLine( fgDisplay.Display, fgDisplay.Screen, @@ -110,7 +110,7 @@ void fghRememberState( void ) #elif TARGET_HOST_WIN32 /* DEVMODE devMode; */ - + /* * Grab the current desktop settings... */ @@ -432,7 +432,7 @@ int FGAPIENTRY glutEnterGameMode( void ) return FALSE; } - fgStructure.GameMode = fgCreateWindow( + fgStructure.GameMode = fgCreateWindow( NULL, "FREEGLUT", 0, 0, fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE ); @@ -453,7 +453,7 @@ int FGAPIENTRY glutEnterGameMode( void ) /* Move the Pointer to the middle of the fullscreen window */ XWarpPointer( fgDisplay.Display, - None, + None, fgDisplay.RootWindow, 0, 0, 0, 0, fgState.GameModeSize.X/2, fgState.GameModeSize.Y/2 @@ -476,7 +476,7 @@ int FGAPIENTRY glutEnterGameMode( void ) GrabModeAsync, GrabModeAsync, fgStructure.GameMode->Window.Handle, None, CurrentTime) ) usleep( 100 ); - + /* * Change input focus to the new window. This will exit the application * if the new window is not viewable yet, see the XGrabPointer loop above. diff --git a/freeglut/freeglut/src/freeglut_geometry.c b/freeglut/freeglut/src/freeglut_geometry.c index b81a05f..5468551 100644 --- a/freeglut/freeglut/src/freeglut_geometry.c +++ b/freeglut/freeglut/src/freeglut_geometry.c @@ -197,7 +197,7 @@ void FGAPIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) glVertex3d(0,0,radius); for (j=slices; j>=0; j--) - { + { glNormal3d(cost1[j]*r1, sint1[j]*r1, z1 ); glVertex3d(cost1[j]*r1*radius, sint1[j]*r1*radius, z1*radius); } @@ -263,7 +263,7 @@ void FGAPIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks) double x,y,z; /* Pre-computed circle */ - + double *sint1,*cost1; double *sint2,*cost2; circleTable(&sint1,&cost1,-slices ); diff --git a/freeglut/freeglut/src/freeglut_glutfont_definitions.c b/freeglut/freeglut/src/freeglut_glutfont_definitions.c index 87fdf40..4dde49f 100644 --- a/freeglut/freeglut/src/freeglut_glutfont_definitions.c +++ b/freeglut/freeglut/src/freeglut_glutfont_definitions.c @@ -46,20 +46,20 @@ struct freeglutStrokeFont { - const char *name ; - int num_chars ; - void *ch ; - float top ; - float bottom ; -}; + const char *name ; + int num_chars ; + void *ch ; + float top ; + float bottom ; +}; struct freeglutBitmapFont -{ - const char *name ; - const int num_chars ; - const int first ; - const void *ch ; -}; +{ + const char *name ; + const int num_chars ; + const int first ; + const void *ch ; +}; struct freeglutStrokeFont glutStrokeRoman ; diff --git a/freeglut/freeglut/src/freeglut_init.c b/freeglut/freeglut/src/freeglut_init.c index 7aad2f3..e25404f 100644 --- a/freeglut/freeglut/src/freeglut_init.c +++ b/freeglut/freeglut/src/freeglut_init.c @@ -298,7 +298,7 @@ void fgDeinitialize( void ) free( fgState.ProgramName ); fgState.ProgramName = NULL; } - + #if TARGET_HOST_UNIX_X11 @@ -369,7 +369,7 @@ from The Open Group. * It returns a bitmask that indicates which of the four values * were actually found in the string. For each value found, * the corresponding argument is updated; for each value - * not found, the corresponding argument is left unchanged. + * not found, the corresponding argument is left unchanged. */ static int @@ -377,7 +377,7 @@ ReadInteger(char *string, char **NextString) { register int Result = 0; int Sign = 1; - + if (*string == '+') string++; else if (*string == '-') @@ -417,7 +417,7 @@ static int XParseGeometry ( strind = (char *)string; if (*strind != '+' && *strind != '-' && *strind != 'x') { tempWidth = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) + if (strind == nextCharacter) return 0; strind = nextCharacter; mask |= WidthValue; @@ -522,7 +522,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) { int interval; sscanf( fps, "%d", &interval ); - + if( interval <= 0 ) fgState.FPSInterval = 5000; /* 5000 millisecond default */ else diff --git a/freeglut/freeglut/src/freeglut_internal.h b/freeglut/freeglut/src/freeglut_internal.h index 3f35414..23ff6b6 100644 --- a/freeglut/freeglut/src/freeglut_internal.h +++ b/freeglut/freeglut/src/freeglut_internal.h @@ -31,7 +31,7 @@ /* XXX Update these for each release! */ #define VERSION_MAJOR 2 #define VERSION_MINOR 2 -#define VERSION_PATCH 0 +#define VERSION_PATCH 0 /* * Freeglut is meant to be available under all Unix/X11 and Win32 platforms. @@ -488,7 +488,7 @@ enum CB_ButtonBox, CB_TabletMotion, CB_TabletButton, - + /* Always make this the LAST one */ TOTAL_CALLBACKS }; diff --git a/freeglut/freeglut/src/freeglut_joystick.c b/freeglut/freeglut/src/freeglut_joystick.c index 478e287..58c594d 100644 --- a/freeglut/freeglut/src/freeglut_joystick.c +++ b/freeglut/freeglut/src/freeglut_joystick.c @@ -530,7 +530,7 @@ static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes ) IOHIDEventStruct hidEvent; (*(joy->hidDev))->getElementValue ( joy->hidDev, buttonCookies[i], &hidEvent ); if ( hidEvent.value ) - *buttons |= 1 << i; + *buttons |= 1 << i; } } @@ -892,7 +892,7 @@ static CFDictionaryRef fghJoystickGetCFProperties ( SFG_Joystick *joy, io_object IOReturn rv; CFMutableDictionaryRef cfProperties; -#if 0 +#if 0 /* comment copied from darwin/SDL_sysjoystick.c */ /* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also * get dictionary for usb properties: step up two levels and get CF dictionary for USB properties @@ -913,7 +913,7 @@ static CFDictionaryRef fghJoystickGetCFProperties ( SFG_Joystick *joy, io_object } #endif - rv = IORegistryEntryCreateCFProperties( ioDev /*parent2*/, + rv = IORegistryEntryCreateCFProperties( ioDev /*parent2*/, &cfProperties, kCFAllocatorDefault, kNilOptions); if (rv != kIOReturnSuccess || !cfProperties) { fgWarning ( "%s", "error getting device properties"); @@ -930,7 +930,7 @@ static void fghJoystickElementEnumerator ( SFG_Joystick *joy, void *element, voi return; } - static_cast(vjs)->parseElement ( (CFDictionaryRef) element ); + static_cast(vjs)->parseElement ( (CFDictionaryRef) element ); } /** element enumerator function : pass NULL for top-level*/ @@ -939,7 +939,7 @@ static void fghJoystickEnumerateElements ( SFG_Joystick *joy, CFTypeRef element assert(CFGetTypeID(element) == CFArrayGetTypeID()); CFRange range = {0, CFArrayGetCount ((CFArrayRef)element)}; - CFArrayApplyFunction((CFArrayRef) element, range, + CFArrayApplyFunction((CFArrayRef) element, range, &fghJoystickElementEnumerator, joy ); } @@ -951,7 +951,7 @@ static void fghJoystickParseElement ( SFG_Joystick *joy, CFDictionaryRef element long type, page, usage; CFNumberGetValue((CFNumberRef) - CFDictionaryGetValue ((CFDictionaryRef) element, CFSTR(kIOHIDElementTypeKey)), + CFDictionaryGetValue ((CFDictionaryRef) element, CFSTR(kIOHIDElementTypeKey)), kCFNumberLongType, &type); switch ( typ e) { @@ -962,7 +962,7 @@ static void fghJoystickParseElement ( SFG_Joystick *joy, CFDictionaryRef element CFNumberGetValue( (CFNumberRef) refUsage, kCFNumberLongType, &usage ); CFNumberGetValue( (CFNumberRef) refPage, kCFNumberLongType, &page ); - if (page == kHIDPage_GenericDesktop) { + if (page == kHIDPage_GenericDesktop) { switch ( usage ) /* look at usage to determine function */ { case kHIDUsage_GD_X: @@ -1000,7 +1000,7 @@ static void fghJoystickParseElement ( SFG_Joystick *joy, CFDictionaryRef element default: break; - } + } } static void fghJoystickAddAxisElement ( SFG_Joystick *joy, CFDictionaryRef axis ) @@ -1009,17 +1009,17 @@ static void fghJoystickAddAxisElement ( SFG_Joystick *joy, CFDictionaryRef axis int index = joy->num_axes++; CFNumberGetValue ((CFNumberRef) - CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementCookieKey) ), + CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementCookieKey) ), kCFNumberLongType, &cookie); axisCookies[index] = (IOHIDElementCookie) cookie; CFNumberGetValue ((CFNumberRef) - CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMinKey) ), + CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMinKey) ), kCFNumberLongType, &lmin); CFNumberGetValue ((CFNumberRef) - CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMaxKey) ), + CFDictionaryGetValue ( axis, CFSTR(kIOHIDElementMaxKey) ), kCFNumberLongType, &lmax); joy->min[index] = lmin; @@ -1033,7 +1033,7 @@ static void fghJoystickAddButtonElement ( SFG_Joystick *joy, CFDictionaryRef but { long cookie; CFNumberGetValue ((CFNumberRef) - CFDictionaryGetValue ( button, CFSTR(kIOHIDElementCookieKey) ), + CFDictionaryGetValue ( button, CFSTR(kIOHIDElementCookieKey) ), kCFNumberLongType, &cookie); joy->buttonCookies[num_buttons++] = (IOHIDElementCookie) cookie; @@ -1254,7 +1254,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) } /* create device interface */ - rv = IOCreatePlugInInterfaceForService( ioDevices[ joy->id ], + rv = IOCreatePlugInInterfaceForService( ioDevices[ joy->id ], kIOHIDDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugin, &score ); @@ -1266,7 +1266,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) } pluginResult = ( *plugin )->QueryInterface( - plugin, + plugin, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), &( LPVOID )joy->hidDev ); @@ -1289,7 +1289,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) props = getCFProperties( ioDevices[ joy->id ] ); /* recursively enumerate all the bits */ - CFTypeRef topLevelElement = + CFTypeRef topLevelElement = CFDictionaryGetValue( props, CFSTR( kIOHIDElementKey ) ); enumerateElements( topLevelElement ); @@ -1490,11 +1490,11 @@ static void fghJoystickOpen( SFG_Joystick* joy ) * Set the correct number of axes for the linux driver */ # ifdef JS_NEW - /* Melchior Franz's fixes for big-endian Linuxes since writing - * to the upper byte of an uninitialized word doesn't work. - * 9 April 2003 + /* Melchior Franz's fixes for big-endian Linuxes since writing + * to the upper byte of an uninitialized word doesn't work. + * 9 April 2003 */ - ioctl( joy->fd, JSIOCGAXES, &u ); + ioctl( joy->fd, JSIOCGAXES, &u ); joy->num_axes = u; ioctl( joy->fd, JSIOCGBUTTONS, &u ); joy->num_buttons = u; @@ -1514,7 +1514,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) counter = 0; do - { + { fghJoystickRawRead( joy, NULL, joy->center ); counter++; } while( !joy->error && diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c index 9bc7a91..fb75654 100644 --- a/freeglut/freeglut/src/freeglut_main.c +++ b/freeglut/freeglut/src/freeglut_main.c @@ -180,7 +180,7 @@ static void fghRedrawWindowByHandle ( SFG_WindowHandleType handle ) fgSetWindow( window ); - fghReshapeWindowByHandle( + fghReshapeWindowByHandle( window->Window.Handle, window->State.Width, window->State.Height @@ -205,7 +205,7 @@ static void fghcbDisplayWindow( SFG_Window *window, fgSetWindow( window ); - fghReshapeWindowByHandle( + fghReshapeWindowByHandle( window->Window.Handle, window->State.Width, window->State.Height @@ -229,7 +229,7 @@ static void fghcbDisplayWindow( SFG_Window *window, } #elif TARGET_HOST_WIN32 RedrawWindow( - window->Window.Handle, NULL, NULL, + window->Window.Handle, NULL, NULL, RDW_NOERASE | RDW_INTERNALPAINT | RDW_INVALIDATE | RDW_UPDATENOW ); #endif @@ -412,7 +412,7 @@ static void fgHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e) e->data = w; } fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e ); -} +} static int fgHavePendingRedisplays (void) { SFG_Enumerator enumerator; @@ -497,7 +497,7 @@ int fgGetXModifiers( XEvent *event ) ret |= GLUT_ACTIVE_CTRL; if( event->xkey.state & Mod1Mask ) ret |= GLUT_ACTIVE_ALT; - + return ret; } #endif @@ -540,7 +540,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) */ if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.DeleteWindow ) { - GETWINDOW( xclient ); + GETWINDOW( xclient ); fgDestroyWindow ( window ); @@ -640,7 +640,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) case VisibilityNotify: { - GETWINDOW( xvisibility ); + GETWINDOW( xvisibility ); /* * XXX INVOKE_WCB() does this check for us. */ @@ -660,13 +660,13 @@ void FGAPIENTRY glutMainLoopEvent( void ) INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_RETAINED ) ); window->State.Visible = GL_TRUE; break; - + case VisibilityPartiallyObscured: INVOKE_WCB( *window, WindowStatus, ( GLUT_PARTIALLY_RETAINED ) ); window->State.Visible = GL_TRUE; break; - + case VisibilityFullyObscured: INVOKE_WCB( *window, WindowStatus, ( GLUT_FULLY_COVERED ) ); window->State.Visible = GL_FALSE; @@ -741,7 +741,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) */ GETWINDOW( xbutton ); GETMOUSE( xbutton ); - + /* * An X button (at least in XFree86) is numbered from 1. * A GLUT button is numbered from 0. @@ -783,7 +783,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) window->ActiveMenu->Window->State.MouseY = event.xbutton.y_root - window->ActiveMenu->Y; } - + /* In the menu, invoke the callback and deactivate the menu*/ if( fgCheckActiveMenu( window->ActiveMenu->Window, window->ActiveMenu ) ) @@ -883,7 +883,7 @@ void FGAPIENTRY glutMainLoopEvent( void ) int direction = -1; if( button % 2 ) direction = 1; - + if( pressed ) INVOKE_WCB( *window, MouseWheel, ( wheel_number, direction, @@ -1082,7 +1082,7 @@ void FGAPIENTRY glutMainLoop( void ) INVOKE_WCB( *window, Visibility, ( window->State.Visible ) ); fgSetWindow( current_window ); } - + window = (SFG_Window *)window->Node.Next ; } #endif @@ -1096,13 +1096,13 @@ void FGAPIENTRY glutMainLoop( void ) /* * Step through the list of windows, seeing if there are any * that are not menus - */ + */ for( window = ( SFG_Window * )fgStructure.Windows.First; window; window = ( SFG_Window * )window->Node.Next ) if ( ! ( window->IsMenu ) ) break; - + if( ! window ) fgState.ExecState = GLUT_EXEC_STATE_STOP; else @@ -1236,12 +1236,12 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, break; #if 0 - case WM_SETFOCUS: + case WM_SETFOCUS: printf("WM_SETFOCUS: %p\n", window ); lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); break; - case WM_ACTIVATE: + case WM_ACTIVATE: if (LOWORD(wParam) != WA_INACTIVE) { /* glutSetCursor( fgStructure.Window->State.Cursor ); */ @@ -1262,7 +1262,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, * XXX call glutSetCurdsor() instead of defining two macros * XXX and implementing a nested case in-line. */ - case WM_SETCURSOR: + case WM_SETCURSOR: /* Set the cursor AND change it for this window class. */ #define MAP_CURSOR(a,b) \ case a: \ @@ -1327,7 +1327,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, { window->State.MouseX = LOWORD( lParam ); window->State.MouseY = HIWORD( lParam ); - + if ( window->ActiveMenu ) { window->State.Redisplay = GL_TRUE; @@ -1569,7 +1569,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, break; /* - * Remember the current modifiers state. This is done here in order + * Remember the current modifiers state. This is done here in order * to make sure the VK_DELETE keyboard callback is executed properly. */ fgState.Modifiers = fgGetWin32Modifiers( ); @@ -1635,7 +1635,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, POINT mouse_pos; /* - * Remember the current modifiers state. This is done here in order + * Remember the current modifiers state. This is done here in order * to make sure the VK_DELETE keyboard callback is executed properly. */ fgState.Modifiers = fgGetWin32Modifiers( ); @@ -1688,9 +1688,9 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, { BYTE state[ 256 ]; WORD code[ 2 ]; - + GetKeyboardState( state ); - + if( ToAscii( wParam, 0, state, code, 0 ) == 1 ) wParam=code[ 0 ]; diff --git a/freeglut/freeglut/src/freeglut_state.c b/freeglut/freeglut/src/freeglut_state.c index 9dc38fb..2adf2a7 100644 --- a/freeglut/freeglut/src/freeglut_state.c +++ b/freeglut/freeglut/src/freeglut_state.c @@ -507,7 +507,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat ) case GLUT_HAS_MOUSE: /* - * The Windows can be booted without a mouse. + * The Windows can be booted without a mouse. * It would be nice to have this reported. */ return GetSystemMetrics( SM_MOUSEPRESENT ); diff --git a/freeglut/freeglut/src/freeglut_structure.c b/freeglut/freeglut/src/freeglut_structure.c index 3a9c863..fe172d1 100644 --- a/freeglut/freeglut/src/freeglut_structure.c +++ b/freeglut/freeglut/src/freeglut_structure.c @@ -405,7 +405,7 @@ void fgDestroyStructure( void ) */ while( fgStructure.Menus.First ) fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First ); - + while( fgStructure.Windows.First ) fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First ); } diff --git a/freeglut/freeglut/src/freeglut_window.c b/freeglut/freeglut/src/freeglut_window.c index eb1842d..3723520 100644 --- a/freeglut/freeglut/src/freeglut_window.c +++ b/freeglut/freeglut/src/freeglut_window.c @@ -203,7 +203,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly, pfd.cColorBits = (BYTE) GetDeviceCaps( window->Window.Device, BITSPIXEL ); ppfd = &pfd; - + pixelformat = ChoosePixelFormat( window->Window.Device, ppfd ); if( pixelformat == 0 ) return GL_FALSE; @@ -235,8 +235,8 @@ void fgSetWindow ( SFG_Window *window ) if ( window ) { window->Window.Device = GetDC( window->Window.Handle ); - wglMakeCurrent( - window->Window.Device, + wglMakeCurrent( + window->Window.Device, window->Window.Context ); } @@ -293,7 +293,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, window->Window.VisualInfo = fgChooseVisual( ); fgState.DisplayMode &= ~GLUT_DOUBLE; } - + /* * GLUT also checks for multi-sampling, but I don't see that * anywhere else in FREEGLUT so I won't bother with it for the moment. @@ -471,13 +471,13 @@ void fgOpenWindow( SFG_Window* window, const char* title, &wmHints, NULL ); - + XSetWMProtocols( fgDisplay.Display, window->Window.Handle, &fgDisplay.DeleteWindow, 1 ); - + XMapWindow( fgDisplay.Display, window->Window.Handle ); } - + #elif TARGET_HOST_WIN32 WNDCLASS wc; @@ -486,13 +486,13 @@ void fgOpenWindow( SFG_Window* window, const char* title, ATOM atom; freeglut_assert_ready; - + /* * Grab the window class we have registered on glutInit(): */ atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc ); assert( atom != 0 ); - + if( gameMode ) { assert( window->Parent == NULL ); @@ -649,7 +649,7 @@ int FGAPIENTRY glutCreateWindow( const char* title ) int FGAPIENTRY glutCreateSubWindow( int parentID, int x, int y, int w, int h ) { int ret = 0; - + if( GL_FALSE == fgStructure.Window->State.IsOffscreen ) { SFG_Window* window = NULL; @@ -804,18 +804,18 @@ void FGAPIENTRY glutSetWindowTitle( const char* title ) #if TARGET_HOST_UNIX_X11 XTextProperty text; - + text.value = (unsigned char *) title; text.encoding = XA_STRING; text.format = 8; text.nitems = strlen( title ); - + XSetWMName( fgDisplay.Display, fgStructure.Window->Window.Handle, &text ); - + XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */ #elif TARGET_HOST_WIN32 @@ -840,7 +840,7 @@ void FGAPIENTRY glutSetIconTitle( const char* title ) #if TARGET_HOST_UNIX_X11 XTextProperty text; - + text.value = (unsigned char *) title; text.encoding = XA_STRING; text.format = 8; @@ -898,7 +898,7 @@ void FGAPIENTRY glutPositionWindow( int x, int y ) #elif TARGET_HOST_WIN32 RECT winRect; - + GetWindowRect( fgStructure.Window->Window.Handle, &winRect ); MoveWindow( fgStructure.Window->Window.Handle,