diff --git a/src/java/org/lwjgl/opengl/WindowsDisplay.java b/src/java/org/lwjgl/opengl/WindowsDisplay.java index 29b4a330..964c1f56 100644 --- a/src/java/org/lwjgl/opengl/WindowsDisplay.java +++ b/src/java/org/lwjgl/opengl/WindowsDisplay.java @@ -550,31 +550,33 @@ final class WindowsDisplay implements DisplayImplementation { * @return number of icons used. */ public int setIcon(ByteBuffer[] icons) { - boolean done16 = false; - boolean done32 = false; + boolean done_small = false; + boolean done_large = false; int used = 0; + int small_icon_size = 16; + int large_icon_size = 32; for (int i=0;iGetDirectBufferAddress(env, iconBuffer); freeSmallIcon(); - small_icon = createWindowIcon(env, imgData, 16, 16); + small_icon = createWindowIcon(env, imgData, width, height); if (small_icon != NULL) { if (display_hwnd != NULL) { SendMessage(display_hwnd, WM_SETICON, ICON_SMALL, (LPARAM) (small_icon)); @@ -480,13 +480,13 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetWindowIcon16 return -1; } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetWindowIcon32 - (JNIEnv *env, jclass clazz, jobject iconBuffer) +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetWindowIconLarge + (JNIEnv *env, jclass clazz, jint width, jint height, jobject iconBuffer) { jint *imgData = (jint *)(*env)->GetDirectBufferAddress(env, iconBuffer); freeLargeIcon(); - large_icon = createWindowIcon(env, imgData, 32, 32); + large_icon = createWindowIcon(env, imgData, width, height); if (large_icon != NULL) { if (display_hwnd != NULL) { SendMessage(display_hwnd, WM_SETICON, ICON_BIG, (LPARAM) (large_icon));