فهرست منبع

fix issues with resizing fullscreen windows

David Rose 19 سال پیش
والد
کامیت
969e962ed8
3فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 1 0
      panda/src/display/graphicsWindow.cxx
  2. 4 0
      panda/src/dxgsg8/wdxGraphicsWindow8.cxx
  3. 4 0
      panda/src/dxgsg9/wdxGraphicsWindow9.cxx

+ 1 - 0
panda/src/display/graphicsWindow.cxx

@@ -566,6 +566,7 @@ set_properties_now(WindowProperties &properties) {
 
 
         // And mark the window closed.
         // And mark the window closed.
         _properties.set_open(false);
         _properties.set_open(false);
+        _is_valid = false;
       }
       }
 
 
     } else {
     } else {

+ 4 - 0
panda/src/dxgsg8/wdxGraphicsWindow8.cxx

@@ -437,6 +437,10 @@ handle_reshape() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool wdxGraphicsWindow8::
 bool wdxGraphicsWindow8::
 do_fullscreen_resize(int x_size, int y_size) {
 do_fullscreen_resize(int x_size, int y_size) {
+  if (!WinGraphicsWindow::do_fullscreen_resize(x_size, y_size)) {
+    return false;
+  }
+
   bool bCouldntFindValidZBuf;
   bool bCouldntFindValidZBuf;
   D3DFORMAT pixFmt;
   D3DFORMAT pixFmt;
   bool bNeedZBuffer = (_wcontext._presentation_params.EnableAutoDepthStencil != false);
   bool bNeedZBuffer = (_wcontext._presentation_params.EnableAutoDepthStencil != false);

+ 4 - 0
panda/src/dxgsg9/wdxGraphicsWindow9.cxx

@@ -436,6 +436,10 @@ handle_reshape() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool wdxGraphicsWindow9::
 bool wdxGraphicsWindow9::
 do_fullscreen_resize(int x_size, int y_size) {
 do_fullscreen_resize(int x_size, int y_size) {
+  if (!WinGraphicsWindow::do_fullscreen_resize(x_size, y_size)) {
+    return false;
+  }
+
   bool bCouldntFindValidZBuf;
   bool bCouldntFindValidZBuf;
   D3DFORMAT pixFmt;
   D3DFORMAT pixFmt;
   bool bNeedZBuffer = (_wcontext._presentation_params.EnableAutoDepthStencil != false);
   bool bNeedZBuffer = (_wcontext._presentation_params.EnableAutoDepthStencil != false);