mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:01:32 +01:00
fix
This commit is contained in:
parent
5713b06f6f
commit
f040ea4356
@ -14,7 +14,7 @@ const char *LOOKUP[] = {
|
||||
"not-allowed"
|
||||
};
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_io_github_solclient_client_util_cursors_X11SystemCursors_nGetDefaultCursorHandle(
|
||||
JNIEXPORT jlong JNICALL Java_net_silentclient_client_utils_cursors_X11SystemCursors_nGetDefaultCursorHandle(
|
||||
JNIEnv *env, jclass unused, jlong display, jbyte cursor) {
|
||||
if (cursor < 0 || cursor >= sizeof(LOOKUP) / sizeof(*LOOKUP))
|
||||
cursor = 0;
|
||||
|
@ -1,36 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <winuser.h>
|
||||
#include <jni.h>
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_io_github_solclient_client_util_cursors_Win32SystemCursors_nGetDefaultCursorHandle(
|
||||
JNIEnv *env, jclass unused, jbyte cursor) {
|
||||
switch (cursor) {
|
||||
case 0:
|
||||
default:
|
||||
return (jlong) LoadCursor(NULL, IDC_ARROW);
|
||||
case 1:
|
||||
return (jlong) LoadCursor(NULL, IDC_IBEAM);
|
||||
case 2:
|
||||
return (jlong) LoadCursor(NULL, IDC_CROSS);
|
||||
case 3:
|
||||
return (jlong) LoadCursor(NULL, IDC_HAND);
|
||||
case 4:
|
||||
return (jlong) LoadCursor(NULL, IDC_SIZEWE);
|
||||
case 5:
|
||||
return (jlong) LoadCursor(NULL, IDC_SIZENS);
|
||||
case 6:
|
||||
return (jlong) LoadCursor(NULL, IDC_SIZENWSE);
|
||||
case 7:
|
||||
return (jlong) LoadCursor(NULL, IDC_SIZENESW);
|
||||
case 8:
|
||||
return (jlong) LoadCursor(NULL, IDC_SIZEALL);
|
||||
case 9:
|
||||
return (jlong) LoadCursor(NULL, IDC_NO);
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_io_github_solclient_client_util_cursors_Win32SystemCursors_nSetCursor(
|
||||
JNIEnv *env, jclass unused, jlong hwnd, jlong cursor) {
|
||||
SetClassLongPtr((HWND) hwnd, GCLP_HCURSOR, NULL);
|
||||
SetCursor((HCURSOR) cursor);
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user