[turbine] Disable useless window icon on Mac, it causes GLFW warning
All checks were successful
Build / build (push) Successful in 1m16s
All checks were successful
Build / build (push) Successful in 1m16s
This commit is contained in:
parent
8f03af99a7
commit
5169a607cf
@ -247,18 +247,20 @@ static ox::Result<IconData> toGlfwImgPixels(ox::SpanView<uint8_t> const &iconPng
|
|||||||
}
|
}
|
||||||
|
|
||||||
ox::Error setWindowIcon(Context &ctx, ox::SpanView<ox::SpanView<uint8_t>> const &iconPngs) noexcept {
|
ox::Error setWindowIcon(Context &ctx, ox::SpanView<ox::SpanView<uint8_t>> const &iconPngs) noexcept {
|
||||||
ox::Vector<IconData, 8> src;
|
if constexpr(ox::defines::OS != ox::OS::Darwin) {
|
||||||
ox::Vector<GLFWimage, 8> imgs;
|
ox::Vector<IconData, 8> src;
|
||||||
for (auto const &iconPng : iconPngs) {
|
ox::Vector<GLFWimage, 8> imgs;
|
||||||
OX_RETURN_ERROR(toGlfwImgPixels(iconPng).moveTo(src.emplace_back()));
|
for (auto const &iconPng : iconPngs) {
|
||||||
auto &icon = *src.back().unwrap();
|
OX_RETURN_ERROR(toGlfwImgPixels(iconPng).moveTo(src.emplace_back()));
|
||||||
imgs.emplace_back(GLFWimage{
|
auto &icon = *src.back().unwrap();
|
||||||
.width = icon.w,
|
imgs.emplace_back(GLFWimage{
|
||||||
.height = icon.h,
|
.width = icon.w,
|
||||||
.pixels = icon.pixels.data(),
|
.height = icon.h,
|
||||||
});
|
.pixels = icon.pixels.data(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
glfwSetWindowIcon(ctx.window, static_cast<int>(imgs.size()), imgs.data());
|
||||||
}
|
}
|
||||||
glfwSetWindowIcon(ctx.window, static_cast<int>(imgs.size()), imgs.data());
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user