equal
deleted
inserted
replaced
31 #include "awt_Toolkit.h" |
31 #include "awt_Toolkit.h" |
32 #include "awt_Window.h" |
32 #include "awt_Window.h" |
33 #include "awt_BitmapUtil.h" |
33 #include "awt_BitmapUtil.h" |
34 #include "D3DRenderQueue.h" |
34 #include "D3DRenderQueue.h" |
35 |
35 |
|
36 |
36 // REMIND: move to awt_Component.h |
37 // REMIND: move to awt_Component.h |
37 extern "C" HWND AwtComponent_GetHWnd(JNIEnv *env, jlong pData); |
38 extern "C" HWND AwtComponent_GetHWnd(JNIEnv *env, jlong pData); |
|
39 |
|
40 /* This looks weird. but since some AWT headers need to be included, |
|
41 * we end up with AWT's alloc.h macro definition of ExceptionOccurred. |
|
42 * The reasons for that re-defintion do not apply to this code, so undef it. |
|
43 */ |
|
44 #undef ExceptionOccurred |
38 |
45 |
39 /** |
46 /** |
40 * Initializes nativeWidth/Height fields of the SurfaceData object with |
47 * Initializes nativeWidth/Height fields of the SurfaceData object with |
41 * dimensions on the native surface. |
48 * dimensions on the native surface. |
42 */ |
49 */ |
53 width = d3dsdo->width; |
60 width = d3dsdo->width; |
54 height = d3dsdo->height; |
61 height = d3dsdo->height; |
55 } |
62 } |
56 |
63 |
57 JNU_SetFieldByName(env, NULL, sdObject, "nativeWidth", "I", width); |
64 JNU_SetFieldByName(env, NULL, sdObject, "nativeWidth", "I", width); |
58 JNU_SetFieldByName(env, NULL, sdObject, "nativeHeight", "I", height); |
65 if (!(env->ExceptionOccurred())) { |
|
66 JNU_SetFieldByName(env, NULL, sdObject, "nativeHeight", "I", height); |
|
67 } |
59 |
68 |
60 env->DeleteLocalRef(sdObject); |
69 env->DeleteLocalRef(sdObject); |
61 } |
70 } |
62 |
71 |
63 void D3DSD_Flush(void *pData) |
72 void D3DSD_Flush(void *pData) |