check all shaders are loaded early

This commit is contained in:
PancakeTAS 2025-07-18 14:04:21 +02:00 committed by Pancake
parent b5ca50d3d8
commit 34da212a74

View file

@ -125,6 +125,11 @@ void Extract::extractShaders() {
throw std::runtime_error("Unable to read Lossless.dll, is it installed?");
peparse::IterRsrc(dll, on_resource, nullptr);
peparse::DestructParsedPE(dll);
// ensure all shaders are present
for (const auto& [name, idx] : nameIdxTable)
if (shaders().find(idx) == shaders().end())
throw std::runtime_error("Shader not found: " + name + ".\nIs Lossless Scaling up to date?");
}
std::vector<uint8_t> Extract::getShader(const std::string& name) {