|
From: Elias N. <eli...@us...> - 2004-07-07 10:31:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1396/src/native/linux Modified Files: org_lwjgl_input_Cursor.cpp Log Message: Fixed linux native cursor hotspot Index: org_lwjgl_input_Cursor.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Cursor.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- org_lwjgl_input_Cursor.cpp 12 Jun 2004 20:28:32 -0000 1.12 +++ org_lwjgl_input_Cursor.cpp 7 Jul 2004 10:31:26 -0000 1.13 @@ -55,7 +55,7 @@ Display *disp = incDisplay(env); if (disp == NULL) return 0; - const int *delays = NULL; + const int *delays = NULL; if (delay_buffer != NULL) delays = (const int *)env->GetDirectBufferAddress(delay_buffer) + delays_offset; XcursorPixel *pixels = (XcursorPixel *)env->GetDirectBufferAddress(image_buffer) + images_offset; @@ -67,7 +67,8 @@ for (int i = 0; i < num_images; i++) { XcursorImage *cursor_image = XcursorImageCreate(width, height); 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]); if (num_images > 1) cursor_image->delay = delays[i]; |