mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -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.config.profile.profiles.rendering.RenderingProfile
|
||||
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.matthiasmann.twl.utils.PNGDecoder
|
||||
import org.lwjgl.BufferUtils
|
||||
@ -81,7 +81,7 @@ interface BaseWindow {
|
||||
|
||||
|
||||
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)
|
||||
decoder.decode(data, decoder.width * PNGDecoder.Format.RGBA.numComponents, PNGDecoder.Format.RGBA)
|
||||
data.flip()
|
||||
|
@ -411,8 +411,7 @@ class GLFWWindow(
|
||||
|
||||
override fun setIcon(size: Vec2i, buffer: ByteBuffer) {
|
||||
if (PlatformInfo.OS == OSTypes.MAC) {
|
||||
Log.log(LogMessageType.RENDERING_GENERAL, LogLevels.WARN) { "Can not set window icon on mac os!" } // ToDo
|
||||
return
|
||||
return // the window icon can just be set with the TaskBar api. See DesktopUtil for more information
|
||||
}
|
||||
val images = GLFWImage.malloc(1)
|
||||
val image = GLFWImage.malloc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user