mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
add glx_error_abort
This commit is contained in:
parent
13d1f95326
commit
7bf1df25be
@ -56,3 +56,4 @@ init_libglxdisplay() {
|
||||
}
|
||||
|
||||
const string display_cfg = config_glxdisplay.GetString("display", "");
|
||||
const bool glx_error_abort = config_glxdisplay.GetBool("glx-error-abort", false);
|
||||
|
@ -27,5 +27,6 @@ NotifyCategoryDecl(glxdisplay, EXPCL_PANDAGL, EXPTP_PANDAGL);
|
||||
extern EXPCL_PANDAGL void init_libglxdisplay();
|
||||
|
||||
extern const string display_cfg;
|
||||
extern const bool glx_error_abort;
|
||||
|
||||
#endif /* __CONFIG_GLXDISPLAY_H__ */
|
||||
|
@ -545,6 +545,10 @@ error_handler(Display *display, XErrorEvent *error) {
|
||||
glxdisplay_cat.error()
|
||||
<< msg << "\n";
|
||||
|
||||
if (glx_error_abort) {
|
||||
abort();
|
||||
}
|
||||
|
||||
// We return to allow the application to continue running, unlike
|
||||
// the default X error handler which exits.
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user