Hopefully removed all damage done by commits without merge

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@561 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2005-01-05 14:28:22 +00:00
parent ac2e30aecd
commit b1e9a6e16d
5 changed files with 14 additions and 13 deletions

View File

@ -172,8 +172,10 @@ static struct name_address_pair glut_functions[] =
{ "glutStrokeString", (void *) glutStrokeString },
{ "glutWireRhombicDodecahedron", (void *) glutWireRhombicDodecahedron },
{ "glutSolidRhombicDodecahedron", (void *) glutSolidRhombicDodecahedron },
{ "glutWireSierpinskiSponge ", (void *) glutWireSierpinskiSponge },
{ "glutSolidSierpinskiSponge ", (void *) glutSolidSierpinskiSponge },
{ "glutWireSierpinskiSponge", (void *) glutWireSierpinskiSponge },
{ "glutSolidSierpinskiSponge", (void *) glutSolidSierpinskiSponge },
{ "glutWireCylinder", (void *) glutWireCylinder },
{ "glutSolidCylinder", (void *) glutSolidCylinder },
{ "glutGetProcAddress", (void *) glutGetProcAddress },
{ "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
{ NULL, NULL }

View File

@ -153,7 +153,7 @@ void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string )
* point back to the start of the line and down one line.
*/
while( ( c = *string++) )
if( string[c] == '\n' )
if( c == '\n' )
{
glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL );
x = 0.0f;

View File

@ -487,7 +487,7 @@ static void fghSleepForEvents( void )
wait.tv_usec = (msec % 1000) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait );
if( -1 == err )
if( ( -1 == err ) && ( errno != EINTR ) )
fgWarning ( "freeglut select() error: %d", errno );
}
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE

View File

@ -555,8 +555,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
return fgStructure.Window ? fgStructure.Window->State.IgnoreKeyRepeat : 0;
case GLUT_DEVICE_KEY_REPEAT:
/* XXX WARNING: THIS IS A BIG LIE! */
return GLUT_KEY_REPEAT_DEFAULT;
return fgState.KeyRepeat;
default:
fgWarning( "glutDeviceGet(): missing enum handle %d", eWhat );

View File

@ -316,7 +316,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
*/
winAttr.event_mask =
StructureNotifyMask | SubstructureNotifyMask | ExposureMask |
ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyRelease |
ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask |
VisibilityChangeMask | EnterWindowMask | LeaveWindowMask |
PointerMotionMask | ButtonMotionMask;
winAttr.background_pixmap = None;
@ -401,12 +401,6 @@ void fgOpenWindow( SFG_Window* window, const char* title,
}
#endif
glXMakeCurrent(
fgDisplay.Display,
window->Window.Handle,
window->Window.Context
);
/*
* XXX Assume the new window is visible by default
* XXX Is this a safe assumption?
@ -452,6 +446,12 @@ void fgOpenWindow( SFG_Window* window, const char* title,
XSetWMProtocols( fgDisplay.Display, window->Window.Handle,
&fgDisplay.DeleteWindow, 1 );
glXMakeCurrent(
fgDisplay.Display,
window->Window.Handle,
window->Window.Context
);
XMapWindow( fgDisplay.Display, window->Window.Handle );
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE