minor fixes (msvc build, minor changes)

This commit is contained in:
A-lex-Ra
2024-01-27 22:08:18 +06:00
parent 5c89202f3f
commit a42deddb2b
+3 -3
View File
@@ -275,7 +275,7 @@ std::shared_ptr<Panel> create_packs_panel(const std::vector<ContentPack>& packs,
if (assets->getTexture(icon) == nullptr) { if (assets->getTexture(icon) == nullptr) {
auto iconfile = pack.folder/fs::path("icon.png"); auto iconfile = pack.folder/fs::path("icon.png");
if (fs::is_regular_file(iconfile)) { if (fs::is_regular_file(iconfile)) {
assets->store(png::load_texture(iconfile), icon); assets->store(png::load_texture(iconfile.string()), icon);
} else { } else {
icon = "gui/no_icon"; icon = "gui/no_icon";
} }
@@ -483,7 +483,7 @@ void create_settings_panel(Engine* engine, PagesControl* menu) {
return engine->getSettings().chunks.loadDistance; return engine->getSettings().chunks.loadDistance;
}); });
trackbar->consumer([=](double value) { trackbar->consumer([=](double value) {
engine->getSettings().chunks.loadDistance = value; engine->getSettings().chunks.loadDistance = static_cast<uint>(value);
}); });
panel->add(trackbar); panel->add(trackbar);
} }
@@ -499,7 +499,7 @@ void create_settings_panel(Engine* engine, PagesControl* menu) {
return engine->getSettings().chunks.loadSpeed; return engine->getSettings().chunks.loadSpeed;
}); });
trackbar->consumer([=](double value) { trackbar->consumer([=](double value) {
engine->getSettings().chunks.loadSpeed = value; engine->getSettings().chunks.loadSpeed = static_cast<uint>(value);
}); });
panel->add(trackbar); panel->add(trackbar);
} }