From: <ma...@us...> - 2009-12-02 23:11:25
|
Revision: 3259 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3259&view=rev Author: matzon Date: 2009-12-02 23:11:14 +0000 (Wed, 02 Dec 2009) Log Message: ----------- call InitCommonControls if no display has been created prior to Alert Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c Modified: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2009-12-01 15:12:52 UTC (rev 3258) +++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2009-12-02 23:11:14 UTC (rev 3259) @@ -94,9 +94,13 @@ } public void alert(String title, String message) { + if(!Display.isCreated()) { + initCommonControls(); + } nAlert(getHwnd(), title, message); } private static native void nAlert(long parent_hwnd, String title, String message); + private static native void initCommonControls(); public boolean openURL(final String url) { try { Modified: trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2009-12-01 15:12:52 UTC (rev 3258) +++ trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2009-12-02 23:11:14 UTC (rev 3259) @@ -44,6 +44,7 @@ #include "org_lwjgl_WindowsSysImplementation.h" #include "common_tools.h" #include <malloc.h> +#include <commctrl.h> JNIEXPORT jlong JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetTime(JNIEnv * env, jclass unused) { DWORD time; @@ -67,6 +68,10 @@ free(cTitleBarText); } +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_initCommonControls(JNIEnv * env, jclass unused) { + InitCommonControls(); +} + JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetClipboard (JNIEnv * env, jclass unused) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |