mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 02:45:13 -04:00
rendering: show version in window title
This commit is contained in:
parent
7edef26e51
commit
e5a362e718
@ -18,7 +18,7 @@ import de.bixilon.kutil.concurrent.queue.Queue
|
||||
import de.bixilon.kutil.latch.CountUpAndDownLatch
|
||||
import de.bixilon.kutil.math.simple.DoubleMath.rounded10
|
||||
import de.bixilon.kutil.primitive.BooleanUtil.decide
|
||||
import de.bixilon.kutil.time.TimeUtil
|
||||
import de.bixilon.kutil.time.TimeUtil.millis
|
||||
import de.bixilon.kutil.watcher.DataWatcher.Companion.observe
|
||||
import de.bixilon.minosoft.config.profile.delegate.watcher.SimpleProfileDelegateWatcher.Companion.profileWatch
|
||||
import de.bixilon.minosoft.gui.rendering.camera.Camera
|
||||
@ -46,6 +46,7 @@ import de.bixilon.minosoft.modding.event.invoker.CallbackEventInvoker
|
||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnectionStates
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
||||
import de.bixilon.minosoft.terminal.RunConfiguration
|
||||
import de.bixilon.minosoft.util.Stopwatch
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
import de.bixilon.minosoft.util.logging.LogLevels
|
||||
@ -91,7 +92,7 @@ class RenderWindow(
|
||||
private val latch = CountUpAndDownLatch(1)
|
||||
|
||||
var tickCount = 0L
|
||||
var lastTickTimer = TimeUtil.millis
|
||||
var lastTickTimer = millis()
|
||||
|
||||
private var slowRendering = profile.performance.slowRendering
|
||||
|
||||
@ -251,7 +252,7 @@ class RenderWindow(
|
||||
|
||||
lightMap.update()
|
||||
|
||||
val currentTickTime = TimeUtil.millis
|
||||
val currentTickTime = millis()
|
||||
if (currentTickTime - this.lastTickTimer > ProtocolDefinition.TICK_TIME) {
|
||||
tickCount++
|
||||
// inputHandler.currentKeyConsumer?.tick(tickCount)
|
||||
@ -294,7 +295,7 @@ class RenderWindow(
|
||||
}
|
||||
|
||||
if (RenderConstants.SHOW_FPS_IN_WINDOW_TITLE) {
|
||||
window.title = "Minosoft | FPS: ${renderStats.smoothAvgFPS.rounded10}"
|
||||
window.title = "Minosoft ${RunConfiguration.VERSION_STRING} | FPS: ${renderStats.smoothAvgFPS.rounded10}"
|
||||
}
|
||||
renderStats.endFrame()
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ import de.bixilon.minosoft.gui.rendering.system.window.BaseWindow.Companion.DEFA
|
||||
import de.bixilon.minosoft.gui.rendering.system.window.BaseWindow.Companion.DEFAULT_WINDOW_SIZE
|
||||
import de.bixilon.minosoft.gui.rendering.util.vec.vec2.Vec2dUtil.EMPTY
|
||||
import de.bixilon.minosoft.modding.event.master.AbstractEventMaster
|
||||
import de.bixilon.minosoft.terminal.RunConfiguration
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
import de.bixilon.minosoft.util.logging.LogLevels
|
||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
@ -182,7 +183,7 @@ class GLFWWindow(
|
||||
glfwWindowHint(GLFW_VISIBLE, false.glfw)
|
||||
|
||||
|
||||
window = glfwCreateWindow(size.x, size.y, "Minosoft", MemoryUtil.NULL, MemoryUtil.NULL)
|
||||
window = glfwCreateWindow(size.x, size.y, "Minosoft ${RunConfiguration.VERSION_STRING}", MemoryUtil.NULL, MemoryUtil.NULL)
|
||||
if (window == MemoryUtil.NULL) {
|
||||
try {
|
||||
destroy()
|
||||
|
Loading…
x
Reference in New Issue
Block a user