eden/src/qt_common
crueter badd913bee
[desktop] fix save data location, orphaned profiles finder (#2678)
Previously, if the user had their NAND in a nonstandard location,
profiles.dat would be read from the standard Eden path and thus return
effectively garbage data. What this would result in is:

- The Qt profile manager would be completely nonfunctional
- "Open Save Data Location" would put you into the completely wrong
  place
- Games would read from incorrect locations for their saves

To solve this, I made it so that profiles.dat is re-read *after*
QtConfig initializes. It's not the perfect solution, but it works.

Additionally, this adds an orphaned profiles finder:
- walks through the save folders in nand/user/save/000.../
- for each subdirectory, checks to see if profiles.dat contains a
  corresponding UUID
- If not, the profile is "orphaned". It may contain legit save data, so
  let the user decide how to handle it (famous last words)
- Empty profiles are just removed. If they really matter, they're
  instantly recreated anyways.

The orphaned profiles check runs right *after* the decryption keys
check, but before the game list ever gets populated

Signed-off-by: crueter <crueter@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2678
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2025-10-07 01:32:09 +02:00
..
externals [cmake] update CI deps, feat: sirit CI + new CI spec (#2655) 2025-10-04 09:27:13 +02:00
CMakeLists.txt [cmake] update CI deps, feat: sirit CI + new CI spec (#2655) 2025-10-04 09:27:13 +02:00
qt_applet_util.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_applet_util.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_common.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_common.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_config.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_config.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_content_util.cpp [desktop] fix save data location, orphaned profiles finder (#2678) 2025-10-07 01:32:09 +02:00
qt_content_util.h [desktop] fix save data location, orphaned profiles finder (#2678) 2025-10-07 01:32:09 +02:00
qt_frontend_util.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_frontend_util.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_game_util.cpp [desktop] fix save data location, orphaned profiles finder (#2678) 2025-10-07 01:32:09 +02:00
qt_game_util.h [desktop] fix save data location, orphaned profiles finder (#2678) 2025-10-07 01:32:09 +02:00
qt_meta.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_meta.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_path_util.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_path_util.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_progress_dialog.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_progress_dialog.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_rom_util.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
qt_rom_util.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
shared_translation.cpp [frontend] add 1.25x resolution option (#2566) 2025-10-06 03:08:00 +02:00
shared_translation.h [vk, opengl] add lanczo and spline-1 filtering (#2534) 2025-09-22 17:34:55 +02:00
uisettings.cpp [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00
uisettings.h [qt] refactor: qt_common lib (#94) 2025-09-15 17:21:18 +02:00