Commit Graph

51 Commits

Author SHA1 Message Date
Liam 84cb20bc72 core: remove ResultVal type 2023-08-08 11:09:37 -04:00
Liam 351079a4ba fs: adjust future save path 2023-05-11 17:30:30 -04:00
Liam ceda2d280e general: rename CurrentProcess to ApplicationProcess 2023-02-13 19:03:12 -05:00
Morph ae453ab6a8 savedata_factory: Detect future save data paths
Enable compatibility for new account/device save paths planned on a future implementation.
2022-10-16 23:49:55 -04:00
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
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.
2022-04-23 05:55:32 -04:00
Morph a6e6a5ac38 general: Get the current process program id directly from the system
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04 16:59:39 -04:00
Morph 64275dfbf4 general: Rename GetTitleID to GetProgramID 2021-11-04 16:57:16 -04:00
Morph cb09ea0f01 general: Remove MakeResult helpers
This is made obsolete by the presence of implicit constructors.
2021-11-02 17:23:19 -04:00
Chloe c4c256f56a
fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
2021-06-02 17:46:29 -07:00
Morph a0e4c2e1fc general: Replace RESULT_UNKNOWN with ResultUnknown
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
bunnei 2a7eff57a8 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
Lioncash 1da72c7792 file_sys: Resolve cases of variable shadowing
Brings us closer to enabling -Wshadow as an error in the core code.
2021-05-02 02:59:57 -04:00
Lioncash 073e07ae2d savedata_factory: Eliminate usage of the global system instance
Now there's only two meaningful instances left in core.
2020-11-27 09:45:08 -05:00
Morph 45fd67c109 fs: Rename SaveDataDescriptor to SaveDataAttribute 2020-07-30 15:29:39 -04:00
bunnei ab9ddab0a2 file_sys: savefata_factory: Update to support DeviceSaveData. 2020-05-11 12:54:30 -04:00
Lioncash 86c397dd6e file_sys: Resolve sign conversion warnings
Resolves a few trivial sign conversion/mismatch errors.
2019-11-12 07:55:39 -05:00
Zach Hilman bb207fe27a savedata_factory: Automatically create certain savedata
After further hardware investigation, it appears that some games, perhaps those more lazily coded, will not call EnsureSaveData, meaning that they expect the normal (current) save to be automatically made. Additionally, some games do not create a cache or temporary save before use.
In these 3 specific instances, the save is created automatically for the game if it doesn't exist.
2019-10-22 15:47:38 -04:00
Lioncash f1382cf0e7 core: Remove Core::CurrentProcess()
This only encourages the use of the global system instance (which will
be phased out long-term). Instead, we use the direct system function
call directly to remove the appealing but discouraged short-hand.
2019-10-06 13:53:12 -04:00
Zach Hilman a49169e819 filesystem: Add const qualification to various accessors 2019-09-21 16:50:39 -04:00
Zach Hilman 49c44e3fae savedata_factory: Implement savedata creation and don't create dir on open
Matches hardware behavior and eliminates some nasty behavior we were doing that wasn't hw-accurate at all.
2019-09-21 16:43:10 -04:00
Lioncash c05c8a7a06 service/fsp_srv: Don't pass SaveDataDescriptor instances by value.
Passing around a 64 byte data struct by value is kind of wasteful,
instead pass a reference to the struct.
2019-04-05 11:04:01 -04:00
Lioncash d9ee58a3b5 service/fsp_srv: Update SaveDataInfo and SaveDataDescriptor structs
I realized that I updated the documentation on SwitchBrew a while ago,
but never actually updated the structs within yuzu.
2019-04-05 11:03:53 -04:00
Zach Hilman c643f364b4 am: Implement GetSaveDataSize and ExtendSaveData
These functions come in a pair and are needed by Smash Ultimate, Minecraft, and Skyrim, amongst others.
2018-12-27 00:18:00 -05:00
Zach Hilman 4082c4eda6 savedata_factory: Partially implement IVFC save sizes using files
This stores a file in the save directory called '.yuzu_save_size' which stores the two save sizes (normal area and journaled area) sequentially as u64s.
2018-12-27 00:18:00 -05:00
David Marcec fdd649e2ef Fixed uninitialized memory due to missing returns in canary
Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
2018-12-19 12:52:32 +11:00
Zach Hilman fcfbae88e9 savedata_factory: Add support for CacheStorage 2018-12-07 08:47:32 -05:00
Zach Hilman 5721b8b5ad savedata_factory: Delete TemporaryStorage on startup
Mimics hardware behavior.
2018-12-06 22:07:34 -05:00
Zach Hilman bdaa76c0db ns: Implement command 400: GetApplicationControlData
Returns the raw NACP bytes and the raw icon bytes into a title-provided buffer. Pulls from Registration Cache for control data, returning all zeros should it not exist.
2018-10-29 16:20:16 -04:00
Zach Hilman df264d2ccb savedata_factory: Expose accessors for SaveDataSpace 2018-10-29 13:54:38 -04:00
Zach Hilman 9d4e6176eb savedata_factory: Add TemporaryStorage SaveDataSpaceId
Required for TemporaryStorage saves (in addition to SaveDataType)
2018-10-16 10:20:04 -04:00
Zach Hilman 74890cf2da savedata_factory: Add support for DeviceSaveData
Uses the same path as SaveData except with UID 0. Adds a warning if UID is not 0.
2018-10-16 10:19:21 -04:00
Lioncash cf9d6c6f52 kernel/process: Make data member variables private
Makes the public interface consistent in terms of how accesses are done
on a process object. It also makes it slightly nicer to reason about the
logic of the process class, as we don't want to expose everything to
external code.
2018-09-30 02:30:01 -04:00
bunnei c1c59617ad
Merge pull request #1364 from lioncash/content
file-sys: Default heavy-weight class destructors in the cpp file
2018-09-20 23:31:31 -04:00
Lioncash 05ef9dfc10 file-sys: Default heavy-weight class destructors in the cpp file
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.
2018-09-19 19:34:08 -04:00
Zach Hilman dfaea55be5 savedata_factory: Add TemporaryStorage SaveDataType
Seems to be used by NSO NES Emulator
2018-09-19 09:06:22 -04:00
Lioncash a813c10e1c file_sys: Replace includes with forward declarations where applicable
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
2018-09-03 22:52:24 -04:00
Lioncash 4a587b81b2 core/core: Replace includes with forward declarations where applicable
The follow-up to e2457418da, which
replaces most of the includes in the core header with forward declarations.

