mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 04:16:57 +03:00
Fixed formatting
Signed-off-by: SwitchAxe <sofiacerasuoli@gmail.com>
(cherry picked from commit 809e766aec)
This commit is contained in:
parent
0b7646740b
commit
aadd88cbd8
1 changed files with 21 additions and 22 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue