diff --git a/src/net/torvald/terrarum/App.java b/src/net/torvald/terrarum/App.java index ea7f62391..eec97158f 100644 --- a/src/net/torvald/terrarum/App.java +++ b/src/net/torvald/terrarum/App.java @@ -430,6 +430,7 @@ public class App implements ApplicationListener { int width = scr.getWindowW(); int height = scr.getWindowH(); boolean useFullscreen = getConfigBoolean("fullscreen"); + float magn = (float) getConfigDouble("screenmagnifying"); Lwjgl3ApplicationConfiguration appConfig = new Lwjgl3ApplicationConfiguration(); //appConfig.useGL30 = false; // https://stackoverflow.com/questions/46753218/libgdx-should-i-use-gl30 @@ -441,16 +442,21 @@ public class App implements ApplicationListener { if (useFullscreen) { // auto resize for fullscreen var disp = Lwjgl3ApplicationConfiguration.getDisplayMode(); - float magn = (float) getConfigDouble("screenmagnifying"); var newWidth = ((int)(disp.width / magn)) & 0x7FFFFFFE; var newHeight = ((int)(disp.height / magn)) & 0x7FFFFFFE; scr.setDimension(newWidth, newHeight, magn); appConfig.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode()); + } else appConfig.setWindowedMode(width, height); + // if filter is none AND magn is not (100% or 200%), set filter to hq2x + if (getConfigString("screenmagnifyingfilter").equals("none") && magn != 1f && magn != 2f) { + setConfig("screenmagnifyingfilter", "hq2x"); + } + appConfig.setTransparentFramebuffer(false); int fpsActive = Math.min(GLOBAL_FRAMERATE_LIMIT, getConfigInt("displayfps")); if (fpsActive <= 0) fpsActive = GLOBAL_FRAMERATE_LIMIT; diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UISoundControlPanel.kt b/src/net/torvald/terrarum/modulebasegame/ui/UISoundControlPanel.kt index 225e2aaae..4c2b5ad8f 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UISoundControlPanel.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UISoundControlPanel.kt @@ -32,7 +32,6 @@ class UISoundControlPanel(remoCon: UIRemoCon?) : UICanvas() { arrayOf("", { Lang["MENU_LABEL_AUDIO_ENGINE"] }, "h1"), arrayOf("audio_speaker_setup", { Lang["MENU_OPTIONS_SPEAKER_SETUP"] }, "textsel,headphone=MENU_OPTIONS_SPEAKER_HEADPHONE,stereo=MENU_OPTIONS_SPEAKER_STEREO"), arrayOf("audio_buffer_size", { Lang["MENU_OPTIONS_AUDIO_BUFFER_SIZE"] }, "spinnersel,128,256,512,1024,2048"), -// arrayOf("", { "(${Lang["MENU_LABEL_RESTART_REQUIRED"]})" }, "p"), arrayOf("", { "${Lang["MENU_LABEL_AUDIO_BUFFER_INSTRUCTION"]}" }, "p"), ))