mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 17:10:10 +00:00
CustomShardFont: Error Popup if a custom shared font was generated
This commit is contained in:
parent
ce1f25d133
commit
4c06dd953a
@ -52,7 +52,7 @@ elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. make .. -GXcode -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1
|
||||
cmake .. -GXcode -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1
|
||||
xcodebuild -configuration Release
|
||||
|
||||
ctest -VV -C Release
|
||||
|
@ -421,6 +421,22 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Core::System::Integrity integrity = system.GetSystemIntegrity();
|
||||
if (integrity && Core::System::Integrity::SharedFont) {
|
||||
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
||||
QMessageBox::critical(
|
||||
this, tr("Shared Font Created."),
|
||||
tr("The Shared Font is missing. A custom Shared Font was created. This could result in "
|
||||
"some ugly or wrong glyphs. It is recomended to dump the Shared Font from your 3ds. "
|
||||
"For more information on dumping these files, please see the "
|
||||
"following wiki page: <a "
|
||||
"href='https://citra-emu.org/wiki/"
|
||||
"dumping-system-archives-and-the-shared-fonts-from-a-3ds-console/'>Dumping System "
|
||||
"Archives and the Shared Fonts from a 3DS Console</a>."));
|
||||
#endif
|
||||
// Don't show an error meassage if the Shared Font is missing. This Message will popup
|
||||
// anyway if the game requires it
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ void System::Shutdown() {
|
||||
}
|
||||
|
||||
void System::SystemIntegrityCheck() {
|
||||
|
||||
system_integrity = static_cast<Integrity>(0);
|
||||
// Shared Font
|
||||
// TODO(B3N30): check/create font archive for region CHN/KOR/TWN
|
||||
std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);
|
||||
@ -228,8 +228,10 @@ void System::SystemIntegrityCheck() {
|
||||
if (file->IsOpen()) {
|
||||
file->Close();
|
||||
LOG_INFO(Core, "SystemCheck: Shared Font(legacy) exists.");
|
||||
return true;
|
||||
} else {
|
||||
LOG_ERROR(Core, "SystemCheck: Shared Font missing.");
|
||||
system_integrity = static_cast<Integrity>(system_integrity | Integrity::SharedFont);
|
||||
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
||||
file = std::make_shared<FileUtil::IOFile>(shared_font_path, "w+b");
|
||||
file->WriteBytes(SHARED_FONT_DATA, SHARED_FONT_DATA_len);
|
||||
|
@ -43,6 +43,10 @@ public:
|
||||
ErrorUnknown ///< Any other error
|
||||
};
|
||||
|
||||
enum Integrity : u32 {
|
||||
SharedFont = 1 << 0,
|
||||
};
|
||||
|
||||
/**
|
||||
* Run the core CPU loop
|
||||
* This function runs the core for the specified number of CPU instructions before trying to
|
||||
@ -116,6 +120,10 @@ public:
|
||||
return status_details;
|
||||
}
|
||||
|
||||
const Integrity GetSystemIntegrity() const {
|
||||
return system_integrity;
|
||||
}
|
||||
|
||||
Loader::AppLoader& GetAppLoader() const {
|
||||
return *app_loader;
|
||||
}
|
||||
@ -150,6 +158,9 @@ private:
|
||||
|
||||
static System s_instance;
|
||||
|
||||
/// Integrity of the system
|
||||
Integrity system_integrity;
|
||||
|
||||
ResultStatus status = ResultStatus::Success;
|
||||
std::string status_details = "";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user