[fs] share parent resources with bundled programs (#4319)

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Normal games are Applications;
Bundled games are Application + Programs;

We've been treating both as the same thing, calling both programs, and making programs unable to see settings and saves from application.

References:
https://switchbrew.org/wiki/Filesystem_services
https://switchbrew.org/wiki/NCM_services#ApplicationId
https://switchbrew.org/wiki/Super_Mario_3D_All-Stars
Ryujinx.HLE/HOS/ApplicationLoader.cs:GetMultiProgramInfo

UPDATE:

The first version was a big rework to make AppId/ProgId concepts proper, and it was successful in most tests, but it caused a regression with applets, which are programs that breed straight from no application.
In order to simplify things i've reverted all the rework, added a helper to identify whether a program has a parent Application and bounded it to it's proper stores.

Although this is no big deal coz it doesn't have impact on emulation, it permeates to several routines, so it needs to be tested broadly. Applets, Normal games, Bundled games, Blobbed NSPs/XCIs, Mods, Updates, Saves, DLCs,.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4319
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
xbzk
2026-09-18 23:48:35 +02:00
committed by crueter
parent 0ce29be608
commit 3c38afad74
6 changed files with 91 additions and 26 deletions
+2
View File
@@ -100,6 +100,8 @@ public:
std::optional<TitleType> title_type = {}, std::optional<ContentRecordType> record_type = {},
std::optional<u64> title_id = {}) const = 0;
[[nodiscard]] std::optional<u64> GetParentApplicationId(u64 program_id) const;
protected:
// A single instance of KeyManager to be used by GetEntry()
Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::Instance();