mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 14:35:58 +00:00
Fixed mouse hot spot coordinate
This commit is contained in:
parent
43b2d67a71
commit
0fa67c9680
3 changed files with 9 additions and 7 deletions
|
|
@ -77,6 +77,7 @@ public class Cursor {
|
|||
if (!initialized) {
|
||||
initialize();
|
||||
}
|
||||
yHotspot = height - 1 - yHotspot;
|
||||
assert Mouse.isCreated();
|
||||
assert width*height*numImages <= images.remaining(): "width*height*numImages > images.remaining()";
|
||||
assert delays == null || numImages <= delays.remaining(): "delays != null && numImages > delays.remaining()";
|
||||
|
|
@ -84,7 +85,7 @@ public class Cursor {
|
|||
assert yHotspot < height && yHotspot >= 0: "yHotspot > height || yHotspot < 0";
|
||||
IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
flipImages(width, height, numImages, images, images_copy);
|
||||
nativeHandle = nCreateCursor(width, height, xHotspot, height - yHotspot, numImages, images_copy, 0, delays, delays != null ? delays.position() : 0);
|
||||
nativeHandle = nCreateCursor(width, height, xHotspot, yHotspot, numImages, images_copy, 0, delays, delays != null ? delays.position() : 0);
|
||||
}
|
||||
|
||||
private static void initialize() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue