mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 13:36:24 +02:00
Logging API change (refactor) (#19324)
* Rename LogType to Log * Explicitly use the Log:: enum when logging. Allows for autocomplete when editing. * Mac/ARM64 buildfix * Do the same with the hle result log macros * Rename the log names to mixed case while at it. * iOS buildfix * Qt buildfix attempt, ARM32 buildfix
This commit is contained in:
1 parent
ae3ff686f0
commit
e01ca5b057
393 files changed
+6198
-6193
No files matched your search
@@ -212,7 +212,7 @@ void DiskCachingFileLoaderCache::ShutdownCache() {
|
||||
}
|
||||
if (failed) {
|
||||
// Leave it locked, it's broken.
|
||||
ERROR_LOG(LOADER, "Unable to flush disk cache.");
|
||||
ERROR_LOG(Log::Loader, "Unable to flush disk cache.");
|
||||
} else {
|
||||
LockCacheFile(false);
|
||||
}
|
||||
@@ -475,7 +475,7 @@ bool DiskCachingFileLoaderCache::ReadBlockData(u8 *dest, BlockInfo &info, size_t
|
||||
#endif
|
||||
|
||||
if (failed) {
|
||||
ERROR_LOG(LOADER, "Unable to read disk cache data entry.");
|
||||
ERROR_LOG(Log::Loader, "Unable to read disk cache data entry.");
|
||||
CloseFileHandle();
|
||||
}
|
||||
return !failed;
|
||||
@@ -503,7 +503,7 @@ void DiskCachingFileLoaderCache::WriteBlockData(BlockInfo &info, const u8 *src)
|
||||
#endif
|
||||
|
||||
if (failed) {
|
||||
ERROR_LOG(LOADER, "Unable to write disk cache data entry.");
|
||||
ERROR_LOG(Log::Loader, "Unable to write disk cache data entry.");
|
||||
CloseFileHandle();
|
||||
}
|
||||
}
|
||||
@@ -523,7 +523,7 @@ void DiskCachingFileLoaderCache::WriteIndexData(u32 indexPos, BlockInfo &info) {
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
ERROR_LOG(LOADER, "Unable to write disk cache index entry.");
|
||||
ERROR_LOG(Log::Loader, "Unable to write disk cache index entry.");
|
||||
CloseFileHandle();
|
||||
}
|
||||
}
|
||||
@@ -564,7 +564,7 @@ bool DiskCachingFileLoaderCache::LoadCacheFile(const Path &path) {
|
||||
flags_ = header.flags;
|
||||
LoadCacheIndex();
|
||||
} else {
|
||||
ERROR_LOG(LOADER, "Disk cache file header did not match, recreating cache file");
|
||||
ERROR_LOG(Log::Loader, "Disk cache file header did not match, recreating cache file");
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
@@ -621,14 +621,14 @@ void DiskCachingFileLoaderCache::CreateCacheFile(const Path &path) {
|
||||
if (maxBlocks_ < MAX_BLOCKS_LOWER_BOUND) {
|
||||
// There's not enough free space to cache, disable.
|
||||
f_ = nullptr;
|
||||
ERROR_LOG(LOADER, "Not enough free space; disabling disk cache");
|
||||
ERROR_LOG(Log::Loader, "Not enough free space; disabling disk cache");
|
||||
return;
|
||||
}
|
||||
flags_ = 0;
|
||||
|
||||
f_ = File::OpenCFile(path, "wb+");
|
||||
if (!f_) {
|
||||
ERROR_LOG(LOADER, "Could not create disk cache file");
|
||||
ERROR_LOG(Log::Loader, "Could not create disk cache file");
|
||||
return;
|
||||
}
|
||||
#ifdef __ANDROID__
|
||||
@@ -666,7 +666,7 @@ void DiskCachingFileLoaderCache::CreateCacheFile(const Path &path) {
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(LOADER, "Created new disk cache file for %s", origPath_.c_str());
|
||||
INFO_LOG(Log::Loader, "Created new disk cache file for %s", origPath_.c_str());
|
||||
}
|
||||
|
||||
bool DiskCachingFileLoaderCache::LockCacheFile(bool lockStatus) {
|
||||
@@ -684,7 +684,7 @@ bool DiskCachingFileLoaderCache::LockCacheFile(bool lockStatus) {
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
ERROR_LOG(LOADER, "Unable to read current flags during disk cache locking");
|
||||
ERROR_LOG(Log::Loader, "Unable to read current flags during disk cache locking");
|
||||
CloseFileHandle();
|
||||
return false;
|
||||
}
|
||||
@@ -692,13 +692,13 @@ bool DiskCachingFileLoaderCache::LockCacheFile(bool lockStatus) {
|
||||
// TODO: Also use flock where supported?
|
||||
if (lockStatus) {
|
||||
if ((flags_ & FLAG_LOCKED) != 0) {
|
||||
ERROR_LOG(LOADER, "Could not lock disk cache file for %s (already locked)", origPath_.c_str());
|
||||
ERROR_LOG(Log::Loader, "Could not lock disk cache file for %s (already locked)", origPath_.c_str());
|
||||
return false;
|
||||
}
|
||||
flags_ |= FLAG_LOCKED;
|
||||
} else {
|
||||
if ((flags_ & FLAG_LOCKED) == 0) {
|
||||
ERROR_LOG(LOADER, "Could not unlock disk cache file for %s", origPath_.c_str());
|
||||
ERROR_LOG(Log::Loader, "Could not unlock disk cache file for %s", origPath_.c_str());
|
||||
return false;
|
||||
}
|
||||
flags_ &= ~FLAG_LOCKED;
|
||||
@@ -713,15 +713,15 @@ bool DiskCachingFileLoaderCache::LockCacheFile(bool lockStatus) {
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
ERROR_LOG(LOADER, "Unable to write updated flags during disk cache locking");
|
||||
ERROR_LOG(Log::Loader, "Unable to write updated flags during disk cache locking");
|
||||
CloseFileHandle();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lockStatus) {
|
||||
INFO_LOG(LOADER, "Locked disk cache file for %s", origPath_.c_str());
|
||||
INFO_LOG(Log::Loader, "Locked disk cache file for %s", origPath_.c_str());
|
||||
} else {
|
||||
INFO_LOG(LOADER, "Unlocked disk cache file for %s", origPath_.c_str());
|
||||
INFO_LOG(Log::Loader, "Unlocked disk cache file for %s", origPath_.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user