summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-07-16 20:29:46 -0400
committerGitHub <noreply@github.com>2025-07-16 20:29:46 -0400
commit295ae819f5f819e3d4053abeecdeb4ea3f9e1d20 (patch)
treee398323f1a1c42f0bbf91a6942909ff21ce502c3 /Source/Core/Common
parent9f076d4707cdf79c5df3030b6e0b6699ec25fdf5 (diff)
parentfe6fd2279c195517094538fff8667332049823ad (diff)
Merge pull request #13792 from Tilka/wii_banners
WiiSaveBanner: fall back to $userdir/Load/WiiBanners
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/CommonPaths.h1
-rw-r--r--Source/Core/Common/FileUtil.cpp2
-rw-r--r--Source/Core/Common/FileUtil.h1
-rw-r--r--Source/Core/Common/NandPaths.cpp14
-rw-r--r--Source/Core/Common/NandPaths.h1
5 files changed, 18 insertions, 1 deletions
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h
index 0f6b7adfb6..45d60aa435 100644
--- a/Source/Core/Common/CommonPaths.h
+++ b/Source/Core/Common/CommonPaths.h
@@ -89,6 +89,7 @@
#define GRAPHICSMOD_DIR "GraphicMods"
#define WIISDSYNC_DIR "WiiSDSync"
#define ASSEMBLY_DIR "SavedAssembly"
+#define WIIBANNERS_DIR "WiiBanners"
// This one is only used to remove it if it was present
#define SHADERCACHE_LEGACY_DIR "ShaderCache"
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 51a841ddec..c97218c37e 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -881,6 +881,7 @@ static void RebuildUserDirectories(unsigned int dir_index)
s_user_paths[D_RESOURCEPACK_IDX] = s_user_paths[D_USER_IDX] + RESOURCEPACK_DIR DIR_SEP;
s_user_paths[D_DYNAMICINPUT_IDX] = s_user_paths[D_LOAD_IDX] + DYNAMICINPUT_DIR DIR_SEP;
s_user_paths[D_GRAPHICSMOD_IDX] = s_user_paths[D_LOAD_IDX] + GRAPHICSMOD_DIR DIR_SEP;
+ s_user_paths[D_BANNERS_WIIROOT_IDX] = s_user_paths[D_LOAD_IDX] + WIIBANNERS_DIR DIR_SEP;
s_user_paths[D_WIISDCARDSYNCFOLDER_IDX] = s_user_paths[D_LOAD_IDX] + WIISDSYNC_DIR DIR_SEP;
s_user_paths[F_DOLPHINCONFIG_IDX] = s_user_paths[D_CONFIG_IDX] + DOLPHIN_CONFIG;
s_user_paths[F_GCPADCONFIG_IDX] = s_user_paths[D_CONFIG_IDX] + GCPAD_CONFIG;
@@ -972,6 +973,7 @@ static void RebuildUserDirectories(unsigned int dir_index)
s_user_paths[D_RIIVOLUTION_IDX] = s_user_paths[D_LOAD_IDX] + RIIVOLUTION_DIR DIR_SEP;
s_user_paths[D_DYNAMICINPUT_IDX] = s_user_paths[D_LOAD_IDX] + DYNAMICINPUT_DIR DIR_SEP;
s_user_paths[D_GRAPHICSMOD_IDX] = s_user_paths[D_LOAD_IDX] + GRAPHICSMOD_DIR DIR_SEP;
+ s_user_paths[D_BANNERS_WIIROOT_IDX] = s_user_paths[D_LOAD_IDX] + WIIBANNERS_DIR DIR_SEP;
break;
}
}
diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h
index a887ffd8f3..00d20b29b2 100644
--- a/Source/Core/Common/FileUtil.h
+++ b/Source/Core/Common/FileUtil.h
@@ -76,6 +76,7 @@ enum
D_GPU_DRIVERS_HOOKS,
D_GPU_DRIVERS_FILE_REDIRECT,
D_ASM_ROOT_IDX,
+ D_BANNERS_WIIROOT_IDX,
FIRST_FILE_USER_PATH_IDX,
F_DOLPHINCONFIG_IDX = FIRST_FILE_USER_PATH_IDX,
F_GCPADCONFIG_IDX,
diff --git a/Source/Core/Common/NandPaths.cpp b/Source/Core/Common/NandPaths.cpp
index db2c2f0cf3..aa44b91714 100644
--- a/Source/Core/Common/NandPaths.cpp
+++ b/Source/Core/Common/NandPaths.cpp
@@ -19,7 +19,19 @@ namespace Common
{
std::string RootUserPath(FromWhichRoot from)
{
- int idx = from == FromWhichRoot::Configured ? D_WIIROOT_IDX : D_SESSION_WIIROOT_IDX;
+ int idx{};
+ switch (from)
+ {
+ case FromWhichRoot::Configured:
+ idx = D_WIIROOT_IDX;
+ break;
+ case FromWhichRoot::Session:
+ idx = D_SESSION_WIIROOT_IDX;
+ break;
+ case FromWhichRoot::Banners:
+ idx = D_BANNERS_WIIROOT_IDX;
+ break;
+ }
std::string dir = File::GetUserPath(idx);
dir.pop_back(); // remove trailing path separator
return dir;
diff --git a/Source/Core/Common/NandPaths.h b/Source/Core/Common/NandPaths.h
index dd27b904b6..fa59e73da8 100644
--- a/Source/Core/Common/NandPaths.h
+++ b/Source/Core/Common/NandPaths.h
@@ -14,6 +14,7 @@ enum class FromWhichRoot
{
Configured, // not related to currently running game - use D_WIIROOT_IDX
Session, // request from currently running game - use D_SESSION_WIIROOT_IDX
+ Banners, // fallback for Wii savegame banners - use D_BANNERS_WIIROOT_IDX
};
std::string RootUserPath(FromWhichRoot from);