aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2025-10-27 11:25:42 +0100
committercrueter <crueter@eden-emu.dev>2025-10-27 11:25:42 +0100
commit903faacaab82d9decba4856444680ab70d8012d6 (patch)
tree98a6192b1c277aa2a323ddb2061dd2b8d3753945 /src
parentc713d44c8873c29cce7d6d5203a6d5776893d892 (diff)
[qt] clarify orphaned profiles by showing GOOD uuids (#2850)
Shows what profile UUIDs are actually good so the user knows which one to copy their saves to. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2850 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp9
-rw-r--r--src/core/hle/service/acc/profile_manager.h1
-rw-r--r--src/qt_common/util/content.cpp17
3 files changed, 24 insertions, 3 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index 12ea5f7aa1..4f58593288 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -488,7 +488,7 @@ void ProfileManager::ResetUserSaveFile()
ParseUserSaveFile();
}
-std::vector<std::string> ProfileManager::FindOrphanedProfiles()
+std::vector<std::string> ProfileManager::FindGoodProfiles()
{
std::vector<std::string> good_uuids;
@@ -512,6 +512,13 @@ std::vector<std::string> ProfileManager::FindOrphanedProfiles()
// used for acnh, etc
good_uuids.emplace_back("00000000000000000000000000000000");
+ return good_uuids;
+}
+
+std::vector<std::string> ProfileManager::FindOrphanedProfiles()
+{
+ std::vector<std::string> good_uuids = FindGoodProfiles();
+
// TODO: fetch save_id programmatically
const auto path = Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir)
/ "user/save/0000000000000000";
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h
index b164ed011a..9c91fcde41 100644
--- a/src/core/hle/service/acc/profile_manager.h
+++ b/src/core/hle/service/acc/profile_manager.h
@@ -105,6 +105,7 @@ public:
void ResetUserSaveFile();
+ std::vector<std::string> FindGoodProfiles();
std::vector<std::string> FindOrphanedProfiles();
private:
diff --git a/src/qt_common/util/content.cpp b/src/qt_common/util/content.cpp
index f7487ac36f..4360efeef0 100644
--- a/src/qt_common/util/content.cpp
+++ b/src/qt_common/util/content.cpp
@@ -330,6 +330,7 @@ void FixProfiles()
// TODO: better solution
system->GetProfileManager().ResetUserSaveFile();
std::vector<std::string> orphaned = system->GetProfileManager().FindOrphanedProfiles();
+ std::vector<std::string> good = system->GetProfileManager().FindGoodProfiles();
// no orphaned dirs--all good :)
if (orphaned.empty())
@@ -346,15 +347,27 @@ void FixProfiles()
qorphaned = qorphaned % QStringLiteral("\n") % QString::fromStdString(s);
}
+ QString qgood;
+
+ // max. of 8 good profiles is fair, I think
+ // 33 = 32 (UUID) + 1 (\n)
+ qgood.reserve(8 * 33);
+
+ for (const std::string& s : good) {
+ qgood = qgood % QStringLiteral("\n") % QString::fromStdString(s);
+ }
+
QtCommon::Frontend::Critical(
tr("Orphaned Profiles Detected!"),
tr("UNEXPECTED BAD THINGS MAY HAPPEN IF YOU DON'T READ THIS!\n"
"Eden has detected the following save directories with no attached profile:\n"
"%1\n\n"
+ "The following profiles are valid:\n"
+ "%2\n\n"
"Click \"OK\" to open your save folder and fix up your profiles.\n"
- "Hint: copy the contents of the largest or last-modified folder elsewhere, "
+ "Hint: copy the contents of the largest or last-modified folder elsewhere, "
"delete all orphaned profiles, and move your copied contents to the good profile.")
- .arg(qorphaned));
+ .arg(qorphaned, qgood));
QtCommon::Game::OpenSaveFolder();
}