mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:11:31 +01:00
(fix) bug report: 1182628175151370380
This commit is contained in:
parent
f040ea4356
commit
8ae19788e0
@ -0,0 +1,26 @@
|
|||||||
|
package net.silentclient.client.mixin.mixins.lwjgl;
|
||||||
|
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(targets = "org.lwjgl.opengl.WindowsDisplay")
|
||||||
|
public abstract class WindowsDisplayMixin {
|
||||||
|
@Inject(method = "doHandleMessage", at = @At("HEAD"), cancellable = true, remap = false)
|
||||||
|
private void doHandleMessage(long hwnd, int msg, long wParam, long lParam, long millis,
|
||||||
|
CallbackInfoReturnable<Long> callback) {
|
||||||
|
if (msg == 0x020B) {
|
||||||
|
if ((wParam >> 16) == 1L) {
|
||||||
|
handleMouseButton(3, 1, millis);
|
||||||
|
} else {
|
||||||
|
handleMouseButton(4, 1, millis);
|
||||||
|
}
|
||||||
|
callback.setReturnValue(1L);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
protected abstract void handleMouseButton(int button, int state, long millis);
|
||||||
|
}
|
@ -119,6 +119,7 @@
|
|||||||
"mixins.WorldClientMixin",
|
"mixins.WorldClientMixin",
|
||||||
"mixins.WorldInfoMixin",
|
"mixins.WorldInfoMixin",
|
||||||
"mixins.WorldMixin",
|
"mixins.WorldMixin",
|
||||||
"mixins.WorldRendererMixin"
|
"mixins.WorldRendererMixin",
|
||||||
|
"mixins.lwjgl.WindowsDisplayMixin"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user