just disabling fullscreen on macos for now

This commit is contained in:
minjaesong
2024-06-19 12:37:27 +09:00
parent a4629c3ea8
commit 417f00117e
2 changed files with 25 additions and 4 deletions

View File

@@ -491,13 +491,13 @@ public class App implements ApplicationListener {
@Override
public void create() {
boolean useFullscreen = getConfigBoolean("fullscreen");
boolean useFullscreen = !Objects.equals(operationSystem, "OSX") && getConfigBoolean("fullscreen");
float magn = (float) getConfigDouble("screenmagnifying");
if (useFullscreen) {
// auto resize for fullscreen
var disp = Gdx.graphics.getDisplayMode();
// var disp = Lwjgl3ApplicationConfiguration.getDisplayMode(Lwjgl3ApplicationConfiguration.getPrimaryMonitor()); // won't work on macOS (reports 1920x1200 no matter what)
var disp = Gdx.graphics.getDisplayMode(); // macOS still reports 1920x1200 *facepalm*
var newWidth = ((int)(disp.width / magn)) & 0x7FFFFFFE;
var newHeight = ((int)(disp.height / magn)) & 0x7FFFFFFE;
scr.setDimension(newWidth, newHeight, magn);

View File

@@ -25,7 +25,27 @@ class UIGraphicsControlPanel(remoCon: UIRemoCon?) : UICanvas() {
init {
handler.allowESCtoClose = false
ControlPanelCommon.register(this, width, "basegame.graphicscontrolpanel", arrayOf(
if (App.operationSystem == "OSX") {
ControlPanelCommon.register(this, width, "basegame.graphicscontrolpanel", arrayOf(
arrayOf("", { Lang["CREDITS_VFX", true] }, "h1"),
arrayOf("fx_dither", { Lang["MENU_OPTIONS_DITHER", true] }, "toggle"),
arrayOf("fx_backgroundblur", { Lang["MENU_OPTIONS_BLUR", true] }, "toggle"),
arrayOf("maxparticles", { Lang["MENU_OPTIONS_PARTICLES", true] }, "spinner,256,1024,256"),
arrayOf("lightpasses", { Lang["MENU_OPTIONS_LIGHT_UPDATE_PASSES", true] }, "spinner,2,4,1"),
arrayOf("", { Lang["MENU_OPTIONS_DISPLAY", true] }, "h1"),
arrayOf("", { "(${Lang["MENU_LABEL_RESTART_REQUIRED"]})" }, "p"),
arrayOf("displayfps", { Lang["MENU_LABEL_FRAMESPERSEC", true] }, "spinner,0,300,2"),
arrayOf("usevsync", { Lang["MENU_OPTIONS_VSYNC", true] }, "toggle"),
arrayOf("screenwidth,screenheight", { Lang["MENU_OPTIONS_RESOLUTION", true] }, "typeinres"),
/* begone, fullscreen toggle for macOS! For thou constantly lieth on your size! */
arrayOf("screenmagnifying", { Lang["GAME_ACTION_ZOOM", true] }, "spinnerd,1.0,2.0,0.05"),
arrayOf("screenmagnifyingfilter", { Lang["MENU_OPTIONS_FILTERING_MODE", true] }, "textsel,none=MENU_OPTIONS_NONE,bilinear=MENU_OPTIONS_FILTERING_BILINEAR,hq2x=MENU_OPTIONS_FILTERING_HQ2X_DNT"),
arrayOf("", { Lang["MENU_LABEL_STREAMING", true] }, "h1"),
arrayOf("fx_streamerslayout", { Lang["MENU_OPTIONS_STREAMERS_LAYOUT", true] }, "toggle"),
))
}
else {
ControlPanelCommon.register(this, width, "basegame.graphicscontrolpanel", arrayOf(
arrayOf("", { Lang["CREDITS_VFX", true] }, "h1"),
arrayOf("fx_dither", { Lang["MENU_OPTIONS_DITHER", true] }, "toggle"),
arrayOf("fx_backgroundblur", { Lang["MENU_OPTIONS_BLUR", true] }, "toggle"),
@@ -41,7 +61,8 @@ class UIGraphicsControlPanel(remoCon: UIRemoCon?) : UICanvas() {
arrayOf("screenmagnifyingfilter", { Lang["MENU_OPTIONS_FILTERING_MODE", true] }, "textsel,none=MENU_OPTIONS_NONE,bilinear=MENU_OPTIONS_FILTERING_BILINEAR,hq2x=MENU_OPTIONS_FILTERING_HQ2X_DNT"),
arrayOf("", { Lang["MENU_LABEL_STREAMING", true] }, "h1"),
arrayOf("fx_streamerslayout", { Lang["MENU_OPTIONS_STREAMERS_LAYOUT", true] }, "toggle"),
))
))
}
}
override var height = ControlPanelCommon.getMenuHeight("basegame.graphicscontrolpanel")