aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/FileSystem/Content/ContentManager.cs
AgeCommit message (Collapse)Author
2022-03-22hle: Some cleanup (#3210)1.1.83Ac_K
* hle: Some cleanup This PR cleaned up a bit the HLE folder and the VirtualFileSystem one, since we use LibHac, we can use some class of it directly instead of duplicate things. The "Content" of VFS folder is removed since it should be handled in the NCM service directly. A larger cleanup should be done later since there is still be duplicated code here and there. * Fix Headless.SDL2 * Addresses gdkchan feedback
2022-02-13Use Enum and Delegate.CreateDelegate generic overloads (#3111)1.1.27Berkan Diler
* Use Enum generic overloads * Remove EnumExtensions.cs * Use Delegate.CreateDelegate generic overloads
2022-01-13ssl: Implement SSL connectivity (#2961)Mary
* implement certain servicessl functions * ssl: Implement more of SSL connection and abstract it This adds support to non blocking SSL operations and unlink the SSL implementation from the IPC logic. * Rename SslDefaultSocketConnection to SslManagedSocketConnection * Fix regression on Pokemon TV * Address gdkchan's comment * Simplify value read from previous commit * ssl: some changes - Implement builtin certificates parsing and retrieving - Fix issues with SSL version handling - Improve managed SSL socket error handling - Ensure to only return a certificate on DoHandshake when actually requested * Add missing BuiltInCertificateManager initialization call * Address gdkchan's comment * Address Ack's comment Co-authored-by: InvoxiPlayGames <webmaster@invoxiplaygames.uk>
2022-01-12Update to LibHac 0.15.0 (#2986)Alex Barney
2021-12-23Update to LibHac v0.14.3 (#2925)Alex Barney
* Update to LibHac v0.14.3 * Fix loading NCAs that don't have a data partition
2021-09-15hos: Cleanup the project (#2634)Ac_K
* hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol
2021-08-12Update to LibHac 0.13.1 (#2475)Alex Barney
* Update to LibHac 0.13.1 * Recreate directories for indexed saves if they're missing on emulator start
2021-07-13Revert LibHac updateMary
Users are facing save destruction on failing extra data update apparently
2021-07-13Update to LibHac 0.13.1 (#2328)Alex Barney
Update the LibHac dependency to version 0.13.1. This brings a ton of improvements and changes such as: - Refactor `FsSrv` to match the official refactoring done in FS. - Change how the `Horizon` and `HorizonClient` classes are handled. Each client created represents a different process with its own process ID and client state. - Add FS access control to handle permissions for FS service method calls. - Add FS program registry to keep track of the program ID, location and permissions of each process. - Add FS program index map info manager to track the program IDs and indexes of multi-application programs. - Add all FS IPC interfaces. - Rewrite `Fs.Fsa` code to be more accurate. - Rewrite a lot of `FsSrv` code to be more accurate. - Extend directory save data to store `SaveDataExtraData` - Extend directory save data to lock the save directory to allow only one accessor at a time. - Improve waiting and retrying when encountering access issues in `LocalFileSystem` and `DirectorySaveDataFileSystem`. - More `IFileSystemProxy` methods should work now. - Probably a bunch more stuff. On the Ryujinx side: - Forward most `IFileSystemProxy` methods to LibHac. - Register programs and program index map info when launching an application. - Remove hacks and workarounds for missing LibHac functionality. - Recreate missing save data extra data found on emulator startup. - Create system save data that wasn't indexed correctly on an older LibHac version. `FsSrv` now enforces access control for each process. When a process tries to open a save data file system, FS reads the save's extra data to determine who the save owner is and if the caller has permission to open the save data. Previously-created save data did not have extra data created when the save was created. With access control checks in place, this means that processes with no permissions (most games) wouldn't be able to access their own save data. The extra data can be partially created from data in the save data indexer, which should be enough for access control purposes.
2021-05-16misc: Move configuration management to the Ryujinx project (#2269)Mary
* Decouple configuration from Ryujinx.HLE and Ryujinx.Input * Move Configuration to the Ryujinx project
2021-04-24HLE: Fix integer sign inconcistency accross the codebase (#2222)Mary
* Make all title id instances unsigned * Replace address and size with ulong instead of signed types Long overdue change. Also change some logics here and there to optimize with the new memory manager. * Address Ac_K's comments * Remove uneeded cast all around * Fixes some others misalignment
2021-01-26Initial Setup: Reload keys before verifying firmware (#1955)mageven
* Initial Setup: Reload keys before verifying firmware Also, display the NoKeys dialog if keyset is empty when verifying firmware. * LoadApplications: Remove the lone debug log and print the error directly
2020-09-01Update to LibHac 0.12.0 (#1485)Alex Barney
* Update to LibHac 0.12.0 * Auto-formatting. Fixed a bug in SetApplicationCopyrightImage
2020-08-04Improved Logger (#1292)mageven
* Logger class changes only Now compile-time checking is possible with the help of Nullable Value types. * Misc formatting * Manual optimizations PrintGuestLog PrintGuestStackTrace Surfaceflinger DequeueBuffer * Reduce SendVibrationXX log level to Debug * Add Notice log level This level is always enabled and used to print system info, etc... Also, rewrite LogColor to switch expression as colors are static * Unify unhandled exception event handlers * Print enabled LogLevels during init * Re-add App Exit disposes in proper order nit: switch case spacing * Revert PrintGuestStackTrace to Info logs due to #1407 PrintGuestStackTrace is now called in some critical error handlers so revert to old behavior as KThread isn't part of Guest. * Batch replace Logger statements
2020-06-23Import DLC title key from ticket when loading into content manager (#1318)Xpl0itR
2020-06-23Implement dlc management window (#1313)Xpl0itR
* Implement dlc management window * reduce repetition * Implement per NCA toggling of DLC rather than per container
2020-06-20Implement aoc:u and support loading AddOnContent (#1221)mageven
* Initial rebased AddOnContent support * Fix bounds calculation * Use existing GameCard in VFS per Xpl0itR's suggestion + Add dummy IPurchaseEventManager per AcK's suggestion * Support multiple containers * Add option to selectively disable addons * Import tickets from AOC FS * Load all nsps in base directory automatically * Revert LoadNsp renaming Removes conflicts with Mods PR. Not much is lost, old names were fine. * Address AcK's comments * Address Thog's comments Dispose opened nsp files Fix potential bug by clearing metadata on load
2020-05-15Refactor out Application details from Horizon (#1236)mageven
* Initial Application refactor * Misc typo and access modifier fixes * Clean unused namespaces * Address gdkchan's comments * Move ticket reading to common method * Change IParentalControlService to use ApplicationLoader.ControlData
2020-03-30Reduce requirements for running homebrew (#1053)Thog
* Reduce requirements for running homebrews This commit change the following behaviours: - TimeZoneBinary system archive isn't required until guest code call LoadTimeZoneRule. - Fonts system archives aren't requred until a "pl:u" IPC call is made. - Custom font support was dropped. - TimeZoneBinary missing message is now an error and not a warning. * Address comments
2020-03-25Add IMultiCommitManager (#1011)Alex Barney
* Update LibHac * Add IMultiCommitManager * Updates * Delete NuGet.Config * Add command version
2020-01-21Keep the GUI alive when closing a game (#888)Thog
* Keep the GUI alive when closing a game Make HLE.Switch init when starting a game and dispose it when closing the GlScreen. This also make HLE in charge of disposing the audio and gpu backend. * Address Ac_k's comments * Make sure to dispose the Discord module and use GTK quit method Also update Discord Precense when closing a game. * Make sure to dispose MainWindow * Address gdk's comments
2020-01-13Fix race condition in ContentManager (#884)Thog
* Fix race condition in ContentManager This fix a race condition happening since #791 when trying to load a game via command line. * Address gdk's comments * Ensure to dispose the FileStream and not the IStorage
2020-01-12System firmware installer (#791)emmauss
* firmware installer * Add directory installation option and fix 9.x support for directory * Fix missing system font error while installing for the first time * Address code style comments * Create and use InvalidFirmwarePackageException * Fix LDj3SNuD's comments * addressed alex's comments * add label to status bar to show current firmware version Co-authored-by: Thog <thog@protonmail.com>
2019-10-17Update to LibHac 0.6.0 (#792)Alex Barney
* Update to LibHac 0.6.0 * Create an IFileSystemProxy object from LibHac * Rename rc -> result * Alignment and spacing * Result formatting * Spacing * Sort usings
2019-10-08Update time implementation to 9.0.0 (#783)Thomas Guillemard
* Fix 9.0.0 related services bindings This was wrong because of a mistake on switchbrew. * Fix wronog cmdid for ISteadyClock::GetTestOffset/SetTestOffset * Update ClockCore logics to 9.0.0 Also apply 9.0.0 permissions and comment time:u, and time:a (as those are going to be moved) * Move every clocks instances + timezone to a global manager * Start implementing time:m Also prepare the skeleton of the shared memory * Implement SystemClockContextUpdateCallback and co * Update StaticService to 9.0.0 * Update ISystemClock to 9.0.0 * Rename IStaticService and add glue's IStaticService * Implement psc's ITimeZoneService * Integrate psc layer into glue for TimeZoneService * Rename TimeZoneManagerForPsc => TimeZoneManager * Use correct TimeZoneService interface for both StaticService implementations * Accurately implement time shared memory operations * Fix two critical flaws in TimeZone logic The first one was the month range being different fron Nintendo one (0-11 instead of 1-12) The other flaw was a bad incrementation order during days & months computation. * Follow Nintendo's abort logic for TimeManager * Avoid crashing when timezone sysarchive isn't present * Update Readme * Address comments * Correctly align fields in ISystemClock * Fix code style and some typos * Improve timezone system archive warning/error messages * Rearrange using definitions in Horizon.cs * Address comments
2019-07-04ITimeZoneService rewrite (#722)Thomas Guillemard
* Clean up ITimeZoneService Add error codes and simplify parsing * Add accurate timezone logic TOOD: LoadTimeZoneRule and location name cmds. * Integrate the new TimeZone logic * SCREAMING_UNIX_CASE => PascalCase * Address comments * Reduce use of pointer in the LoadTimeZoneRule logic * Address comments * Realign tzIfStream logic in LoadTimeZoneRule * Address gdk's comments
2019-07-02Misc cleanup (#708)Alex Barney
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
2019-06-13fs: Fix ContentManager content paths on Unix systems (#699)Thomas Guillemard
* fs: Fix ContentManager content paths on Unix systems * revert the line removing change
2019-06-01Update to version 0.4 of LibHac (#689)Alex Barney
* It compiles * Print correct name when loading an exefs * Use DirectorySaveDataFileSystem for savedata * Handle more errors in IFileSystem * Remove structs replaced by LibHac structs * Fix alignment * Fix alignment again * Fix IFile and IFileSystem IPC * Alignment * Use released libhac version
2019-01-05Update to LibHac 0.2.0 (#549)Alex Barney
* Update to LibHac 0.2.0 * Changes based on feedback
2019-01-01This kind of thing drives me crazygdkchan
2018-12-06Adjust naming conventions and general refactoring in HLE Project (#527)Alex Barney
* Rename enum fields * Naming conventions * Remove unneeded ".this" * Remove unneeded semicolons * Remove unused Usings * Don't use var * Remove unneeded enum underlying types * Explicitly label class visibility * Remove unneeded @ prefixes * Remove unneeded commas * Remove unneeded if expressions * Method doesn't use unsafe code * Remove unneeded casts * Initialized objects don't need an empty constructor * Remove settings from DotSettings * Revert "Explicitly label class visibility" This reverts commit ad5eb5787cc5b27a4631cd46ef5f551c4ae95e51. * Small changes * Revert external enum renaming * Changes from feedback * Apply previous refactorings to the merged code
2018-12-04Revert "Adjust naming conventions and general refactoring in HLE Project ↵gdkchan
(#490)" (#526) This reverts commit 85dbb9559ad317a657dafd24da27fec4b3f5250f.
2018-12-04Adjust naming conventions and general refactoring in HLE Project (#490)Alex Barney
* Rename enum fields * Naming conventions * Remove unneeded ".this" * Remove unneeded semicolons * Remove unused Usings * Don't use var * Remove unneeded enum underlying types * Explicitly label class visibility * Remove unneeded @ prefixes * Remove unneeded commas * Remove unneeded if expressions * Method doesn't use unsafe code * Remove unneeded casts * Initialized objects don't need an empty constructor * Remove settings from DotSettings * Revert "Explicitly label class visibility" This reverts commit ad5eb5787cc5b27a4631cd46ef5f551c4ae95e51. * Small changes * Revert external enum renaming * Changes from feedback * Remove unneeded property setters
2018-11-19ContentServices: Handle null LocationEntry Path in VerifyContentType (#506)jduncanator
When `LocationEntry.ContentPath` is `null`, we can always return `false` as it can't possibly be a valid `ContentType`
2018-11-18Implement ContentManager and related services (#438)emmauss
* Implement contentmanager and related services * small changes * read system firmware version from nand * add pfs support, write directoryentry info for romfs files * add file check in fsp-srv:8 * add support for open fs of internal files * fix filename when accessing pfs * use switch style paths for contentpath * close nca after verifying type * removed publishing profiles, align directory entry * fix style * lots of style fixes * yasf(yet another style fix) * yasf(yet another style fix) plus symbols * enforce path check on every fs access * change enum type to default * fix typo