From 981c21e3ce7b3638889e9a9635d226bb965ade3c Mon Sep 17 00:00:00 2001 From: deechael Date: Sat, 12 Oct 2024 12:42:20 +0800 Subject: [PATCH] chore: small changes --- .../fabric/mixin/SodiumVideoOptionsScreenMixin.java | 1 - .../deechael/concentration/fabric/mixin/WindowMixin.java | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fabric/src/main/java/net/deechael/concentration/fabric/mixin/SodiumVideoOptionsScreenMixin.java b/fabric/src/main/java/net/deechael/concentration/fabric/mixin/SodiumVideoOptionsScreenMixin.java index e3b54cc..9e27a23 100644 --- a/fabric/src/main/java/net/deechael/concentration/fabric/mixin/SodiumVideoOptionsScreenMixin.java +++ b/fabric/src/main/java/net/deechael/concentration/fabric/mixin/SodiumVideoOptionsScreenMixin.java @@ -56,7 +56,6 @@ public class SodiumVideoOptionsScreenMixin { ConcentrationConfigFabric.getInstance().fullscreen = value; ConcentrationConfigFabric.getInstance().save(); if (options.fullscreen().get()) { - // If fullscreen turns on, re-toggle to changing the fullscreen mode instantly Concentration.toggleFullScreenMode(options, true); } }, diff --git a/fabric/src/main/java/net/deechael/concentration/fabric/mixin/WindowMixin.java b/fabric/src/main/java/net/deechael/concentration/fabric/mixin/WindowMixin.java index b519c1b..a2ba428 100644 --- a/fabric/src/main/java/net/deechael/concentration/fabric/mixin/WindowMixin.java +++ b/fabric/src/main/java/net/deechael/concentration/fabric/mixin/WindowMixin.java @@ -51,6 +51,10 @@ public abstract class WindowMixin { @Shadow public abstract boolean isFullscreen(); + @Shadow public abstract int getScreenWidth(); + + @Shadow public abstract int getScreenHeight(); + @Inject(method = "onMove", at = @At("HEAD")) private void inject$onMove$head(long window, int x, int y, CallbackInfo ci) { if (!this.fullscreen) { @@ -134,8 +138,8 @@ public abstract class WindowMixin { } else { finalX = monitorInstance.getX(); finalY = monitorInstance.getY() - 1; - finalWidth = width; - finalHeight = height + 1; + finalWidth = ignored$width; + finalHeight = ignored$height + 1; } }