mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Improve logging in GetFilesInDir
This commit is contained in:
parent
f60e66b186
commit
720e0561b5
1 changed files with 6 additions and 4 deletions
|
@ -185,7 +185,7 @@ std::vector<File::FileInfo> ApplyFilter(std::vector<File::FileInfo> files, const
|
|||
|
||||
bool GetFilesInDir(const Path &directory, std::vector<FileInfo> *files, const char *filter, int flags, std::string_view prefix) {
|
||||
if (SIMULATE_SLOW_IO) {
|
||||
INFO_LOG(Log::System, "GetFilesInDir %s", directory.c_str());
|
||||
INFO_LOG(Log::System, "GetFilesInDir %s (ext %s, prefix %.*s)", directory.c_str(), filter, (int)prefix.size(), prefix.data());
|
||||
sleep_ms(300, "slow-io-sim");
|
||||
}
|
||||
|
||||
|
@ -253,9 +253,6 @@ bool GetFilesInDir(const Path &directory, std::vector<FileInfo> *files, const ch
|
|||
return false;
|
||||
}
|
||||
do {
|
||||
if (SIMULATE_SLOW_IO) {
|
||||
sleep_ms(100, "slow-io-sim");
|
||||
}
|
||||
const std::string virtualName = ConvertWStringToUTF8(ffd.cFileName);
|
||||
// check for "." and ".."
|
||||
if (!(flags & GETFILES_GET_NAVIGATION_ENTRIES) && (virtualName == "." || virtualName == ".."))
|
||||
|
@ -270,6 +267,11 @@ bool GetFilesInDir(const Path &directory, std::vector<FileInfo> *files, const ch
|
|||
continue;
|
||||
}
|
||||
|
||||
if (SIMULATE_SLOW_IO) {
|
||||
INFO_LOG(Log::System, "GetFilesInDir item %s", virtualName.c_str());
|
||||
sleep_ms(50, "slow-io-sim");
|
||||
}
|
||||
|
||||
FileInfo info;
|
||||
info.name = virtualName;
|
||||
info.fullName = directory / virtualName;
|
||||
|
|
Loading…
Add table
Reference in a new issue