summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2022-02-18 21:40:09 +0100
committerGitHub <noreply@github.com>2022-02-18 21:40:09 +0100
commitbb7475ee2a9f1bb300283b413b75054a523b02bf (patch)
treebdee8e92e9a9792542ae6a52d57d04bb28748061 /Source/Core
parent0c781674040435855aa923036db21eb1ecfe93e4 (diff)
parent5e4d1f732db7f2ef397c55ba8fadbbf2975c6bbe (diff)
Merge pull request #10429 from Zopolis4/mapurge
Remove the Maps folder from the Sys directory
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Boot/Boot.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp
index 30691c730f..0ad7f6ec12 100644
--- a/Source/Core/Core/Boot/Boot.cpp
+++ b/Source/Core/Core/Boot/Boot.cpp
@@ -362,24 +362,17 @@ void CBoot::UpdateDebugger_MapLoaded()
bool CBoot::FindMapFile(std::string* existing_map_file, std::string* writable_map_file)
{
const std::string& game_id = SConfig::GetInstance().m_debugger_game_id;
+ std::string path = File::GetUserPath(D_MAPS_IDX) + game_id + ".map";
if (writable_map_file)
- *writable_map_file = File::GetUserPath(D_MAPS_IDX) + game_id + ".map";
+ *writable_map_file = path;
- static const std::array<std::string, 2> maps_directories{
- File::GetUserPath(D_MAPS_IDX),
- File::GetSysDirectory() + MAPS_DIR DIR_SEP,
- };
- for (const auto& directory : maps_directories)
+ if (File::Exists(path))
{
- std::string path = directory + game_id + ".map";
- if (File::Exists(path))
- {
- if (existing_map_file)
- *existing_map_file = std::move(path);
+ if (existing_map_file)
+ *existing_map_file = std::move(path);
- return true;
- }
+ return true;
}
return false;