empty glfwDestroyCursor&glfwSetCursor
to make mods like owo to work
This commit is contained in:
parent
6ca914eaf4
commit
8e75b28c19
Binary file not shown.
|
@ -1 +1 @@
|
|||
1705144589360
|
||||
1705286740750
|
|
@ -465,53 +465,9 @@ GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape)
|
|||
return (GLFWcursor*) cursor;
|
||||
}
|
||||
|
||||
GLFWAPI void glfwDestroyCursor(GLFWcursor* handle)
|
||||
{
|
||||
_GLFWcursor* cursor = (_GLFWcursor*) handle;
|
||||
GLFWAPI void glfwDestroyCursor(GLFWcursor *handle) {}
|
||||
|
||||
_GLFW_REQUIRE_INIT();
|
||||
|
||||
if (cursor == NULL)
|
||||
return;
|
||||
|
||||
// Make sure the cursor is not being used by any window
|
||||
{
|
||||
_GLFWwindow* window;
|
||||
|
||||
for (window = _glfw.windowListHead; window; window = window->next)
|
||||
{
|
||||
if (window->cursor == cursor)
|
||||
glfwSetCursor((GLFWwindow*) window, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
_glfwPlatformDestroyCursor(cursor);
|
||||
|
||||
// Unlink cursor from global linked list
|
||||
{
|
||||
_GLFWcursor** prev = &_glfw.cursorListHead;
|
||||
|
||||
while (*prev != cursor)
|
||||
prev = &((*prev)->next);
|
||||
|
||||
*prev = cursor->next;
|
||||
}
|
||||
|
||||
free(cursor);
|
||||
}
|
||||
|
||||
GLFWAPI void glfwSetCursor(GLFWwindow* windowHandle, GLFWcursor* cursorHandle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) windowHandle;
|
||||
_GLFWcursor* cursor = (_GLFWcursor*) cursorHandle;
|
||||
assert(window != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT();
|
||||
|
||||
window->cursor = cursor;
|
||||
|
||||
_glfwPlatformSetCursor(window, cursor);
|
||||
}
|
||||
GLFWAPI void glfwSetCursor(GLFWwindow* windowHandle, GLFWcursor* cursorHandle){}
|
||||
|
||||
GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* handle, GLFWkeyfun cbfun)
|
||||
{
|
||||
|
|
|
@ -3955,13 +3955,7 @@ public class GLFW {
|
|||
*
|
||||
* @since version 3.1
|
||||
*/
|
||||
public static void glfwDestroyCursor(@NativeType("GLFWcursor *") long cursor) {
|
||||
long __functionAddress = Functions.DestroyCursor;
|
||||
if (CHECKS) {
|
||||
check(cursor);
|
||||
}
|
||||
invokePV(cursor, __functionAddress);
|
||||
}
|
||||
public static void glfwDestroyCursor(@NativeType("GLFWcursor *") long cursor) {}
|
||||
|
||||
// --- [ glfwSetCursor ] ---
|
||||
|
||||
|
@ -3978,13 +3972,7 @@ public class GLFW {
|
|||
*
|
||||
* @since version 3.1
|
||||
*/
|
||||
public static void glfwSetCursor(@NativeType("GLFWwindow *") long window, @NativeType("GLFWcursor *") long cursor) {
|
||||
long __functionAddress = Functions.SetCursor;
|
||||
if (CHECKS) {
|
||||
check(window);
|
||||
}
|
||||
invokePPV(window, cursor, __functionAddress);
|
||||
}
|
||||
public static void glfwSetCursor(@NativeType("GLFWwindow *") long window, @NativeType("GLFWcursor *") long cursor) {}
|
||||
|
||||
// --- [ glfwSetKeyCallback ] ---
|
||||
|
||||
|
|
Loading…
Reference in New Issue