Display.setIcon: Preserve icon buffer positions
This commit is contained in:
parent
32da20827a
commit
d3b13b23dd
|
@ -1020,7 +1020,9 @@ public final class Display {
|
|||
cached_icons = new ByteBuffer[icons.length];
|
||||
for(int i=0;i<icons.length; i++) {
|
||||
cached_icons[i] = BufferUtils.createByteBuffer(icons[i].capacity());
|
||||
int old_position = icons[i].position();
|
||||
cached_icons[i].put(icons[i]);
|
||||
icons[i].position(old_position);
|
||||
cached_icons[i].flip();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue