mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-29 18:40:05 +00:00
Merge pull request #4143 from zhaowenlan1779/shared-font-text-fix
core, citra_qt: unify status of system archives and shared fonts
This commit is contained in:
commit
eca98eeb3e
@ -1402,14 +1402,15 @@ void GMainWindow::UpdateStatusBar() {
|
|||||||
void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string details) {
|
void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string details) {
|
||||||
QMessageBox::StandardButton answer;
|
QMessageBox::StandardButton answer;
|
||||||
QString status_message;
|
QString status_message;
|
||||||
|
|
||||||
|
QString title, message;
|
||||||
|
if (result == Core::System::ResultStatus::ErrorSystemFiles) {
|
||||||
const QString common_message =
|
const QString common_message =
|
||||||
tr("%1 is missing. Please <a "
|
tr("%1 is missing. Please <a "
|
||||||
"href='https://citra-emu.org/wiki/"
|
"href='https://citra-emu.org/wiki/"
|
||||||
"dumping-system-archives-and-the-shared-fonts-from-a-3ds-console/'>dump your "
|
"dumping-system-archives-and-the-shared-fonts-from-a-3ds-console/'>dump your "
|
||||||
"system archives</a>.<br/>Continuing emulation may result in crashes and bugs.");
|
"system archives</a>.<br/>Continuing emulation may result in crashes and bugs.");
|
||||||
QString title, message;
|
|
||||||
switch (result) {
|
|
||||||
case Core::System::ResultStatus::ErrorSystemFiles: {
|
|
||||||
if (!details.empty()) {
|
if (!details.empty()) {
|
||||||
message = common_message.arg(QString::fromStdString(details));
|
message = common_message.arg(QString::fromStdString(details));
|
||||||
} else {
|
} else {
|
||||||
@ -1418,18 +1419,7 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string det
|
|||||||
|
|
||||||
title = tr("System Archive Not Found");
|
title = tr("System Archive Not Found");
|
||||||
status_message = "System Archive Missing";
|
status_message = "System Archive Missing";
|
||||||
break;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
case Core::System::ResultStatus::ErrorSharedFont: {
|
|
||||||
message = tr("Shared fonts not found. ");
|
|
||||||
message.append(common_message);
|
|
||||||
title = tr("Shared Fonts Not Found");
|
|
||||||
status_message = "Shared Font Missing";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
title = tr("Fatal Error");
|
title = tr("Fatal Error");
|
||||||
message =
|
message =
|
||||||
tr("A fatal error occured. "
|
tr("A fatal error occured. "
|
||||||
@ -1437,7 +1427,6 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string det
|
|||||||
"the log</a> for details."
|
"the log</a> for details."
|
||||||
"<br/>Continuing emulation may result in crashes and bugs.");
|
"<br/>Continuing emulation may result in crashes and bugs.");
|
||||||
status_message = "Fatal Error encountered";
|
status_message = "Fatal Error encountered";
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox message_box;
|
QMessageBox message_box;
|
||||||
|
@ -50,7 +50,6 @@ public:
|
|||||||
ErrorLoader_ErrorInvalidFormat, ///< Error loading the specified application due to an
|
ErrorLoader_ErrorInvalidFormat, ///< Error loading the specified application due to an
|
||||||
/// invalid format
|
/// invalid format
|
||||||
ErrorSystemFiles, ///< Error in finding system files
|
ErrorSystemFiles, ///< Error in finding system files
|
||||||
ErrorSharedFont, ///< Error in finding shared font
|
|
||||||
ErrorVideoCore, ///< Error in the video core
|
ErrorVideoCore, ///< Error in the video core
|
||||||
ErrorVideoCore_ErrorGenericDrivers, ///< Error in the video core due to the user having
|
ErrorVideoCore_ErrorGenericDrivers, ///< Error in the video core due to the user having
|
||||||
/// generic drivers installed
|
/// generic drivers installed
|
||||||
|
@ -204,7 +204,8 @@ void Module::Interface::GetSharedFont(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push<u32>(-1); // TODO: Find the right error code
|
rb.Push<u32>(-1); // TODO: Find the right error code
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
rb.PushCopyObjects<Kernel::Object>(nullptr);
|
rb.PushCopyObjects<Kernel::Object>(nullptr);
|
||||||
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSharedFont);
|
Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSystemFiles,
|
||||||
|
"Shared fonts");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user