aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ShaderPack.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2022-12-24 11:22:06 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2022-12-24 15:55:10 -0700
commitccfe605920fba14d9e798bb26642d22ee45fe860 (patch)
tree95267d40dd4d8c8bbe8fad696df6116937034c18 /launcher/minecraft/mod/ShaderPack.cpp
parent878614ff68163bbc95cbfc35611765f21a83bfed (diff)
downloadPrismLauncher-ccfe605920fba14d9e798bb26642d22ee45fe860.tar.gz
PrismLauncher-ccfe605920fba14d9e798bb26642d22ee45fe860.tar.bz2
PrismLauncher-ccfe605920fba14d9e798bb26642d22ee45fe860.zip
feat: add shaderpack validation
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/ShaderPack.cpp')
-rw-r--r--launcher/minecraft/mod/ShaderPack.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/ShaderPack.cpp b/launcher/minecraft/mod/ShaderPack.cpp
new file mode 100644
index 00000000..b8d427c7
--- /dev/null
+++ b/launcher/minecraft/mod/ShaderPack.cpp
@@ -0,0 +1,39 @@
+
+// SPDX-FileCopyrightText: 2022 Rachel Powers <508861+Ryex@users.noreply.github.com>
+//
+// SPDX-License-Identifier: GPL-3.0-only
+
+/*
+ * Prism Launcher - Minecraft Launcher
+ * Copyright (C) 2022 Rachel Powers <508861+Ryex@users.noreply.github.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "ShaderPack.h"
+
+#include "minecraft/mod/tasks/LocalShaderPackParseTask.h"
+
+
+void ShaderPack::setPackFormat(ShaderPackFormat new_format)
+{
+ QMutexLocker locker(&m_data_lock);
+
+
+ m_pack_format = new_format;
+}
+
+bool ShaderPack::valid() const
+{
+ return m_pack_format != ShaderPackFormat::INVALID;
+}