From 12c23dfcdcfc93589a18246c74a080d2681c8616 Mon Sep 17 00:00:00 2001 From: Alessandro Borges Date: Fri, 4 Apr 2008 14:46:08 +0000 Subject: 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 --- src/native/d3d/D3dCtx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3