aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/control_metadata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [file_sys] Avoid crash on empty NACP language entries (#4062)bdm1102026-06-051-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an Android game library scan crash when reading XCI title metadata with empty or incomplete NACP language entries. Previously, NACP::GetLanguageEntry() could fall back to: language_entries.at(static_cast<u8>(Language::AmericanEnglish)) When language_entries was empty, this threw std::out_of_range and aborted the Android scan thread. The new fallback preserves the existing lookup order: 1. preferred language entry with non-empty application name 2. any entry with non-empty application name 3. first available entry 4. static empty LanguageEntry if no entries exist Tested locally with a Mainline RelWithDebInfo APK on Odin3 Android 15 using a large external TF-card ROM directory. The previous build crashed during fresh ROM scan; the patched build completes scanning normally. Related my issue: https://github.com/eden-emulator/Issue-Reports/issues/500 Co-authored-by: bdm110 <bdm110@prontmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4062 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [core] Fix language index mismatches (#3629)crueter2026-02-251-1/+28
| | | | | | | | | | | | | | | For reasons I am not knowledgeable enough to answer, NACP language and nn::settings::Language don't match. PR #3587 however erroneously matched language_index directly to NACP language which caused those weird mismatches (since idx 2 = French actually matches up to an NACP language of Japanese). So to get around that just go back to the mapping of language idx -> nacp language Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3629 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev>
* [file_sys] Check if language_entry is empty (#3619)DraVee2026-02-231-2/+3
| | | | | | | | | * fixup to #3587 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3619 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: DraVee <dravee@eden-emu.dev> Co-committed-by: DraVee <dravee@eden-emu.dev>
* [common, hle] add new updates Polish+Thai languages (#3587)lizzie2026-02-231-99/+58
| | | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3587 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: DraVee <dravee@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [file_sys] added packed language entries support (#3585)xbzk2026-02-201-0/+75
| | | | | | | | | | | | | | | | | | | Normally, language_entries contained plain UTF-8 names. In BotW v1.9.0, that title block is no longer directly readable as old UTF-8, so we were parsing binary data as text and going nuts. ... In patch_manager.cpp (ParseControlNCA), I added a validity check: If update title text is unreadable, we keep update metadata but copy only the base language_entries block (0x0000..0x2FFF) so the game name is valid again. UPDATE: managed to decode the new language entries is a raw headerless zlib deflate. added support for proper detection and inflation. Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3585 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: xbzk <xbzk@eden-emu.dev> Co-committed-by: xbzk <xbzk@eden-emu.dev>
* [tests] fix compile+linking issues with PlayTime (#3345)lizzie2026-01-191-1/+1
| | | | | | | | | | | | | fixes linking + comp issues but not the test themselves, who have now became invalid Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: DraVee <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3345 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [core/hle] Adds sorting game titles and prevents hard crashes in qlaunch (#3330)Maufeat2026-01-191-0/+11
| | | | | | | | | | | Adds correct sorting in qlaunch (tested with FW 19 and FW20-21) Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3330 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* vfs: Move vfs files to their own directoryFearlessTobi2024-01-251-1/+1
|
* configure_system: Implement with for looplat9nq2023-07-211-1/+2
|
* Update Chinese NX language namesKeve12272023-06-031-6/+6
| | | | ... as per the TLoZ: TotK icon files. Would this conflict with older games?
* file_sys: Priority display of game titles in the current languageFengChen2022-10-241-9/+34
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* file_sys: control_metadata: Add BrazilianPortugueseMorph2021-10-281-1/+2
|
* pctl: Rework how pctl works to be more accurateChloe Marcec2021-03-271-0/+8
| | | | Introduces the usage of compatibilities to allow it the module to be closer to how it works on hardware.
* file_sys: Replace inclusions with forward declarations where applicableLioncash2020-08-231-0/+1
| | | | Same behavior, minus unnecessary inclusions where not necessary.
* file_sys: control_metadata: Expose device_save_data_size.bunnei2020-05-111-0/+4
|
* Addressed issuesDavid Marcec2019-06-171-1/+1
|
* Impl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & ↵David Marcec2019-06-161-0/+4
| | | | | | Partial impl of GetAccumulatedSuspendedTickChangedEvent IPC-100 was changed to InitializeApplicationInfoOld instead of InitializeApplicationInfo. IPC-150 makes an indentical call to IPC-100 however does extra processing. They should not have the same name as it's quite confusing to debug.
* Implement IApplicationFunctions::GetDesiredLanguageMichael Scire2019-05-231-0/+4
|
* file_sys/control_metadata: Amend naming of membersLioncash2019-04-031-3/+3
| | | | | | | | | | | Quite a bit of these were out of sync with Switchbrew (and in some cases entirely wrong). While we're at it, also expand the section of named members. A segment within the control metadata is used to specify maximum values for the user, device, and cache storage max sizes and journal sizes. These appear to be generally used by the am service (e.g. in CreateCacheStorage, etc).
* am: Implement GetSaveDataSize and ExtendSaveDataZach Hilman2018-12-271-1/+1
| | | These functions come in a pair and are needed by Smash Ultimate, Minecraft, and Skyrim, amongst others.
* control_metadata: Update NACP fields with latest Switchbrew dataZach Hilman2018-12-271-0/+8
|
* control_metadata: Use value member instead of unique_ptr to store structZach Hilman2018-12-271-9/+11
| | | Serves no actual purpose in this instance besides making NACP's copy assignment deleted, which is not intended behavior.
* control_metadata: Correct typo in language name (Portugese -> Portuguese)Lioncash2018-11-271-7/+17
| | | | | | | | | While we're at it, organize the array linearly, since clang formats the array elements quite wide length-wise with the addition of the missing 'u'. Technically also fixes patch lookup and icon lookup with Portuguese, though I doubt anyone has actually run into this issue.
* control_metadata: Add GetRawBytes function to NACPZach Hilman2018-10-291-0/+6
| | | | Returns the raw bytes of the NACP file. Needed for GetApplicationControlData which returns the raw, unprocessed NACP to the game.
* file_sys/control_metadata: Get rid of magic constantsLioncash2018-10-151-3/+6
| | | | | These are just the size of the data being passed in, so we can specify that via the size() member function.
* aoc: Read DLC base title ID from RegisteredCacheZach Hilman2018-10-141-0/+4
| | | Falls back to title ID + 0x1000, which is what HOS does.
* Merge pull request #1364 from lioncash/contentbunnei2018-09-201-0/+2
|\ | | | | file-sys: Default heavy-weight class destructors in the cpp file
| * file-sys: Default heavy-weight class destructors in the cpp fileLioncash2018-09-191-0/+2
| | | | | | | | | | | | | | | | | | | | Several classes have a lot of non-trivial members within them, or don't but likely should have the destructor defaulted in the cpp file for future-proofing/being more friendly to forward declarations. Leaving the destructor unspecified allows the compiler to inline the destruction code all over the place, which is generally undesirable from a code bloat perspective.
* | control_metadata: Remove unnecessary else within GetLanguageEntry()Lioncash2018-09-191-8/+8
| | | | | | | | | | There's no need to indent the code here, given the if case contains a return statement at the end of it.
* | control_metadata: Move language name array definition to the cpp fileLioncash2018-09-191-0/+8
|/ | | | | | | This was used in two different translation units (deconstructed_rom_directory and patch_manager). This means we'd be pointlessly duplicating the whole array twice due to it being defined within the header.
* control_metadata: Use alternate language names if AmericanEnglish isn't ↵Zach Hilman2018-09-041-1/+11
| | | | available
* control_metadata: Remove unnecessary reference to base fileZach Hilman2018-08-111-1/+1
|
* NRO Assets and NACP file formatZach Hilman2018-07-231-0/+42
Cleanup Review fixes