Closed Pietr06 closed 1 year ago
@ModifyVariable(method = "onFramebufferSizeChanged", at=@At("HEAD"), ordinal = 1)
private int tweakfork$offsetWithAspectRatio(int height2) {
this.yOffset = RenderTweaks.getHeightOffsetWithAspectRatio(this.targetAspectRatio, this.framebufferWidth, height2);
this.originalFramebufferHeight = height2;
return height2 - yOffset;
}
this should work right?
private void onFramebufferSizeChanged(long window, int width, int height) {
height = this.localvar$zei000$tweakeroo$tweakfork$offsetWithAspectRatio(height);
if (window == this.handle) {
int i = this.getFramebufferWidth();
int j = this.getFramebufferHeight();
if (width != 0 && height != 0) {
this.framebufferWidth = width;
this.framebufferHeight = height;
if (this.getFramebufferWidth() != i || this.getFramebufferHeight() != j) {
this.eventHandler.onResolutionChanged();
}
}
}
}
private int localvar$zei000$tweakeroo$tweakfork$offsetWithAspectRatio(int height2) {
this.yOffset = RenderTweaks.getHeightOffsetWithAspectRatio(this.targetAspectRatio, this.framebufferWidth, height2);
this.originalFramebufferHeight = height2;
return height2 - this.yOffset;
}
mixin out ^
crash-2023-10-04_21.43.15-client.txt
https://github.com/Andrews54757/tweakfork/blob/fabric_1.20.x/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinWindow.java#L51-L67