minecraft-src/com/mojang/blaze3d/platform/DisplayData.java
2025-07-04 03:45:38 +03:00

16 lines
633 B
Java

package com.mojang.blaze3d.platform;
import java.util.OptionalInt;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
@Environment(EnvType.CLIENT)
public record DisplayData(int width, int height, OptionalInt fullscreenWidth, OptionalInt fullscreenHeight, boolean isFullscreen) {
public DisplayData withSize(int width, int height) {
return new DisplayData(width, height, this.fullscreenWidth, this.fullscreenHeight, this.isFullscreen);
}
public DisplayData withFullscreen(boolean fullscreen) {
return new DisplayData(this.width, this.height, this.fullscreenWidth, this.fullscreenHeight, fullscreen);
}
}