diff --git a/src/emulator.cpp b/src/emulator.cpp index 2929c04e7..94e41b7a4 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -89,42 +89,6 @@ static void MountSandboxDirs() { MountOrCreateDir("_TempData/" + title_id, "/temp"); } -static bool ClearDirectoryContents(const std::filesystem::path& dir) { - bool ok = true; - - for (const auto& entry: Common::File::GetDirEntries(dir)) { - if (entry.name == "." || entry.name == "..") { - continue; - } - - auto path = dir / entry.name; - - if (entry.is_file) { - Common::File::RemoveReadonly(path); - ok = Common::File::DeleteFile(path) && ok; - } else { - ok = ClearDirectoryContents(path) && ok; - ok = Common::File::DeleteDirectory(path) && ok; - } - } - - return ok; -} - -static void ClearDebugTextureFolder() { - const std::string debug_texture_folder = "_Textures"; - - if (!Common::File::IsDirectoryExisting(debug_texture_folder)) { - Common::File::CreateDirectories(debug_texture_folder); - return; - } - - if (!ClearDirectoryContents(debug_texture_folder)) { - LOGF_COLOR(Log::Color::BrightYellow, "TextureDump: failed to completely clear %s\n", - debug_texture_folder.c_str()); - } -} - static void Init(const Config::ConfigOptions& cfg, const std::filesystem::path& param_json, Common::Subsystems& subsystems) { EXIT_IF(!Common::Thread::IsMainThread()); @@ -198,8 +162,6 @@ void Run(const RunOptions& options) { Common::Subsystems subsystems(true); Init(options.config, param_json, subsystems); - ClearDebugTextureFolder(); - PrintSystemInfo(); std::string title_id; Loader::SystemContentParamSfoGetString("TITLE_ID", &title_id); diff --git a/src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp b/src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp index 8fa5954c8..f93bef4ab 100644 --- a/src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp +++ b/src/graphics/host_gpu/renderer/pipeline/pipelineCache.cpp @@ -580,8 +580,8 @@ void PipelineCache::InitializeDriverCache() { return; } if (!initial_data.empty()) { - PipelineCacheLog("Vulkan pipeline cache: loaded {} bytes from {}", initial_data.size(), - path); + PipelineCacheLog("Vulkan pipeline cache: loaded {:.2f} MB from {}", + static_cast(initial_data.size()) / 1'000'000.0, path); } else { PipelineCacheLog("Vulkan pipeline cache: initialized empty"); } @@ -621,8 +621,8 @@ void PipelineCache::Save() { } if (result != vk::Result::eSuccess || size == 0 || size > std::numeric_limits::max()) { - PipelineCacheLog("Vulkan pipeline cache: save failed ({}, {} bytes)", - vk::to_string(result), size); + PipelineCacheLog("Vulkan pipeline cache: save failed ({}, {:.2f} MB)", + vk::to_string(result), static_cast(size) / 1'000'000.0); return; } payload.resize(size); @@ -654,7 +654,8 @@ void PipelineCache::Save() { Common::PathToString(m_driver_cache_path)); return; } - PipelineCacheLog("Vulkan pipeline cache: saved {} bytes to {}", payload.size(), + PipelineCacheLog("Vulkan pipeline cache: saved {:.2f} MB to {}", + static_cast(payload.size()) / 1'000'000.0, Common::PathToString(m_driver_cache_path)); m_driver_cache_dirty = false; }