From: <eli...@us...> - 2006-07-22 21:31:04
|
Revision: 2535 Author: elias_naur Date: 2006-07-22 14:30:31 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2535&view=rev Log Message: ----------- Linux: Remove 32x32 icons size check, since other sizes seem to work alright. Document the fact that Display.setIcon use the icons from the icon array in order of decreasing preference Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2006-07-22 15:05:36 UTC (rev 2534) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2006-07-22 21:30:31 UTC (rev 2535) @@ -273,7 +273,7 @@ if(cached_icons != null) { setIcon(cached_icons); } else { - setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon16x16, LWJGLUtil.LWJGLIcon32x32 }); + setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon32x32, LWJGLUtil.LWJGLIcon16x16 }); } } @@ -879,7 +879,7 @@ * of recreating the icons when you go back and forth fullscreen mode. You therefore only need to * set the icon once per instance. * - * @param icons Array of icons in RGBA mode + * @param icons Array of icons in RGBA mode. Pass the icons in order of preference. * @return number of icons used, or 0 if display hasn't been created */ public static int setIcon(ByteBuffer[] icons) { Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-07-22 15:05:36 UTC (rev 2534) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-07-22 21:30:31 UTC (rev 2535) @@ -949,11 +949,9 @@ for (int i=0;i<icons.length;i++) { int size = icons[i].limit() / 4; int dimension = (int)Math.sqrt(size); - if (dimension == 32) { - ByteBuffer icon = convertIcon(icons[i], dimension, dimension); - nSetWindowIcon(icon, icon.capacity(), dimension, dimension); - return 1; - } + ByteBuffer icon = convertIcon(icons[i], dimension, dimension); + nSetWindowIcon(icon, icon.capacity(), dimension, dimension); + return 1; } return 0; } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |