* 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
- Run the extra data fix in FixExtraData on non-system saves that have no owner ID.
- Set the owner ID in the dummy application control property if an application doesn't have a proper one available.
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.
* Implement friendlier portable mode
* Remove first run dialog
* Disable updates in portable mode for now
* Convert relative custom paths to absolute ones
Also, fix a regression when custom path doesn't exist
* Allow launching with custom data directories
Don't load alternate keys when using custom directory
* Address gdkchan's comments
* Misc fixes to log levels
Added more enabled log levels by default
Moved successful config updation to Notice as
1. It's not a warning
2. Warnings could've been disabled by the config load and hence message
would be lost
* Implement Modding Support
* Executables: Rewrite to use contiguous mem and Spans
* Reorder ExeFs, Npdm, ControlData and SaveData calls
After discussion with gdkchan, it was decided it's best to call
LoadExeFs after all other loads are done as it starts the guest process.
* Build RomFs manually instead of Layering FS
Layered FS approach has considerable latency when building the final
romfs. So, we manually replace files in a single romfs instance.
* Add RomFs modding via storage file
* Fix and cleanup MemPatch
* Add dynamically loaded NRO patching
* Support exefs file replacement
* Rewrite ModLoader to use mods-search architecture
* Disable PPTC when exefs patches are detected
Disable PPTC on exefs replacements too
* Rewrite ModLoader, again
* Increased maintainability and matches Atmosphere closely
* Creates base mods structure if it doesn't exist
* Add Exefs partition replacement
* IPSwitch: Fix nsobid parsing
* Move mod logs to new LogClass
* Allow custom suffixes to title dirs again
* Address nits
* Add a per-App "Open Mods Directory" context menu item
Creates the path if not present.
* Normalize tooltips verbiage
* Use LocalStorage and remove unused namespaces
* 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
* Use savedata FS commands from LibHac
* Add EnsureSaveData. Use ApplicationControlProperty struct
* Add a function to migrate to the new directory layout
* LibHac update
* Change backup structure
* Don't create UI files in the save path
* Update RyuFs paths
* Add GetProgramIndexForAccessLog
Ryujinx only runs one program at a time, so always return values reflecting that
* Load control NCA when loading from an NSP
* Skip over UI stats when exiting
* Set TitleName and TitleId in more cases. Fix TitleID naming style
* Completely comment out GUI play stats code
* rebase
* Update LibHac
* Update LibHac
* Revert UI changes
* Do migration automatically at startup
* Rename RyuFs directory to Ryujinx
* Update RyuFs text
* Store savedata paths in the GUI
* Make "Open Save Directory" work
* Use a dummy NACP in EnsureSaveData if one is not loaded
* Remove manual migration button
* Respond to feedback
* Don't read the installer config to get a version string
* Delete nuget.config
* Exclude 'sdcard' and 'bis' during migration
Co-authored-by: Thog <thog@protonmail.com>
* Implement basic support of SystemSaveData and Cleanup IFileSystemProxy
- Implement `OpenSystemSaveData` as a `IFileSystem` in `SaveHelper`:
On real device, system saves data are stored encrypted, and we can't create an empty system save data for now. That's why if a user put his own dump of system save in `RyuFs\nand\system\save\`, we extract content in associated folder and open it as a `IFileSystem`. If the system save data don't exist, a folder is created.
- Cleanup `IFileSystemProxy` by adding a Helper class.
- Implement `GetSavePath` in `VirtualFileSystem` and remove `GetGameSavePath` in `SaveHelper`.
* remove the forgotten I
* Fix align
* Added GUI to Ryujinx
* Updated to use Glade
Also added scrollbar and default dark theme
* Added support for loading icon from .nro files and cleaned up the code a bit
* Added General Settings Menu (read-only for now) and moved some functionality from MainMenu.cs to ApplicationLibrary.cs
* Added custom GUI theme support and changed the defualt theme to one I just wrote
* Added GTK to process path, fixed a bug and minor edits
* some more edits and a bug fix
* general settings menu is now fully functional. also fixed the bug where ryujinx crashes when it trys to load an invalid gamedir
* big rewrite
* aesthetic changes to General Settings menu
* Added Control Settings
one day done feature :P
* minor changes
* 1st wave of changes
* 2nd wave of changes
* 3rd wave of changes
* Cleanup settings ui
* minor edits
* new about window added, still needs styling
* added spin button for new option and tooltips to settings
* Game icons and names are now shown in the games list
* add nuget package which contains gtk dependencies
* requested changes have been changed
* put CreateGameWindow on a new thread and stopped destroying the main menu when a game loads
* fixed bug that allowed a user to attempt to load multiple games at a time which causes a crash
* Added LastPlayed and TimePlayed columns to the game list
* Did some testing and fixed some bugs
Im not happy with one of the fixes so i will do it properly an upcoming commit
* did some more bug testing and fixed another 2 bugs
* caught an exception when ryujinx tries to load non-homebrew as homebrew
* Large changes
Rewrote ApplicationLibrary.cs (added comments too) so any devs reading it wont get eye cancer, also its probably more efficient now. Added 2 new columns (Developer name and application version) to the game list and wrote the logic for it. Ryujinx now loads NRO's TitleName and TitleID from the NACP file instead of the default NPDM. I also killed a lot of bugs
* Moved Files
moved ApplicationLibrary.cs to Ryujinx.HLE as that is a better place for it. Moved contents of GUI folder to Ui folder and changed the namespaces of the gui files from Ryujinx to Ryujinx.Ui
* Added 'Open Ryujinx Folder' button to the file menu and did some small fixes
* New features
* updated nuget package with missing dlls and changed emmauss' requested changes
* fixed some minor issues
* all requested changes marked as resolved have been changed
* gdkchan's requested changes
* fixed an issue with settings window getting chopped on small res
* fixed 2 problems caused by rebase
* changed the default theme
* applied Thog's patch to fix issue on linux
* fixed issue caused by rebase
* added update check button that runs ryujinx-updater
* reads version info from installer and displays it in about menu
* changes completed
* requested changes changed
* fixed issue with default theme
* fixed a bug and completed requested changes
* added more tooltips and changed some text
* 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