-
Notifications
You must be signed in to change notification settings - Fork 0
/
WindowMixin.java
26 lines (24 loc) · 941 Bytes
/
WindowMixin.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package dev.pious.earlywindowcreation.mixin;
import dev.pious.earlywindowcreation.EarlyWindowCreation;
import net.minecraft.client.util.Window;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Window.class)
public class WindowMixin {
// Workaround for Resolution Control+
// @Inject(method = "onFramebufferSizeChanged", at = @At("HEAD"), cancellable = true)
// private void onFramebufferSizeChanged(CallbackInfo ci) {
// if (!EarlyWindowCreation.handedOver) {
// ci.cancel();
// }
// }
//
// @Inject(method = "updateFramebufferSize", at = @At("HEAD"), cancellable = true)
// private void onUpdateFramebufferSize(CallbackInfo ci) {
// if (!EarlyWindowCreation.handedOver) {
// ci.cancel();
// }
// }
}