Frontends: Migrate logs over to fmt
This commit is contained in:
parent
4c9ffb58fa
commit
ffbf3d71f0
|
@ -184,8 +184,8 @@ void ConvertDialog::OnFormatChanged()
|
||||||
constexpr int FALLBACK_BLOCK_SIZE = 0x4000;
|
constexpr int FALLBACK_BLOCK_SIZE = 0x4000;
|
||||||
if (!block_size_ok(FALLBACK_BLOCK_SIZE))
|
if (!block_size_ok(FALLBACK_BLOCK_SIZE))
|
||||||
{
|
{
|
||||||
ERROR_LOG(MASTER_LOG, "Failed to find a block size which does not cause problems "
|
ERROR_LOG_FMT(MASTER_LOG, "Failed to find a block size which does not cause problems "
|
||||||
"when decompressing using an old version of Dolphin");
|
"when decompressing using an old version of Dolphin");
|
||||||
}
|
}
|
||||||
AddToBlockSizeComboBox(FALLBACK_BLOCK_SIZE);
|
AddToBlockSizeComboBox(FALLBACK_BLOCK_SIZE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,7 +373,7 @@ void GCMemcardManager::ImportFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_slot_memcard[m_active_slot]->Save())
|
if (!m_slot_memcard[m_active_slot]->Save())
|
||||||
PanicAlertT("File write failed");
|
PanicAlertFmtT("File write failed");
|
||||||
|
|
||||||
UpdateSlotTable(m_active_slot);
|
UpdateSlotTable(m_active_slot);
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ void GCMemcardManager::CopyFiles()
|
||||||
for (int i = 0; i < SLOT_COUNT; i++)
|
for (int i = 0; i < SLOT_COUNT; i++)
|
||||||
{
|
{
|
||||||
if (!m_slot_memcard[i]->Save())
|
if (!m_slot_memcard[i]->Save())
|
||||||
PanicAlertT("File write failed");
|
PanicAlertFmtT("File write failed");
|
||||||
|
|
||||||
UpdateSlotTable(i);
|
UpdateSlotTable(i);
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ void GCMemcardManager::DeleteFiles()
|
||||||
|
|
||||||
if (!memcard->Save())
|
if (!memcard->Save())
|
||||||
{
|
{
|
||||||
PanicAlertT("File write failed");
|
PanicAlertFmtT("File write failed");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -461,7 +461,7 @@ void GCMemcardManager::FixChecksums()
|
||||||
memcard->FixChecksums();
|
memcard->FixChecksums();
|
||||||
|
|
||||||
if (!memcard->Save())
|
if (!memcard->Save())
|
||||||
PanicAlertT("File write failed");
|
PanicAlertFmtT("File write failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCMemcardManager::CreateNewCard(int slot)
|
void GCMemcardManager::CreateNewCard(int slot)
|
||||||
|
|
|
@ -1601,10 +1601,10 @@ void MenuBar::SearchInstruction()
|
||||||
QString::fromStdString(PPCTables::GetInstructionName(PowerPC::HostRead_U32(addr)));
|
QString::fromStdString(PPCTables::GetInstructionName(PowerPC::HostRead_U32(addr)));
|
||||||
if (op == ins_name)
|
if (op == ins_name)
|
||||||
{
|
{
|
||||||
NOTICE_LOG(POWERPC, "Found %s at %08x", op.toStdString().c_str(), addr);
|
NOTICE_LOG_FMT(POWERPC, "Found {} at {:08x}", op.toStdString(), addr);
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found)
|
if (!found)
|
||||||
NOTICE_LOG(POWERPC, "Opcode %s not found", op.toStdString().c_str());
|
NOTICE_LOG_FMT(POWERPC, "Opcode {} not found", op.toStdString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -427,7 +427,7 @@ void NetPlayDialog::OnStart()
|
||||||
const auto game = FindGameFile(m_current_game_identifier);
|
const auto game = FindGameFile(m_current_game_identifier);
|
||||||
if (!game)
|
if (!game)
|
||||||
{
|
{
|
||||||
PanicAlertT("Selected game doesn't exist in game list!");
|
PanicAlertFmtT("Selected game doesn't exist in game list!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,7 +876,7 @@ void NetPlayDialog::OnMsgStartGame()
|
||||||
if (auto game = FindGameFile(m_current_game_identifier))
|
if (auto game = FindGameFile(m_current_game_identifier))
|
||||||
client->StartGame(game->GetFilePath());
|
client->StartGame(game->GetFilePath());
|
||||||
else
|
else
|
||||||
PanicAlertT("Selected game doesn't exist in game list!");
|
PanicAlertFmtT("Selected game doesn't exist in game list!");
|
||||||
}
|
}
|
||||||
UpdateDiscordPresence();
|
UpdateDiscordPresence();
|
||||||
});
|
});
|
||||||
|
@ -1099,7 +1099,7 @@ void NetPlayDialog::LoadSettings()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WARN_LOG(NETPLAY, "Unknown network mode '%s', using 'fixeddelay'", network_mode.c_str());
|
WARN_LOG_FMT(NETPLAY, "Unknown network mode '{}', using 'fixeddelay'", network_mode);
|
||||||
m_fixed_delay_action->setChecked(true);
|
m_fixed_delay_action->setChecked(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,24 +150,24 @@ public:
|
||||||
|
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
WARN_LOG(COMMON, "Error reading MO file '%s'", filename.c_str());
|
WARN_LOG_FMT(COMMON, "Error reading MO file '{}'", filename);
|
||||||
m_data = {};
|
m_data = {};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 magic = ReadU32(&m_data[0]);
|
const u32 magic = ReadU32(&m_data[0]);
|
||||||
if (magic != MO_MAGIC_NUMBER)
|
if (magic != MO_MAGIC_NUMBER)
|
||||||
{
|
{
|
||||||
ERROR_LOG(COMMON, "MO file '%s' has bad magic number %x\n", filename.c_str(), magic);
|
ERROR_LOG_FMT(COMMON, "MO file '{}' has bad magic number {:x}\n", filename, magic);
|
||||||
m_data = {};
|
m_data = {};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 version_major = ReadU16(&m_data[4]);
|
const u16 version_major = ReadU16(&m_data[4]);
|
||||||
if (version_major > 1)
|
if (version_major > 1)
|
||||||
{
|
{
|
||||||
ERROR_LOG(COMMON, "MO file '%s' has unsupported version number %i", filename.c_str(),
|
ERROR_LOG_FMT(COMMON, "MO file '{}' has unsupported version number {}", filename,
|
||||||
version_major);
|
version_major);
|
||||||
m_data = {};
|
m_data = {};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ static bool TryInstallTranslator(const QString& exact_language_code)
|
||||||
}
|
}
|
||||||
translator->deleteLater();
|
translator->deleteLater();
|
||||||
}
|
}
|
||||||
ERROR_LOG(COMMON, "No suitable translation file found");
|
ERROR_LOG_FMT(COMMON, "No suitable translation file found");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ bool ToggleFullscreen(Display* dpy, Window win)
|
||||||
if (!XSendEvent(dpy, DefaultRootWindow(dpy), False,
|
if (!XSendEvent(dpy, DefaultRootWindow(dpy), False,
|
||||||
SubstructureRedirectMask | SubstructureNotifyMask, &event))
|
SubstructureRedirectMask | SubstructureNotifyMask, &event))
|
||||||
{
|
{
|
||||||
ERROR_LOG(VIDEO, "Failed to switch fullscreen/windowed mode.");
|
ERROR_LOG_FMT(VIDEO, "Failed to switch fullscreen/windowed mode.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ void InhibitScreensaver(Window win, bool suspend)
|
||||||
while (waitpid(pid, &status, 0) == -1)
|
while (waitpid(pid, &status, 0) == -1)
|
||||||
;
|
;
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "Started xdg-screensaver (PID = %d)", (int)pid);
|
INFO_LOG_FMT(VIDEO, "Started xdg-screensaver (PID = {})", pid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ XRRConfiguration::XRRConfiguration(Display* _dpy, Window _win)
|
||||||
if (!XRRQueryVersion(dpy, &XRRMajorVersion, &XRRMinorVersion) ||
|
if (!XRRQueryVersion(dpy, &XRRMajorVersion, &XRRMinorVersion) ||
|
||||||
(XRRMajorVersion < 1 || (XRRMajorVersion == 1 && XRRMinorVersion < 3)))
|
(XRRMajorVersion < 1 || (XRRMajorVersion == 1 && XRRMinorVersion < 3)))
|
||||||
{
|
{
|
||||||
WARN_LOG(VIDEO, "XRRExtension not supported.");
|
WARN_LOG_FMT(VIDEO, "XRRExtension not supported.");
|
||||||
bValid = false;
|
bValid = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ XRRConfiguration::XRRConfiguration(Display* _dpy, Window _win)
|
||||||
fb_width_mm = DisplayWidthMM(dpy, screen);
|
fb_width_mm = DisplayWidthMM(dpy, screen);
|
||||||
fb_height_mm = DisplayHeightMM(dpy, screen);
|
fb_height_mm = DisplayHeightMM(dpy, screen);
|
||||||
|
|
||||||
INFO_LOG(VIDEO, "XRRExtension-Version %d.%d", XRRMajorVersion, XRRMinorVersion);
|
INFO_LOG_FMT(VIDEO, "XRRExtension-Version {}.{}", XRRMajorVersion, XRRMinorVersion);
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,12 +204,12 @@ void XRRConfiguration::Update()
|
||||||
|
|
||||||
if (outputInfo && crtcInfo && fullMode)
|
if (outputInfo && crtcInfo && fullMode)
|
||||||
{
|
{
|
||||||
INFO_LOG(VIDEO, "Fullscreen Resolution %dx%d", fullWidth, fullHeight);
|
INFO_LOG_FMT(VIDEO, "Fullscreen Resolution {}x{}", fullWidth, fullHeight);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ERROR_LOG(VIDEO, "Failed to obtain fullscreen size.\n"
|
ERROR_LOG_FMT(VIDEO, "Failed to obtain fullscreen size.\n"
|
||||||
"Using current desktop resolution for fullscreen.");
|
"Using current desktop resolution for fullscreen.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue