calling glutExit in the erro callback is a really bad example...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1381 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
4c740e0f35
commit
19c5ab0140
@ -151,18 +151,13 @@ Error(const char *fmt, va_list ap)
|
|||||||
/* print warning message */
|
/* print warning message */
|
||||||
vprintf(fmt, ap);
|
vprintf(fmt, ap);
|
||||||
|
|
||||||
/* deInitialize the freeglut state */
|
/* terminate program, after pause for input so user can see */
|
||||||
/* This all goes haywire of course when the error occurs during deinitialize,
|
|
||||||
* one might want to call exit directly as its possible freeglut is messed
|
|
||||||
* up internally when error is called.
|
|
||||||
*/
|
|
||||||
printf("Error callback: calling glutExit() to prepare for clean exit\n");
|
|
||||||
glutExit();
|
|
||||||
|
|
||||||
/* terminate program */
|
|
||||||
printf ( "Please enter something to exit: " );
|
printf ( "Please enter something to exit: " );
|
||||||
fgets ( dummy_string, STRING_LENGTH, stdin );
|
fgets ( dummy_string, STRING_LENGTH, stdin );
|
||||||
|
|
||||||
|
/* Call exit directly as freeglut is messed
|
||||||
|
* up internally when an error is called.
|
||||||
|
*/
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user