From aadd88cbd8c0200b8411eac0fb760d7edc30d7a0 Mon Sep 17 00:00:00 2001 From: SwitchAxe Date: Mon, 12 Jan 2026 16:44:01 +0100 Subject: [PATCH] Fixed formatting Signed-off-by: SwitchAxe (cherry picked from commit 809e766aec1ba83127057ed1504539f53d0d434b) --- .../mod/tasks/LocalShaderPackParseTask.cpp | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/launcher/minecraft/mod/tasks/LocalShaderPackParseTask.cpp b/launcher/minecraft/mod/tasks/LocalShaderPackParseTask.cpp index 997cb9bcb..3a6b11b69 100644 --- a/launcher/minecraft/mod/tasks/LocalShaderPackParseTask.cpp +++ b/launcher/minecraft/mod/tasks/LocalShaderPackParseTask.cpp @@ -65,30 +65,29 @@ bool processZIP(ShaderPack& pack, ProcessingLevel level) return false; // can't open zip file if (!zip.exists("/shaders")) { - // assets dir does not exists at zip root, but shader packs - // will sometimes be a zip file containing a folder with the - // actual contents in it. This happens - // e.g. when the shader pack is downloaded as code - // from Github. so other than "/shaders", we - // could also check for a "shaders" folder one level deep. + // assets dir does not exists at zip root, but shader packs + // will sometimes be a zip file containing a folder with the + // actual contents in it. This happens + // e.g. when the shader pack is downloaded as code + // from Github. so other than "/shaders", we + // could also check for a "shaders" folder one level deep. - QStringList files = zip.getFiles(); + QStringList files = zip.getFiles(); - // the assumption here is that there is just one - // folder with the "shader" subfolder. In case - // there are multiple, the first one is picked. - bool isShaderPresent = false; - for (QString f : files) { - if (f.contains("/shaders/", Qt::CaseInsensitive)) { - isShaderPresent = true; - break; - } - } - - if (!isShaderPresent) - // assets dir does not exist. - return false; - + // the assumption here is that there is just one + // folder with the "shader" subfolder. In case + // there are multiple, the first one is picked. + bool isShaderPresent = false; + for (QString f : files) { + if (f.contains("/shaders/", Qt::CaseInsensitive)) { + isShaderPresent = true; + break; + } + } + + if (!isShaderPresent) + // assets dir does not exist. + return false; } pack.setPackFormat(ShaderPackFormat::VALID);