summaryrefslogtreecommitdiff
path: root/Source/Core/Common/NandPaths.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2025-06-15 11:13:18 +0100
committerTillmann Karras <tilkax@gmail.com>2025-07-04 23:15:50 +0100
commitfe6fd2279c195517094538fff8667332049823ad (patch)
tree3590fb4e7625615b9b09bf82a1ed1dacf4ff8d57 /Source/Core/Common/NandPaths.cpp
parenta5e85caf0af66fec07b476718a69519b06e6a69f (diff)
WiiSaveBanner: fall back to $userdir/Load/WiiBanners
Unlike custom banners which work as an override, this mechanism works as a fallback. The use case is if you have games you don't really play but want to keep around for testing purposes without filling up your NAND with lots of saves. For ease of use, the directory structure is the same but only title/$title_hi/$title_lo/data/banner.bin files are relevant.
Diffstat (limited to 'Source/Core/Common/NandPaths.cpp')
-rw-r--r--Source/Core/Common/NandPaths.cpp14
1 files changed, 13 insertions, 1 deletions
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;