Skip to content

Commit

Permalink
Improve default ini, logging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Mar 17, 2023
1 parent 1b0d5ec commit df41a5c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion Core/FileSystems/MetaFileSystem.cpp
Expand Up @@ -79,7 +79,6 @@ static bool RealPath(const std::string &currentDirectory, const std::string &inP
size_t inLen = inPath.length();
if (inLen == 0)
{
WARN_LOG(FILESYS, "RealPath: inPath is empty");
outPath = currentDirectory;
return true;
}
Expand Down
11 changes: 8 additions & 3 deletions GPU/Common/TextureReplacer.cpp
Expand Up @@ -904,12 +904,14 @@ bool TextureReplacer::GenerateIni(const std::string &gameID, Path &generatedFile

// Let's also write some defaults.
fprintf(f, R"(# This file is optional and describes your textures.
# Some information on syntax available here:
# https://github.com/hrydgard/ppsspp/wiki/Texture-replacement-ini-syntax
# Documentation about the options and syntax is available here:
# https://www.ppsspp.org/docs/reference/texture-replacement
[options]
version = 1
hash = quick
ignoreMipmap = false
ignoreMipmap = false # Set to true to avoid dumping mipmaps. Instead use basisu to generate them, see docs.
reduceHash = false # Usually a good idea to use.
allowVideo = false
[games]
# Used to make it easier to install, and override settings for other regions.
Expand All @@ -921,8 +923,11 @@ ignoreMipmap = false
# See wiki for more info.
[hashranges]
# See the documentation.
# Example: 08b31020,512,512 = 480,272
[filtering]
# You can enforce specific filtering modes with this. See the docs.
[reducehashranges]
)", gameID.c_str(), INI_FILENAME.c_str());
Expand Down
4 changes: 3 additions & 1 deletion GPU/Common/TextureReplacer.h
Expand Up @@ -138,18 +138,20 @@ class TextureReplacer {
bool allowVideo_ = false;
bool ignoreAddress_ = false;
bool reduceHash_ = false;
bool ignoreMipmap_ = false;

float reduceHashSize = 1.0f; // default value with reduceHash to false
float reduceHashGlobalValue = 0.5f; // Global value for textures dump pngs of all sizes, 0.5 by default but can be set in textures.ini

double lastTextureCacheSizeGB_ = 0.0;
bool ignoreMipmap_ = false;
std::string gameID_;
Path basePath_;
Path newTextureDir_;
ReplacedTextureHash hash_ = ReplacedTextureHash::QUICK;

VFSBackend *vfs_ = nullptr;
bool vfsIsZip_ = false;

GPUFormatSupport formatSupport_{};

typedef std::pair<int, int> WidthHeightPair;
Expand Down

0 comments on commit df41a5c

Please sign in to comment.