[Plib-cvs] plib/src/pw pwX11.cxx,1.5,1.6
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-03-20 02:31:11
|
Update of /cvsroot/plib/plib/src/pw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1323/plib/src/pw Modified Files: pwX11.cxx Log Message: Fixed key-repeat problem in PW and enhanced demo program to make it obvious that it's fixed. Index: pwX11.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pwX11.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- pwX11.cxx 24 Feb 2004 02:10:40 -0000 1.5 +++ pwX11.cxx 20 Mar 2004 02:21:18 -0000 1.6 @@ -74,7 +74,8 @@ #endif -static int initialised = 0 ; +static bool initialised = false ; +static bool insideCallback = false ; static int modifiers = 0 ; static int origin [2] = { 0, 0 } ; static int size [2] = { 640, 480 } ; @@ -355,7 +356,8 @@ resizeCB = NULL ; [...176 lines suppressed...] + { + fprintf ( stderr, "PLIB/PW: FATAL - Application called pwSwapBuffers" + " from inside a callback function.\n" ) ; + exit ( 1 ) ; + } + glFlush () ; glXSwapBuffers ( currDisplay, currHandle ) ; getEvents () ; @@ -593,6 +630,10 @@ void pwCleanup () { + if ( ! initialised ) + fprintf ( stderr, "PLIB/PW: WARNING - Application called pwCleanup" + " before pwInit.\n" ) ; + glXDestroyContext ( currDisplay, currContext ) ; XDestroyWindow ( currDisplay, currHandle ) ; XFlush ( currDisplay ) ; |