mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
close window if gsg fails
This commit is contained in:
parent
00679ad733
commit
6ffea5d693
@ -588,7 +588,18 @@ begin_frame() {
|
|||||||
}
|
}
|
||||||
make_gsg();
|
make_gsg();
|
||||||
if (_gsg == (GraphicsStateGuardian *)NULL) {
|
if (_gsg == (GraphicsStateGuardian *)NULL) {
|
||||||
// Still couldn't make the GSG for some reason.
|
// Still couldn't make the GSG for some reason. We should pass
|
||||||
|
// an appropriate diagnostic up to the application; for now,
|
||||||
|
// we'll just shut down the window.
|
||||||
|
|
||||||
|
// WARNING: this is a non-thread-safe hack. This really should
|
||||||
|
// happen in the window thread, not here in the draw thread.
|
||||||
|
display_cat.info()
|
||||||
|
<< "Could not open GSG, closing " << get_type() << ".\n";
|
||||||
|
close_window();
|
||||||
|
WindowProperties properties;
|
||||||
|
properties.set_open(false);
|
||||||
|
system_changed_properties(properties);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user