aboutsummaryrefslogtreecommitdiff
path: root/src/qt_common/util/mod.cpp
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2026-06-02 04:08:09 +0200
committercrueter <crueter@eden-emu.dev>2026-06-02 04:08:09 +0200
commit27189f39d2bf78c924475ac6ea2a79c3d6ec6d8a (patch)
tree974ff4827878132aed0a6f3ef95a2ac64f8f8445 /src/qt_common/util/mod.cpp
parent683e6249c3cd53f5107008fc54818d841e4bfb8d (diff)
[desktop] Prefer extracred folder name over zip name for non-Atmosphere zip mods (#4043)
e.g. Serfrost's Defogger will now be named "Serfrosts Defogger" by default, instead of "serfrosts_base_defogger_v2-4" Note that for atmosphere mods it still uses the zip folder name, since otherwise their default name will just be the game's Title ID. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4043 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/qt_common/util/mod.cpp')
-rw-r--r--src/qt_common/util/mod.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qt_common/util/mod.cpp b/src/qt_common/util/mod.cpp
index 3e75cb21fa..c09b39cf82 100644
--- a/src/qt_common/util/mod.cpp
+++ b/src/qt_common/util/mod.cpp
@@ -33,10 +33,13 @@ QStringList GetModFolders(const QString& root, const QString& fallbackName) {
std_path = paths[0];
QString default_name;
- if (!fallbackName.isEmpty())
- default_name = fallbackName;
- else if (!paths.empty())
+
+ // If this is an atmosphere-packed mod, the default name will end up as the game's title ID.
+ // So in this case ignore it and use the zip name instead
+ if (!paths.empty() && std_path.string().find("atmosphere") == std::string::npos)
default_name = QString::fromStdString(std_path.filename().string());
+ else if (!fallbackName.isEmpty())
+ default_name = fallbackName;
else
default_name = root.split(QLatin1Char('/')).last();