Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/client/StarClientApplication.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-08-22 12:52:59 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-08-22 12:52:59 +1000
commit8332536399dda90f89b7f96df29f6846272aea0c (patch)
tree7ce42330c65464a7565e69a886dd9dca0fce7e9b /source/client/StarClientApplication.cpp
parent4496cc17afdd24593259b446cf83bd4f9bebecec (diff)
fix compilation
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r--source/client/StarClientApplication.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp
index 80f0e01..5f0c22e 100644
--- a/source/client/StarClientApplication.cpp
+++ b/source/client/StarClientApplication.cpp
@@ -402,9 +402,9 @@ void ClientApplication::render() {
LogMap::set("client_render_world_total", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - totalStart));
auto size = Vec2F(renderer->screenSize());
- auto quad = renderFlatRect(RectF::withSize(size/-2, size), Vec4B(0.0f,0.0f,0.0f,0.0f), 0.0f);
+ auto quad = renderFlatRect(RectF::withSize(size / -2, size), Vec4B::filled(0), 0.0f);
for (auto& layer : m_postProcessLayers) {
- for(unsigned i = 0; i < layer.passes; i++) {
+ for (unsigned i = 0; i < layer.passes; i++) {
for (auto& effect : layer.effects) {
renderer->switchEffectConfig(effect);
renderer->render(quad);
@@ -466,14 +466,12 @@ void ClientApplication::renderReload() {
m_postProcessLayers.clear();
auto postProcessLayers = assets->json("/client.config:postProcessLayers").toArray();
for (auto& layer : postProcessLayers) {
- List<String> effects;
- for (auto& effect : layer.getArray("effects")) {
- auto effectStr = effect.toString();
- loadEffectConfig(effectStr);
- effects.append(effectStr);
- }
- m_postProcessLayers.append(PostProcessLayer{effects,layer.getUInt("passes",1)});
+ auto effects = jsonToStringList(layer.getArray("effects"));
+ for (auto& effect : effects)
+ loadEffectConfig(effect);
+ m_postProcessLayers.append(PostProcessLayer{ std::move(effects), (unsigned)layer.getUInt("passes", 1) });
}
+
loadEffectConfig("interface");
}