mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user