Skip to content

Commit

Permalink
Merge pull request #11 from jafkc2/dev
Browse files Browse the repository at this point in the history
Add virtual cursor mixin and make the virtual cursor move like the real cursor
  • Loading branch information
Luna0x01 authored Jan 14, 2025
2 parents 2d4c70c + 93d4300 commit 1bd2c5a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ public static void render() {
public void createMouse() {
this.windowHandle = Display.getHandle();

if (GLFW.glfwRawMouseMotionSupported() && !Mouse.getPrivilegedBoolean("org.lwjgl.input.Mouse.disableRawInput"))
GLFW.glfwSetInputMode(this.windowHandle, GLFW.GLFW_RAW_MOUSE_MOTION, GLFW.GLFW_TRUE);

this.buttonCallback = GLFWMouseButtonCallback.create((window, button, action, mods) -> {
byte state = action == GLFW.GLFW_PRESS ? (byte) 1 : (byte) 0;
putMouseEvent((byte) button, state, 0, System.nanoTime());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.vexor.radium.lwjgl3.mixin;
package dev.vexor.radium.mixin.core;

import dev.vexor.radium.lwjgl3.implementation.glfw.VirtualGLFWMouseImplementation;
import net.minecraft.client.MinecraftClient;
Expand Down
1 change: 1 addition & 0 deletions common/src/main/resources/radium.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"compatibilityLevel": "JAVA_17",
"client": [
"core.MixinFramebuffer",
"core.MixinMinecraftDrawVirtualCursor",
"core.MixinMinecraftFixEarlyCrashNoReports",
"core.MixinScreenFixClipboard",
"core.culling.BlockEntityRenderDispatcherMixin",
Expand Down

0 comments on commit 1bd2c5a

Please sign in to comment.