chore: small changes
This commit is contained in:
parent
f868af2020
commit
981c21e3ce
@ -56,7 +56,6 @@ public class SodiumVideoOptionsScreenMixin {
|
|||||||
ConcentrationConfigFabric.getInstance().fullscreen = value;
|
ConcentrationConfigFabric.getInstance().fullscreen = value;
|
||||||
ConcentrationConfigFabric.getInstance().save();
|
ConcentrationConfigFabric.getInstance().save();
|
||||||
if (options.fullscreen().get()) {
|
if (options.fullscreen().get()) {
|
||||||
// If fullscreen turns on, re-toggle to changing the fullscreen mode instantly
|
|
||||||
Concentration.toggleFullScreenMode(options, true);
|
Concentration.toggleFullScreenMode(options, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -51,6 +51,10 @@ public abstract class WindowMixin {
|
|||||||
@Shadow
|
@Shadow
|
||||||
public abstract boolean isFullscreen();
|
public abstract boolean isFullscreen();
|
||||||
|
|
||||||
|
@Shadow public abstract int getScreenWidth();
|
||||||
|
|
||||||
|
@Shadow public abstract int getScreenHeight();
|
||||||
|
|
||||||
@Inject(method = "onMove", at = @At("HEAD"))
|
@Inject(method = "onMove", at = @At("HEAD"))
|
||||||
private void inject$onMove$head(long window, int x, int y, CallbackInfo ci) {
|
private void inject$onMove$head(long window, int x, int y, CallbackInfo ci) {
|
||||||
if (!this.fullscreen) {
|
if (!this.fullscreen) {
|
||||||
@ -134,8 +138,8 @@ public abstract class WindowMixin {
|
|||||||
} else {
|
} else {
|
||||||
finalX = monitorInstance.getX();
|
finalX = monitorInstance.getX();
|
||||||
finalY = monitorInstance.getY() - 1;
|
finalY = monitorInstance.getY() - 1;
|
||||||
finalWidth = width;
|
finalWidth = ignored$width;
|
||||||
finalHeight = height + 1;
|
finalHeight = ignored$height + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user