fix build

This commit is contained in:
Bixilon 2022-11-14 13:33:56 +01:00
parent 8862e665cc
commit 451beb024b
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 8 additions and 7 deletions

View File

@ -19,7 +19,6 @@ import de.bixilon.minosoft.assets.AssetsManager
import de.bixilon.minosoft.config.profile.delegate.watcher.SimpleProfileDelegateWatcher.Companion.profileWatchRendering
import de.bixilon.minosoft.config.profile.profiles.rendering.RenderingProfile
import de.bixilon.minosoft.gui.rendering.RenderWindow
import de.bixilon.minosoft.gui.rendering.events.WindowCloseEvent
import de.bixilon.minosoft.terminal.RunConfiguration
import de.bixilon.minosoft.util.KUtil.toResourceLocation
import de.matthiasmann.twl.utils.PNGDecoder
@ -66,12 +65,7 @@ interface BaseWindow {
fun destroy()
fun close() {
if (fireGLFWEvent(WindowCloseEvent(renderWindow, window = this))) {
return
}
forceClose()
}
fun close()
fun forceClose()

View File

@ -247,6 +247,13 @@ class GLFWWindow(
glfwSetErrorCallback(null)?.free()
}
override fun close() {
if (fireGLFWEvent(WindowCloseEvent(renderWindow, window = this))) {
return
}
forceClose()
}
override fun forceClose() {
glfwSetWindowShouldClose(window, true)
}