mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-07 17:14:06 +09:00
trying to debug why fullscreen is borked on macOS
This commit is contained in:
@@ -442,12 +442,12 @@ public class App implements ApplicationListener {
|
|||||||
|
|
||||||
if (useFullscreen) {
|
if (useFullscreen) {
|
||||||
// auto resize for fullscreen
|
// auto resize for fullscreen
|
||||||
var disp = Lwjgl3ApplicationConfiguration.getDisplayMode();
|
var disp = Lwjgl3ApplicationConfiguration.getDisplayMode(Lwjgl3ApplicationConfiguration.getPrimaryMonitor());
|
||||||
var newWidth = ((int)(disp.width / magn)) & 0x7FFFFFFE;
|
var newWidth = ((int)(disp.width / magn)) & 0x7FFFFFFE;
|
||||||
var newHeight = ((int)(disp.height / magn)) & 0x7FFFFFFE;
|
var newHeight = ((int)(disp.height / magn)) & 0x7FFFFFFE;
|
||||||
scr.setDimension(newWidth, newHeight, magn);
|
scr.setDimension(newWidth, newHeight, magn);
|
||||||
|
|
||||||
appConfig.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
|
appConfig.setFullscreenMode(disp);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import net.torvald.terrarum.CreditSingleton
|
|||||||
import net.torvald.terrarum.ceilToInt
|
import net.torvald.terrarum.ceilToInt
|
||||||
import net.torvald.terrarum.ui.*
|
import net.torvald.terrarum.ui.*
|
||||||
import java.util.TreeMap
|
import java.util.TreeMap
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
open class UITitleWallOfText(private val text: List<String>) : UICanvas() {
|
open class UITitleWallOfText(private val text: List<String>) : UICanvas() {
|
||||||
init {
|
init {
|
||||||
@@ -95,6 +96,7 @@ class UISystemInfo(val remoCon: UIRemoCon) : UICanvas() {
|
|||||||
v.add("Gdx" to com.badlogic.gdx.Version.VERSION)
|
v.add("Gdx" to com.badlogic.gdx.Version.VERSION)
|
||||||
v.add("LWJGL" to "${org.lwjgl.Version.VERSION_MAJOR}.${org.lwjgl.Version.VERSION_MINOR}.${org.lwjgl.Version.VERSION_REVISION}")
|
v.add("LWJGL" to "${org.lwjgl.Version.VERSION_MAJOR}.${org.lwjgl.Version.VERSION_MINOR}.${org.lwjgl.Version.VERSION_REVISION}")
|
||||||
v.add("OS" to "${App.OSName} ${App.OSVersion}")
|
v.add("OS" to "${App.OSName} ${App.OSVersion}")
|
||||||
|
v.add("Display" to "${App.scr.width}\u00D7${App.scr.height}@${App.scr.magn.times(100).roundToInt()}%")
|
||||||
v.add("Processor" to "${App.THREAD_COUNT}\u2009\u00D7\u2009${App.processor}")
|
v.add("Processor" to "${App.THREAD_COUNT}\u2009\u00D7\u2009${App.processor}")
|
||||||
v.add("Architecture" to App.systemArch)
|
v.add("Architecture" to App.systemArch)
|
||||||
v.add("CPUID" to App.processorVendor.let { if (it == "null" || it == null) "n/a" else it })
|
v.add("CPUID" to App.processorVendor.let { if (it == "null" || it == null) "n/a" else it })
|
||||||
|
|||||||
Reference in New Issue
Block a user