Core: Convert missed log calls over to fmt
This commit is contained in:
parent
17b11cf4a4
commit
eedfe2abf1
|
@ -470,8 +470,9 @@ void DecryptARCode(std::vector<std::string> vCodes, std::vector<AREntry>* ops)
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
// Return value is index + 1, 0 being the success flag value.
|
// Return value is index + 1, 0 being the success flag value.
|
||||||
PanicAlertT("Action Replay Code Decryption Error:\nParity Check Failed\n\nCulprit Code:\n%s",
|
PanicAlertFmtT(
|
||||||
vCodes[ret - 1].c_str());
|
"Action Replay Code Decryption Error:\nParity Check Failed\n\nCulprit Code:\n{0}",
|
||||||
|
vCodes[ret - 1]);
|
||||||
}
|
}
|
||||||
else if (!batchdecrypt(uCodes.data(), (u16)vCodes.size() << 1))
|
else if (!batchdecrypt(uCodes.data(), (u16)vCodes.size() << 1))
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,11 +78,11 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
|
||||||
while (std::getline(s, line))
|
while (std::getline(s, line))
|
||||||
{
|
{
|
||||||
// This is the UTF-8 representation of U+FEFF.
|
// This is the UTF-8 representation of U+FEFF.
|
||||||
const std::string utf8_bom = "\xEF\xBB\xBF";
|
constexpr std::string_view utf8_bom = "\xEF\xBB\xBF";
|
||||||
|
|
||||||
if (StringBeginsWith(line, utf8_bom))
|
if (StringBeginsWith(line, utf8_bom))
|
||||||
{
|
{
|
||||||
WARN_LOG(BOOT, "UTF-8 BOM in file: %s", m3u_path.c_str());
|
WARN_LOG_FMT(BOOT, "UTF-8 BOM in file: {}", m3u_path);
|
||||||
line.erase(0, utf8_bom.length());
|
line.erase(0, utf8_bom.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,13 +100,13 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
|
||||||
|
|
||||||
if (!nonexistent.empty())
|
if (!nonexistent.empty())
|
||||||
{
|
{
|
||||||
PanicAlertT("Files specified in the M3U file \"%s\" were not found:\n%s", m3u_path.c_str(),
|
PanicAlertFmtT("Files specified in the M3U file \"{0}\" were not found:\n{1}", m3u_path,
|
||||||
JoinStrings(nonexistent, "\n").c_str());
|
JoinStrings(nonexistent, "\n"));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.empty())
|
if (result.empty())
|
||||||
PanicAlertT("No paths found in the M3U file \"%s\"", m3u_path.c_str());
|
PanicAlertFmtT("No paths found in the M3U file \"{0}\"", m3u_path);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ BootParameters::GenerateFromFile(std::vector<std::string> paths,
|
||||||
// that gave an incorrect file name
|
// that gave an incorrect file name
|
||||||
if (!is_drive && !File::Exists(paths.front()))
|
if (!is_drive && !File::Exists(paths.front()))
|
||||||
{
|
{
|
||||||
PanicAlertT("The specified file \"%s\" does not exist", paths.front().c_str());
|
PanicAlertFmtT("The specified file \"{0}\" does not exist", paths.front());
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,15 +185,15 @@ BootParameters::GenerateFromFile(std::vector<std::string> paths,
|
||||||
|
|
||||||
if (is_drive)
|
if (is_drive)
|
||||||
{
|
{
|
||||||
PanicAlertT("Could not read \"%s\". "
|
PanicAlertFmtT("Could not read \"{0}\". "
|
||||||
"There is no disc in the drive or it is not a GameCube/Wii backup. "
|
"There is no disc in the drive or it is not a GameCube/Wii backup. "
|
||||||
"Please note that Dolphin cannot play games directly from the original "
|
"Please note that Dolphin cannot play games directly from the original "
|
||||||
"GameCube and Wii discs.",
|
"GameCube and Wii discs.",
|
||||||
path.c_str());
|
path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PanicAlertT("\"%s\" is an invalid GCM/ISO file, or is not a GC/Wii ISO.", path.c_str());
|
PanicAlertFmtT("\"{0}\" is an invalid GCM/ISO file, or is not a GC/Wii ISO.", path);
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ BootParameters::GenerateFromFile(std::vector<std::string> paths,
|
||||||
return std::make_unique<BootParameters>(std::move(*wad), savestate_path);
|
return std::make_unique<BootParameters>(std::move(*wad), savestate_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
PanicAlertT("Could not recognize file %s", path.c_str());
|
PanicAlertFmtT("Could not recognize file {0}", path);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,15 +338,15 @@ bool CBoot::Load_BS2(const std::string& boot_rom_filename)
|
||||||
known_ipl = true;
|
known_ipl = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlertT("The IPL file is not a known good dump. (CRC32: %x)", ipl_hash);
|
PanicAlertFmtT("The IPL file is not a known good dump. (CRC32: {0:x})", ipl_hash);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const DiscIO::Region boot_region = SConfig::GetInstance().m_region;
|
const DiscIO::Region boot_region = SConfig::GetInstance().m_region;
|
||||||
if (known_ipl && pal_ipl != (boot_region == DiscIO::Region::PAL))
|
if (known_ipl && pal_ipl != (boot_region == DiscIO::Region::PAL))
|
||||||
{
|
{
|
||||||
PanicAlertT("%s IPL found in %s directory. The disc might not be recognized",
|
PanicAlertFmtT("{0} IPL found in {1} directory. The disc might not be recognized",
|
||||||
pal_ipl ? "PAL" : "NTSC", SConfig::GetDirectoryForRegion(boot_region));
|
pal_ipl ? "PAL" : "NTSC", SConfig::GetDirectoryForRegion(boot_region));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the descrambler over the encrypted section containing BS1/BS2
|
// Run the descrambler over the encrypted section containing BS1/BS2
|
||||||
|
@ -417,7 +417,7 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
|
||||||
BootTitle() : config(SConfig::GetInstance()) {}
|
BootTitle() : config(SConfig::GetInstance()) {}
|
||||||
bool operator()(BootParameters::Disc& disc) const
|
bool operator()(BootParameters::Disc& disc) const
|
||||||
{
|
{
|
||||||
NOTICE_LOG(BOOT, "Booting from disc: %s", disc.path.c_str());
|
NOTICE_LOG_FMT(BOOT, "Booting from disc: {}", disc.path);
|
||||||
const DiscIO::VolumeDisc* volume =
|
const DiscIO::VolumeDisc* volume =
|
||||||
SetDisc(std::move(disc.volume), disc.auto_disc_change_paths);
|
SetDisc(std::move(disc.volume), disc.auto_disc_change_paths);
|
||||||
|
|
||||||
|
@ -437,14 +437,14 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
|
||||||
|
|
||||||
bool operator()(const BootParameters::Executable& executable) const
|
bool operator()(const BootParameters::Executable& executable) const
|
||||||
{
|
{
|
||||||
NOTICE_LOG(BOOT, "Booting from executable: %s", executable.path.c_str());
|
NOTICE_LOG_FMT(BOOT, "Booting from executable: {}", executable.path);
|
||||||
|
|
||||||
if (!executable.reader->IsValid())
|
if (!executable.reader->IsValid())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!executable.reader->LoadIntoMemory())
|
if (!executable.reader->LoadIntoMemory())
|
||||||
{
|
{
|
||||||
PanicAlertT("Failed to load the executable to memory.");
|
PanicAlertFmtT("Failed to load the executable to memory.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,13 +497,13 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
|
||||||
|
|
||||||
bool operator()(const BootParameters::IPL& ipl) const
|
bool operator()(const BootParameters::IPL& ipl) const
|
||||||
{
|
{
|
||||||
NOTICE_LOG(BOOT, "Booting GC IPL: %s", ipl.path.c_str());
|
NOTICE_LOG_FMT(BOOT, "Booting GC IPL: {}", ipl.path);
|
||||||
if (!File::Exists(ipl.path))
|
if (!File::Exists(ipl.path))
|
||||||
{
|
{
|
||||||
if (ipl.disc)
|
if (ipl.disc)
|
||||||
PanicAlertT("Cannot start the game, because the GC IPL could not be found.");
|
PanicAlertFmtT("Cannot start the game, because the GC IPL could not be found.");
|
||||||
else
|
else
|
||||||
PanicAlertT("Cannot find the GC IPL.");
|
PanicAlertFmtT("Cannot find the GC IPL.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
|
||||||
|
|
||||||
if (ipl.disc)
|
if (ipl.disc)
|
||||||
{
|
{
|
||||||
NOTICE_LOG(BOOT, "Inserting disc: %s", ipl.disc->path.c_str());
|
NOTICE_LOG_FMT(BOOT, "Inserting disc: {}", ipl.disc->path);
|
||||||
SetDisc(DiscIO::CreateDisc(ipl.disc->path), ipl.disc->auto_disc_change_paths);
|
SetDisc(DiscIO::CreateDisc(ipl.disc->path), ipl.disc->auto_disc_change_paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
|
||||||
|
|
||||||
bool operator()(const BootParameters::DFF& dff) const
|
bool operator()(const BootParameters::DFF& dff) const
|
||||||
{
|
{
|
||||||
NOTICE_LOG(BOOT, "Booting DFF: %s", dff.dff_path.c_str());
|
NOTICE_LOG_FMT(BOOT, "Booting DFF: {}", dff.dff_path);
|
||||||
return FifoPlayer::GetInstance().Open(dff.dff_path);
|
return FifoPlayer::GetInstance().Open(dff.dff_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,8 +284,9 @@ static void IncreaseSampleCount(const u32 amount)
|
||||||
|
|
||||||
if ((s_interrupt_timing - old_sample_counter) <= (s_sample_counter - old_sample_counter))
|
if ((s_interrupt_timing - old_sample_counter) <= (s_sample_counter - old_sample_counter))
|
||||||
{
|
{
|
||||||
DEBUG_LOG(AUDIO_INTERFACE, "GenerateAudioInterrupt %08x:%08x @ %08x s_control.AIINTVLD=%d",
|
DEBUG_LOG_FMT(AUDIO_INTERFACE,
|
||||||
s_sample_counter, s_interrupt_timing, PowerPC::ppcState.pc, s_control.AIINTVLD);
|
"GenerateAudioInterrupt {:08x}:{:08x} at PC {:08x} s_control.AIINTVLD={}",
|
||||||
|
s_sample_counter, s_interrupt_timing, PowerPC::ppcState.pc, s_control.AIINTVLD);
|
||||||
GenerateAudioInterrupt();
|
GenerateAudioInterrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,7 @@ u32 CEXIAgp::ImmRead(u32 _uSize)
|
||||||
m_current_cmd = 0;
|
m_current_cmd = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DEBUG_LOG(EXPANSIONINTERFACE, "AGP read %x", uData);
|
DEBUG_LOG_FMT(EXPANSIONINTERFACE, "AGP read {:x}", uData);
|
||||||
return uData;
|
return uData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||||
g_gpio_out.m_hex = val & gpio_owner.m_hex;
|
g_gpio_out.m_hex = val & gpio_owner.m_hex;
|
||||||
if (g_gpio_out[GPIO::DO_EJECT])
|
if (g_gpio_out[GPIO::DO_EJECT])
|
||||||
{
|
{
|
||||||
INFO_LOG(WII_IPC, "Ejecting disc due to GPIO write");
|
INFO_LOG_FMT(WII_IPC, "Ejecting disc due to GPIO write");
|
||||||
DVDInterface::EjectDisc(DVDInterface::EjectCause::Software);
|
DVDInterface::EjectDisc(DVDInterface::EjectCause::Software);
|
||||||
}
|
}
|
||||||
// SENSOR_BAR is checked by WiimoteEmu::CameraLogic
|
// SENSOR_BAR is checked by WiimoteEmu::CameraLogic
|
||||||
|
|
|
@ -1079,8 +1079,8 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, Client& player)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PanicAlertT(
|
PanicAlertFmtT(
|
||||||
"Unknown SYNC_SAVE_DATA message with id:%d received from player:%d Kicking player!",
|
"Unknown SYNC_SAVE_DATA message with id:{0} received from player:{1} Kicking player!",
|
||||||
sub_id, player.pid);
|
sub_id, player.pid);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1415,7 +1415,7 @@ bool NetPlayServer::SyncSaveData()
|
||||||
const auto game = m_dialog->FindGameFile(m_selected_game_identifier);
|
const auto game = m_dialog->FindGameFile(m_selected_game_identifier);
|
||||||
if (game == nullptr)
|
if (game == nullptr)
|
||||||
{
|
{
|
||||||
PanicAlertT("Selected game doesn't exist in game list!");
|
PanicAlertFmtT("Selected game doesn't exist in game list!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue