Skip to content

Commit

Permalink
Improve handling of texture packs without .ini files (not recommended…
Browse files Browse the repository at this point in the history
…, but exists)
  • Loading branch information
hrydgard committed Dec 25, 2023
1 parent 849000a commit 126d70c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions GPU/Common/TextureReplacer.cpp
Expand Up @@ -177,6 +177,16 @@ bool TextureReplacer::LoadIni() {
return false;
} else {
WARN_LOG(G3D, "Texture pack lacking ini file: %s", basePath_.c_str());
// Do what we can do anyway: Scan for textures and build the map.
std::map<ReplacementCacheKey, std::map<int, std::string>> filenameMap;
ScanForHashNamedFiles(dir, filenameMap);
ComputeAliasMap(filenameMap);
// Set some defaults.
allowVideo_ = false;
ignoreAddress_ = false;
reduceHash_ = false;
ignoreMipmap_ = false;
// TODO: others?
}
}

Expand Down
2 changes: 2 additions & 0 deletions GPU/Common/TextureReplacer.h
Expand Up @@ -18,9 +18,11 @@
#pragma once

#include "ppsspp_config.h"

#include <mutex>
#include <string>
#include <unordered_map>
#include <map>
#include <vector>

#include "Common/CommonFuncs.h"
Expand Down

0 comments on commit 126d70c

Please sign in to comment.