mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
rendering: don't warn about window icon on macos
This commit is contained in:
parent
843b29ab9a
commit
660ed439ba
@ -18,7 +18,7 @@ import de.bixilon.kotlinglm.vec2.Vec2i
|
|||||||
import de.bixilon.minosoft.assets.AssetsManager
|
import de.bixilon.minosoft.assets.AssetsManager
|
||||||
import de.bixilon.minosoft.config.profile.profiles.rendering.RenderingProfile
|
import de.bixilon.minosoft.config.profile.profiles.rendering.RenderingProfile
|
||||||
import de.bixilon.minosoft.terminal.RunConfiguration
|
import de.bixilon.minosoft.terminal.RunConfiguration
|
||||||
import de.bixilon.minosoft.util.KUtil.toResourceLocation
|
import de.bixilon.minosoft.util.DesktopUtil
|
||||||
import de.bixilon.minosoft.util.delegate.RenderingDelegate.observeRendering
|
import de.bixilon.minosoft.util.delegate.RenderingDelegate.observeRendering
|
||||||
import de.matthiasmann.twl.utils.PNGDecoder
|
import de.matthiasmann.twl.utils.PNGDecoder
|
||||||
import org.lwjgl.BufferUtils
|
import org.lwjgl.BufferUtils
|
||||||
@ -81,7 +81,7 @@ interface BaseWindow {
|
|||||||
|
|
||||||
|
|
||||||
fun setDefaultIcon(assetsManager: AssetsManager) {
|
fun setDefaultIcon(assetsManager: AssetsManager) {
|
||||||
val decoder = PNGDecoder(assetsManager["minosoft:textures/icons/window_icon.png".toResourceLocation()])
|
val decoder = PNGDecoder(assetsManager[DesktopUtil.ICON])
|
||||||
val data = BufferUtils.createByteBuffer(decoder.width * decoder.height * PNGDecoder.Format.RGBA.numComponents)
|
val data = BufferUtils.createByteBuffer(decoder.width * decoder.height * PNGDecoder.Format.RGBA.numComponents)
|
||||||
decoder.decode(data, decoder.width * PNGDecoder.Format.RGBA.numComponents, PNGDecoder.Format.RGBA)
|
decoder.decode(data, decoder.width * PNGDecoder.Format.RGBA.numComponents, PNGDecoder.Format.RGBA)
|
||||||
data.flip()
|
data.flip()
|
||||||
|
@ -411,8 +411,7 @@ class GLFWWindow(
|
|||||||
|
|
||||||
override fun setIcon(size: Vec2i, buffer: ByteBuffer) {
|
override fun setIcon(size: Vec2i, buffer: ByteBuffer) {
|
||||||
if (PlatformInfo.OS == OSTypes.MAC) {
|
if (PlatformInfo.OS == OSTypes.MAC) {
|
||||||
Log.log(LogMessageType.RENDERING_GENERAL, LogLevels.WARN) { "Can not set window icon on mac os!" } // ToDo
|
return // the window icon can just be set with the TaskBar api. See DesktopUtil for more information
|
||||||
return
|
|
||||||
}
|
}
|
||||||
val images = GLFWImage.malloc(1)
|
val images = GLFWImage.malloc(1)
|
||||||
val image = GLFWImage.malloc()
|
val image = GLFWImage.malloc()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user