diff --git a/.travis-build.sh b/.travis-build.sh index 08a72dc51..6aa99644e 100755 --- a/.travis-build.sh +++ b/.travis-build.sh @@ -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 diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 8adbcfe86..eb93610ff 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -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: Dumping System " + "Archives and the Shared Fonts from a 3DS Console.")); +#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; } diff --git a/src/core/core.cpp b/src/core/core.cpp index 302769f97..5b70e777b 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -208,7 +208,7 @@ void System::Shutdown() { } void System::SystemIntegrityCheck() { - + system_integrity = static_cast(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(system_integrity | Integrity::SharedFont); #ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES file = std::make_shared(shared_font_path, "w+b"); file->WriteBytes(SHARED_FONT_DATA, SHARED_FONT_DATA_len); diff --git a/src/core/core.h b/src/core/core.h index 0ae1d5d67..2c01d5411 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -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 = ""; };