empty glfwDestroyCursor&glfwSetCursor

to make mods like owo to work
This commit is contained in:
ShirosakiMio 2024-01-15 10:49:09 +08:00
parent 6ca914eaf4
commit 8e75b28c19
4 changed files with 5 additions and 61 deletions

View File

@ -1 +1 @@
1705144589360
1705286740750

View File

@ -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)
{

View File

@ -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 ] ---