diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-11-13 22:33:26 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-11-17 21:23:58 -0500 |
| commit | 3d9b2aa0055ded7ee74f6e4a73ff54acecf313a9 (patch) | |
| tree | 0ff92a960d77b6bc8b92bed1c7d61f79206887dc /Source/Core/VideoCommon/HiresTextures.cpp | |
| parent | 8a621c2d5e7722de5148a0a40d4072445cffb361 (diff) | |
VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
Diffstat (limited to 'Source/Core/VideoCommon/HiresTextures.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/HiresTextures.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index 039bc87c5e..9c822cc276 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -119,8 +119,8 @@ void HiresTexture::Update() if (failed_insert) { - ERROR_LOG(VIDEO, "One or more textures at path '%s' were already inserted", - texture_directory.c_str()); + ERROR_LOG_FMT(VIDEO, "One or more textures at path '{}' were already inserted", + texture_directory); } } @@ -371,7 +371,7 @@ std::unique_ptr<HiresTexture> HiresTexture::Load(const std::string& base_filenam if (!LoadTexture(level, buffer)) { - ERROR_LOG(VIDEO, "Custom texture %s failed to load", filename.c_str()); + ERROR_LOG_FMT(VIDEO, "Custom texture {} failed to load", filename); break; } } @@ -387,19 +387,19 @@ std::unique_ptr<HiresTexture> HiresTexture::Load(const std::string& base_filenam const Level& first_mip = ret->m_levels[0]; if (first_mip.width * height != first_mip.height * width) { - ERROR_LOG(VIDEO, - "Invalid custom texture size %ux%u for texture %s. The aspect differs " - "from the native size %ux%u.", - first_mip.width, first_mip.height, first_mip_file.path.c_str(), width, height); + ERROR_LOG_FMT(VIDEO, + "Invalid custom texture size {}x{} for texture {}. The aspect differs " + "from the native size {}x{}.", + first_mip.width, first_mip.height, first_mip_file.path, width, height); } // Same deal if the custom texture isn't a multiple of the native size. if (width != 0 && height != 0 && (first_mip.width % width || first_mip.height % height)) { - ERROR_LOG(VIDEO, - "Invalid custom texture size %ux%u for texture %s. Please use an integer " - "upscaling factor based on the native size %ux%u.", - first_mip.width, first_mip.height, first_mip_file.path.c_str(), width, height); + ERROR_LOG_FMT(VIDEO, + "Invalid custom texture size {}x{} for texture {}. Please use an integer " + "upscaling factor based on the native size {}x{}.", + first_mip.width, first_mip.height, first_mip_file.path, width, height); } // Verify that each mip level is the correct size (divide by 2 each time). @@ -416,16 +416,16 @@ std::unique_ptr<HiresTexture> HiresTexture::Load(const std::string& base_filenam if (current_mip_width == level.width && current_mip_height == level.height) continue; - ERROR_LOG(VIDEO, - "Invalid custom texture size %dx%d for texture %s. Mipmap level %u must be %dx%d.", - level.width, level.height, first_mip_file.path.c_str(), mip_level, - current_mip_width, current_mip_height); + ERROR_LOG_FMT( + VIDEO, "Invalid custom texture size {}x{} for texture {}. Mipmap level {} must be {}x{}.", + level.width, level.height, first_mip_file.path, mip_level, current_mip_width, + current_mip_height); } else { // It is invalid to have more than a single 1x1 mipmap. - ERROR_LOG(VIDEO, "Custom texture %s has too many 1x1 mipmaps. Skipping extra levels.", - first_mip_file.path.c_str()); + ERROR_LOG_FMT(VIDEO, "Custom texture {} has too many 1x1 mipmaps. Skipping extra levels.", + first_mip_file.path); } // Drop this mip level and any others after it. @@ -437,8 +437,8 @@ std::unique_ptr<HiresTexture> HiresTexture::Load(const std::string& base_filenam if (std::any_of(ret->m_levels.begin(), ret->m_levels.end(), [&ret](const Level& l) { return l.format != ret->m_levels[0].format; })) { - ERROR_LOG(VIDEO, "Custom texture %s has inconsistent formats across mip levels.", - first_mip_file.path.c_str()); + ERROR_LOG_FMT(VIDEO, "Custom texture {} has inconsistent formats across mip levels.", + first_mip_file.path); return nullptr; } |
