fix(color): images may not load in Windows simulator (#7010)

This commit is contained in:
philmoz
2026-01-20 19:55:51 +10:00
committed by GitHub
parent b9370af692
commit 35f943e3f5
+3 -1
View File
@@ -230,7 +230,9 @@ StaticImage::StaticImage(Window* parent, const rect_t& rect,
void StaticImage::setSource(std::string filename)
{
if (!filename.empty()) {
std::string fullpath = std::string("A" PATH_SEPARATOR) + filename;
std::string fullpath = std::string("A");
if (filename[0] != PATH_SEPARATOR[0]) fullpath += PATH_SEPARATOR;
fullpath += filename;
if (!image) image = lv_img_create(lvobj);
lv_obj_set_pos(image, 0, 0);