diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java | 2 | ||||
-rwxr-xr-x | src/native/jogl/WindowsWindow.c | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java index be594ce46..2a8b8fbae 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java @@ -197,7 +197,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { EGL.EGL_RED_SIZE, caps.getRedBits(), EGL.EGL_GREEN_SIZE, caps.getGreenBits(), EGL.EGL_BLUE_SIZE, caps.getBlueBits(), - EGL.EGL_ALPHA_SIZE, caps.getAlphaBits(), + EGL.EGL_ALPHA_SIZE, (caps.getAlphaBits() > 0 ? caps.getAlphaBits() : EGL.EGL_DONT_CARE), EGL.EGL_STENCIL_SIZE, (caps.getStencilBits() > 0 ? caps.getStencilBits() : EGL.EGL_DONT_CARE), EGL.EGL_NONE, EGL.EGL_NONE, EGL.EGL_NONE diff --git a/src/native/jogl/WindowsWindow.c b/src/native/jogl/WindowsWindow.c index 157615950..151666ab3 100755 --- a/src/native/jogl/WindowsWindow.c +++ b/src/native/jogl/WindowsWindow.c @@ -33,9 +33,13 @@ #include <windows.h> #include <stdlib.h> +#ifdef UNDER_CE +#include "aygshell.h" +#endif -/* This typedef is apparently needed for Microsoft compilers before VC8 */ -#if _MSC_VER < 1400 +/* This typedef is apparently needed for Microsoft compilers before VC8, + and on Windows CE */ +#if (_MSC_VER < 1400) || defined(UNDER_CE) #ifdef _WIN64 typedef long long intptr_t; #else @@ -72,7 +76,11 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, int useDefWindowProc = 0; jobject window = NULL; +#ifdef UNDER_CE + window = (jobject) GetWindowLong(wnd, GWL_USERDATA); +#else window = (jobject) GetWindowLongPtr(wnd, GWLP_USERDATA); +#endif if (window == NULL || env == NULL) { // Shouldn't happen return DefWindowProc(wnd, message, wParam, lParam); @@ -212,7 +220,11 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_windows_WindowsWindow_CreateWin (HINSTANCE) hInstance, NULL); if (window != NULL) { +#ifdef UNDER_CE + SetWindowLong(window, GWL_USERDATA, (intptr_t) (*env)->NewGlobalRef(env, obj)); +#else SetWindowLongPtr(window, GWLP_USERDATA, (intptr_t) (*env)->NewGlobalRef(env, obj)); +#endif ShowWindow(window, SW_SHOWNORMAL); } return (jlong) (intptr_t) window; |