mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-16 05:51:41 +00:00
Core: Convert logging over to fmt pt. 1
Converts up to the DSP-related files for easier reviewing, the rest will be progressively moved over after this change gets merged.
This commit is contained in:
parent
4eecb8fd11
commit
958cbf38a4
37 changed files with 433 additions and 414 deletions
|
@ -245,13 +245,13 @@ std::vector<ARCode> LoadCodes(const IniFile& global_ini, const IniFile& local_in
|
|||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("Action Replay Error: invalid AR code line: %s", line.c_str());
|
||||
PanicAlertFmtT("Action Replay Error: invalid AR code line: {0}", line);
|
||||
|
||||
if (!success_addr)
|
||||
PanicAlertT("The address is invalid");
|
||||
PanicAlertFmtT("The address is invalid");
|
||||
|
||||
if (!success_val)
|
||||
PanicAlertT("The value is invalid");
|
||||
PanicAlertFmtT("The value is invalid");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -316,7 +316,7 @@ static void VLogInfo(std::string_view format, fmt::format_args args)
|
|||
return;
|
||||
|
||||
std::string text = fmt::vformat(format, args);
|
||||
INFO_LOG(ACTIONREPLAY, "%s", text.c_str());
|
||||
INFO_LOG_FMT(ACTIONREPLAY, "{}", text);
|
||||
|
||||
if (use_internal_log)
|
||||
{
|
||||
|
@ -403,9 +403,9 @@ static bool Subtype_RamWriteAndFill(const ARAddr& addr, const u32 data)
|
|||
|
||||
default:
|
||||
LogInfo("Bad Size");
|
||||
PanicAlertT("Action Replay Error: Invalid size "
|
||||
"(%08x : address = %08x) in Ram Write And Fill (%s)",
|
||||
addr.size, addr.gcaddr, s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay Error: Invalid size "
|
||||
"({0:08x} : address = {1:08x}) in Ram Write And Fill ({2})",
|
||||
addr.size, addr.gcaddr, s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -463,9 +463,9 @@ static bool Subtype_WriteToPointer(const ARAddr& addr, const u32 data)
|
|||
|
||||
default:
|
||||
LogInfo("Bad Size");
|
||||
PanicAlertT("Action Replay Error: Invalid size "
|
||||
"(%08x : address = %08x) in Write To Pointer (%s)",
|
||||
addr.size, addr.gcaddr, s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay Error: Invalid size "
|
||||
"({0:08x} : address = {1:08x}) in Write To Pointer ({2})",
|
||||
addr.size, addr.gcaddr, s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -525,9 +525,9 @@ static bool Subtype_AddCode(const ARAddr& addr, const u32 data)
|
|||
|
||||
default:
|
||||
LogInfo("Bad Size");
|
||||
PanicAlertT("Action Replay Error: Invalid size "
|
||||
"(%08x : address = %08x) in Add Code (%s)",
|
||||
addr.size, addr.gcaddr, s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay Error: Invalid size "
|
||||
"({0:08x} : address = {1:08x}) in Add Code ({2})",
|
||||
addr.size, addr.gcaddr, s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -540,9 +540,9 @@ static bool Subtype_MasterCodeAndWriteToCCXXXXXX(const ARAddr& addr, const u32 d
|
|||
// u8 mcode_type = (data & 0xFF0000) >> 16;
|
||||
// u8 mcode_count = (data & 0xFF00) >> 8;
|
||||
// u8 mcode_number = data & 0xFF;
|
||||
PanicAlertT("Action Replay Error: Master Code and Write To CCXXXXXX not implemented (%s)\n"
|
||||
"Master codes are not needed. Do not use master codes.",
|
||||
s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay Error: Master Code and Write To CCXXXXXX not implemented ({0})\n"
|
||||
"Master codes are not needed. Do not use master codes.",
|
||||
s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -615,8 +615,9 @@ static bool ZeroCode_FillAndSlide(const u32 val_last, const ARAddr& addr, const
|
|||
|
||||
default:
|
||||
LogInfo("Bad Size");
|
||||
PanicAlertT("Action Replay Error: Invalid size (%08x : address = %08x) in Fill and Slide (%s)",
|
||||
size, new_addr, s_current_code->name.c_str());
|
||||
PanicAlertFmtT(
|
||||
"Action Replay Error: Invalid size ({0:08x} : address = {1:08x}) in Fill and Slide ({2})",
|
||||
size, new_addr, s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -670,8 +671,8 @@ static bool ZeroCode_MemoryCopy(const u32 val_last, const ARAddr& addr, const u3
|
|||
else
|
||||
{
|
||||
LogInfo("Bad Value");
|
||||
PanicAlertT("Action Replay Error: Invalid value (%08x) in Memory Copy (%s)", (data & ~0x7FFF),
|
||||
s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay Error: Invalid value ({0:08x}) in Memory Copy ({1})",
|
||||
(data & ~0x7FFF), s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -707,8 +708,8 @@ static bool NormalCode(const ARAddr& addr, const u32 data)
|
|||
|
||||
default:
|
||||
LogInfo("Bad Subtype");
|
||||
PanicAlertT("Action Replay: Normal Code 0: Invalid Subtype %08x (%s)", addr.subtype,
|
||||
s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay: Normal Code 0: Invalid Subtype {0:08x} ({1})", addr.subtype,
|
||||
s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -749,8 +750,8 @@ static bool CompareValues(const u32 val1, const u32 val2, const int type)
|
|||
|
||||
default:
|
||||
LogInfo("Unknown Compare type");
|
||||
PanicAlertT("Action Replay: Invalid Normal Code Type %08x (%s)", type,
|
||||
s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay: Invalid Normal Code Type {0:08x} ({1})", type,
|
||||
s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -781,8 +782,8 @@ static bool ConditionalCode(const ARAddr& addr, const u32 data, int* const pSkip
|
|||
|
||||
default:
|
||||
LogInfo("Bad Size");
|
||||
PanicAlertT("Action Replay: Conditional Code: Invalid Size %08x (%s)", addr.size,
|
||||
s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay: Conditional Code: Invalid Size {0:08x} ({1})", addr.size,
|
||||
s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -805,8 +806,8 @@ static bool ConditionalCode(const ARAddr& addr, const u32 data, int* const pSkip
|
|||
|
||||
default:
|
||||
LogInfo("Bad Subtype");
|
||||
PanicAlertT("Action Replay: Normal Code %i: Invalid subtype %08x (%s)", 1, addr.subtype,
|
||||
s_current_code->name.c_str());
|
||||
PanicAlertFmtT("Action Replay: Normal Code {0}: Invalid subtype {1:08x} ({2})", 1,
|
||||
addr.subtype, s_current_code->name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -889,7 +890,7 @@ static bool RunCodeLocked(const ARCode& arcode)
|
|||
{
|
||||
LogInfo(
|
||||
"This action replay simulator does not support codes that modify Action Replay itself.");
|
||||
PanicAlertT(
|
||||
PanicAlertFmtT(
|
||||
"This action replay simulator does not support codes that modify Action Replay itself.");
|
||||
return false;
|
||||
}
|
||||
|
@ -923,7 +924,7 @@ static bool RunCodeLocked(const ARCode& arcode)
|
|||
// Todo: Set register 1BB4 to 1
|
||||
LogInfo("ZCode: Executes all codes in the same row, Set register 1BB4 to 1 (zcode not "
|
||||
"supported)");
|
||||
PanicAlertT("Zero 3 code not supported");
|
||||
PanicAlertFmtT("Zero 3 code not supported");
|
||||
return false;
|
||||
|
||||
case ZCODE_04: // Fill & Slide or Memory Copy
|
||||
|
@ -943,7 +944,7 @@ static bool RunCodeLocked(const ARCode& arcode)
|
|||
|
||||
default:
|
||||
LogInfo("ZCode: Unknown");
|
||||
PanicAlertT("Zero code unknown to Dolphin: %08x", zcode);
|
||||
PanicAlertFmtT("Zero code unknown to Dolphin: {0:08x}", zcode);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue