From 91c32952b599b2dd884f26e85fd3f5210302f09d Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Sat, 16 Apr 2011 21:13:27 +0000 Subject: [PATCH] fixing icons as per dr_evil [http://lwjgl.org/forum/index.php/topic,3925.0.html] [proper] --- src/java/org/lwjgl/opengl/WindowsDisplay.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/java/org/lwjgl/opengl/WindowsDisplay.java b/src/java/org/lwjgl/opengl/WindowsDisplay.java index 20d0aa4d..560b2c9c 100644 --- a/src/java/org/lwjgl/opengl/WindowsDisplay.java +++ b/src/java/org/lwjgl/opengl/WindowsDisplay.java @@ -668,16 +668,18 @@ final class WindowsDisplay implements DisplayImplementation { int size = icon.limit() / 4; if ( (((int)Math.sqrt(size)) == small_icon_size) && (!done_small) ) { - small_icon = createIcon(small_icon_size, small_icon_size, icon.asIntBuffer()); - sendMessage(hwnd, WM_SETICON, ICON_SMALL, small_icon); + long small_new_icon = createIcon(small_icon_size, small_icon_size, icon.asIntBuffer()); + sendMessage(hwnd, WM_SETICON, ICON_SMALL, small_new_icon); freeSmallIcon(); + small_icon = small_new_icon; used++; done_small = true; } if ( (((int)Math.sqrt(size)) == large_icon_size) && (!done_large) ) { - large_icon = createIcon(large_icon_size, large_icon_size, icon.asIntBuffer()); - sendMessage(hwnd, WM_SETICON, ICON_BIG, large_icon); + long large_new_icon = createIcon(large_icon_size, large_icon_size, icon.asIntBuffer()); + sendMessage(hwnd, WM_SETICON, ICON_BIG, large_new_icon); freeLargeIcon(); + large_icon = large_new_icon; used++; done_large = true; }