diff options
| author | JMC47 <JMC4789@gmail.com> | 2022-02-11 06:27:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-11 06:27:43 -0500 |
| commit | 9d69ca88509f854af0dde63cc17ffd53a9aeedf5 (patch) | |
| tree | 2f30b4f46d428322c442d2015d89628c076de81a /Source/Core | |
| parent | 30a9777c5afa1e8cb32d4cf919ce30d240372efb (diff) | |
| parent | a3f5d09a5429464a127f9adfab40ce5b7ea5ff25 (diff) | |
Merge pull request #10386 from JosJuice/gba-save-dir-cond
Don't create GBA saves dir when building without mGBA
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Config/MainSettings.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Core/Config/MainSettings.h | 2 | ||||
| -rw-r--r-- | Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/UICommon/UICommon.cpp | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index 4e921ff74c..506663b9ec 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -309,6 +309,7 @@ void SetIsoPaths(const std::vector<std::string>& paths) // Main.GBA +#ifdef HAS_LIBMGBA const Info<std::string> MAIN_GBA_BIOS_PATH{{System::Main, "GBA", "BIOS"}, ""}; const std::array<Info<std::string>, 4> MAIN_GBA_ROM_PATHS{ Info<std::string>{{System::Main, "GBA", "Rom1"}, ""}, @@ -318,6 +319,7 @@ const std::array<Info<std::string>, 4> MAIN_GBA_ROM_PATHS{ const Info<std::string> MAIN_GBA_SAVES_PATH{{System::Main, "GBA", "SavesPath"}, ""}; const Info<bool> MAIN_GBA_SAVES_IN_ROM_PATH{{System::Main, "GBA", "SavesInRomPath"}, false}; const Info<bool> MAIN_GBA_THREADS{{System::Main, "GBA", "Threads"}, true}; +#endif // Main.Network diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index ef618b3314..cec5cf45b7 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -180,11 +180,13 @@ void SetIsoPaths(const std::vector<std::string>& paths); // Main.GBA +#ifdef HAS_LIBMGBA extern const Info<std::string> MAIN_GBA_BIOS_PATH; extern const std::array<Info<std::string>, 4> MAIN_GBA_ROM_PATHS; extern const Info<std::string> MAIN_GBA_SAVES_PATH; extern const Info<bool> MAIN_GBA_SAVES_IN_ROM_PATH; extern const Info<bool> MAIN_GBA_THREADS; +#endif // Main.Network diff --git a/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp index e577050597..b4a41baab9 100644 --- a/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp @@ -139,10 +139,12 @@ public: layer->Set(Config::SESSION_GCI_FOLDER_CURRENT_GAME_ONLY, true); } +#ifdef HAS_LIBMGBA for (size_t i = 0; i < m_settings.m_GBARomPaths.size(); ++i) { layer->Set(Config::MAIN_GBA_ROM_PATHS[i], m_settings.m_GBARomPaths[i]); } +#endif // Check To Override Client's Cheat Codes if (m_settings.m_SyncCodes && !m_settings.m_IsHosting) diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp index a5f0721251..1e6aa4bbb9 100644 --- a/Source/Core/UICommon/UICommon.cpp +++ b/Source/Core/UICommon/UICommon.cpp @@ -91,9 +91,11 @@ static void InitCustomPaths() CreateResourcePackPath(Config::Get(Config::MAIN_RESOURCEPACK_PATH)); CreateWFSPath(Config::Get(Config::MAIN_WFS_PATH)); File::SetUserPath(F_WIISDCARD_IDX, Config::Get(Config::MAIN_SD_PATH)); +#ifdef HAS_LIBMGBA File::SetUserPath(F_GBABIOS_IDX, Config::Get(Config::MAIN_GBA_BIOS_PATH)); File::SetUserPath(D_GBASAVES_IDX, Config::Get(Config::MAIN_GBA_SAVES_PATH)); File::CreateFullPath(File::GetUserPath(D_GBASAVES_IDX)); +#endif } void Init() |
