Fixed linux native cursor hotspot
This commit is contained in:
parent
eed273405e
commit
abf0de6233
|
@ -67,7 +67,8 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_input_Cursor_nCreateCursor
|
||||||
for (int i = 0; i < num_images; i++) {
|
for (int i = 0; i < num_images; i++) {
|
||||||
XcursorImage *cursor_image = XcursorImageCreate(width, height);
|
XcursorImage *cursor_image = XcursorImageCreate(width, height);
|
||||||
cursor_image->xhot = x_hotspot;
|
cursor_image->xhot = x_hotspot;
|
||||||
cursor_image->yhot = y_hotspot;
|
// Of some reason, the y hotspot coordinate is offset by 1
|
||||||
|
cursor_image->yhot = y_hotspot + 1;
|
||||||
cursor_image->pixels = &(pixels[stride*i]);
|
cursor_image->pixels = &(pixels[stride*i]);
|
||||||
if (num_images > 1)
|
if (num_images > 1)
|
||||||
cursor_image->delay = delays[i];
|
cursor_image->delay = delays[i];
|
||||||
|
|
Loading…
Reference in New Issue