aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/d3d
diff options
context:
space:
mode:
authorAlessandro Borges <[email protected]>2008-04-04 14:46:08 +0000
committerAlessandro Borges <[email protected]>2008-04-04 14:46:08 +0000
commit12c23dfcdcfc93589a18246c74a080d2681c8616 (patch)
treee0244ba1a04be3618e7c75c6dae498bcc2a362e9 /src/native/d3d
parent93ebcaaf2268f170348f88f4e12da9e7043d6d72 (diff)
Issue number: 578
Submitted by: Aces Reviewed by: Kevin Fix Issue #578 - "Fail to Reset() D3D device with 0 dimension" . D3D do not handle device with zero dimension. This fix reset the invalid window size to 1x1 window. It allows recovery of 3D components after a resize, drag or other operation which may set it as zero dimension. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@896 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/d3d')
-rw-r--r--src/native/d3d/D3dCtx.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/native/d3d/D3dCtx.cpp b/src/native/d3d/D3dCtx.cpp
index fa70e9f..572f2b0 100644
--- a/src/native/d3d/D3dCtx.cpp
+++ b/src/native/d3d/D3dCtx.cpp
@@ -470,7 +470,11 @@ BOOL D3dCtx::initialize(JNIEnv *env, jobject obj)
d3dPresent.BackBufferWidth,
d3dPresent.BackBufferHeight);
}
- return false;
+ //return false;
+ // Issue #578 fix on zero dimension window size
+ d3dPresent.BackBufferWidth = 1;
+ d3dPresent.BackBufferHeight = 1;
+ // end fix
}