diff options
Diffstat (limited to 'src/native')
-rw-r--r-- | src/native/d3d/NativeConfigTemplate3D.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/native/d3d/NativeConfigTemplate3D.cpp b/src/native/d3d/NativeConfigTemplate3D.cpp index 5f7e236..a5e065a 100644 --- a/src/native/d3d/NativeConfigTemplate3D.cpp +++ b/src/native/d3d/NativeConfigTemplate3D.cpp @@ -129,9 +129,10 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( // first 0-7bits for depth,8-15 Stencil retValue = deviceInfo->maxZBufferDepthSize |(deviceInfo->maxStencilDepthSize <<8); - // set value for Canvas3D GraphicsConfigInfo - jlong *pfi_ptr = (jlong *) env->GetPrimitiveArrayCritical(offScreenPFArray, NULL); - pfi_ptr[0] = retValue; + // set value for Canvas3D GraphicsConfigInfo + jlong *pfi_ptr = (jlong *) env->GetLongArrayElements(offScreenPFArray, NULL); + pfi_ptr[0] = retValue; + env->ReleaseLongArrayElements(offScreenPFArray, pfi_ptr, 0); } } } |