Misc: More format string fixes

This commit is contained in:
Stenzek
2024-05-25 15:45:17 +10:00
parent a75e61e1d6
commit 1565a2667d
17 changed files with 33 additions and 32 deletions

View File

@ -903,7 +903,7 @@ void Achievements::ClientLoadGameCallback(int result, const char* error_message,
if (result == RC_NO_GAME_LOADED)
{
// Unknown game.
INFO_LOG("Unknown game '%s', disabling achievements.", s_game_hash);
INFO_LOG("Unknown game '{}', disabling achievements.", s_game_hash);
DisableHardcoreMode();
return;
}

View File

@ -677,7 +677,7 @@ void Bus::ClearRAMCodePageFlags()
for (const auto& it : s_fastmem_ram_views)
{
if (!MemMap::MemProtect(it.first, it.second, PageProtect::ReadWrite))
ERROR_LOG("Failed to unprotect code pages for fastmem view @ %p", static_cast<void*>(it.first));
ERROR_LOG("Failed to unprotect code pages for fastmem view @ {}", static_cast<void*>(it.first));
}
}
#endif

View File

@ -2145,7 +2145,7 @@ void CDROM::ExecuteTestCommand(u8 subcommand)
default:
[[unlikely]]
{
ERROR_LOG("Unknown test command 0x{:02X}, %u parameters", subcommand, s_param_fifo.GetSize());
ERROR_LOG("Unknown test command 0x{:02X}, {} parameters", subcommand, s_param_fifo.GetSize());
SendErrorResponse(STAT_ERROR, ERROR_REASON_INVALID_COMMAND);
EndCommand();
return;
@ -3282,7 +3282,7 @@ void CDROM::LoadDataFIFO()
sb.size = 0;
}
DEBUG_LOG("Loaded %u bytes to data FIFO from buffer {}", s_data_fifo.GetSize(), s_current_read_sector_buffer);
DEBUG_LOG("Loaded {} bytes to data FIFO from buffer {}", s_data_fifo.GetSize(), s_current_read_sector_buffer);
SectorBuffer& next_sb = s_sector_buffers[s_current_write_sector_buffer];
if (next_sb.size > 0)

View File

@ -710,7 +710,7 @@ void CPU::PrintInstruction(u32 bits, u32 pc, bool regs, const char* prefix)
}
}
DEV_LOG("{}{:08x}: {:08x} %s", prefix, pc, bits, instr);
DEV_LOG("{}{:08x}: {:08x} {}", prefix, pc, bits, instr);
}
void CPU::LogInstruction(u32 bits, u32 pc, bool regs)
@ -2061,7 +2061,7 @@ bool CPU::AddBreakpoint(BreakpointType type, VirtualMemoryAddress address, bool
if (HasBreakpointAtAddress(type, address))
return false;
INFO_LOG("Adding {} breakpoint at {:08X}, auto clear = %u", GetBreakpointTypeName(type), address,
INFO_LOG("Adding {} breakpoint at {:08X}, auto clear = {}", GetBreakpointTypeName(type), address,
static_cast<unsigned>(auto_clear));
Breakpoint bp{address, nullptr, auto_clear ? 0 : s_breakpoint_counter++, 0, type, auto_clear, enabled};

View File

@ -1010,7 +1010,7 @@ GameList::PlayedTimeMap GameList::LoadPlayedTimeMap(const std::string& path)
if (ret.find(serial) != ret.end())
{
WARNING_LOG("Duplicate entry: '%s'", serial);
WARNING_LOG("Duplicate entry: '{}'", serial);
continue;
}
@ -1074,7 +1074,7 @@ GameList::PlayedTimeEntry GameList::UpdatePlayedTimeFile(const std::string& path
if (FileSystem::FSeek64(fp.get(), line_pos, SEEK_SET) != 0 ||
std::fwrite(new_line.data(), new_line.length(), 1, fp.get()) != 1)
{
ERROR_LOG("Failed to update '%s'.", path);
ERROR_LOG("Failed to update '{}'.", path);
}
return line_entry;
@ -1087,7 +1087,7 @@ GameList::PlayedTimeEntry GameList::UpdatePlayedTimeFile(const std::string& path
if (FileSystem::FSeek64(fp.get(), 0, SEEK_END) != 0 ||
std::fwrite(new_line.data(), new_line.length(), 1, fp.get()) != 1)
{
ERROR_LOG("Failed to write '%s'.", path);
ERROR_LOG("Failed to write '{}'.", path);
}
}

View File

@ -451,7 +451,7 @@ bool MemoryCardImage::UndeleteFile(DataArray* data, const FileInfo& fi)
{
if (df->block_allocation_state != 0xA3)
{
ERROR_LOG("Incorrect block state for %u, expected 0xA3 got 0x{:02X}", this_block_number,
ERROR_LOG("Incorrect block state for {}, expected 0xA3 got 0x{:02X}", this_block_number,
df->block_allocation_state);
return false;
}

View File

@ -277,7 +277,7 @@ const TextureReplacementTexture* TextureReplacements::LoadTexture(const std::str
RGBA8Image image;
if (!image.LoadFromFile(filename.c_str()))
{
ERROR_LOG("Failed to load '%s'", Path::GetFileName(filename));
ERROR_LOG("Failed to load '{}'", Path::GetFileName(filename));
return nullptr;
}

View File

@ -400,7 +400,7 @@ void Timers::WriteRegister(u32 offset, u32 value)
case 0x08:
{
DEBUG_LOG("Timer %u write target 0x{:04X}", timer_index, ZeroExtend32(Truncate16(value)));
DEBUG_LOG("Timer {} write target 0x{:04X}", timer_index, ZeroExtend32(Truncate16(value)));
cs.target = value & u32(0xFFFF);
CheckForIRQ(timer_index, cs.counter);
if (timer_index == 2 || !cs.external_counting_enabled)