This makes it so that if any of the headers the core header was
previously including change, then no one will need to rebuild the bulk
of the core, due to core.h being quite a prevalent inclusion.

This should make turnaround for changes much faster for developers.
2018-08-31 16:30:14 -04:00
tech4me cc71832b19 qt/main: Port part of citra(#3411), open savedata works 2018-08-21 02:04:33 -07:00
Lioncash 88ba94e8a2 savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
This function doesn't alter class state.
2018-07-18 23:50:07 -04:00
Zach Hilman 29aff8d5ab Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
2018-07-18 18:07:11 -07:00
Zach Hilman 69bfe075b5 General Filesystem and Save Data Fixes (#670) 2018-07-17 12:42:15 -07:00
bunnei eb6cbfdbd8 savedata_factory: Always create a save directory for games. 2018-07-08 17:05:13 -04:00
bunnei 913896cbd9 Revert "Virtual Filesystem (#597)"
This reverts commit 77c684c114.
2018-07-07 20:24:51 -07:00
Zach Hilman 77c684c114 Virtual Filesystem (#597)
* Add VfsFile and VfsDirectory classes

* Finish abstract Vfs classes

* Implement RealVfsFile (computer fs backend)

* Finish RealVfsFile and RealVfsDirectory

* Finished OffsetVfsFile

* More changes

* Fix import paths

* Major refactor

* Remove double const

* Use experimental/filesystem or filesystem depending on compiler

* Port partition_filesystem

* More changes

* More Overhaul

* FSP_SRV fixes

* Fixes and testing

* Try to get filesystem to compile

* Filesystem on linux

* Remove std::filesystem and document/test

* Compile fixes

* Missing include

* Bug fixes

* Fixes

* Rename v_file and v_dir

* clang-format fix

* Rename NGLOG_* to LOG_*

* Most review changes

* Fix TODO

* Guess 'main' to be Directory by filename
2018-07-06 10:51:32 -04:00
James Rowe 638956aa81 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
Lioncash 3f78a61f09
file-sys: convert a StringFromFormat call into fmt::format in GetFullPath()
Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string
for the whole path, making it easier to read.
2018-04-25 12:35:37 -04:00
Lioncash 5aafc83cc9
file-sys: Move logging macros over to the new fmt-capable ones 2018-04-25 12:35:33 -04:00
bunnei 7d6653268f core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
Subv 0eefe6e4d1 FS: Make EnsureSaveData create the savedata folder when called for the first time. 2018-03-04 14:30:07 -05:00
Subv 3209cff530 SaveData: Use the current titleid when opening the savedata archive. 2018-03-01 19:03:54 -05:00