Commit Graph

144 Commits (2079bb4090b97b87faf69b3a32f8c115de61002e)

Author SHA1 Message Date
Morph 2079bb4090 filesystem: Create subdirectories prior to creating a file
If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within.
This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
5 years ago
bunnei 47b97b9577 service: fsp_srv: Stub implementation of OpenMultiCommitManager. 5 years ago
David Marcec 78e5f162e2 fs-srv: GetFreeSpaceSize & GetTotalSpaceSize
Closes #3533

Turns out the functions were already implemented but just never added
5 years ago
Lioncash 99eaa2e6f2 service: Update function tables
Keeps the service function tables up to date.

Updated based off information on SwitchBrew.
5 years ago
Lioncash 1c340c6efa CMakeLists: Specify -Wextra on linux builds
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.

We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).

While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
5 years ago
bunnei 7b07e521ca hle: services: Use std::shared_ptr instead of copy by value. 5 years ago
bunnei e3ee017e91
Merge pull request #3169 from lioncash/memory
core/memory: Deglobalize memory management code
5 years ago
Lioncash a3149536e2 file_sys/directory: Make EntryType an enum class
This can trivially be an enum class rather than a regular enum, making
it more strongly typed.
5 years ago
Lioncash 536fc7f0ea core: Prepare various classes for memory read/write migration
Amends a few interfaces to be able to handle the migration over to the
new Memory class by passing the class by reference as a function
parameter where necessary.

Notably, within the filesystem services, this eliminates two ReadBlock()
calls by using the helper functions of HLERequestContext to do that for
us.
5 years ago
bunnei 50c7539108
Merge pull request #3094 from lioncash/tables
service: Update function tables
5 years ago
Lioncash e21b6ff79d service: Update function tables
Keeps the function tables up to date.

Updated based off information from Switchbrew.
5 years ago
Lioncash f11b87ebf1 service: Resolve sign conversion errors
These are fairly trivial to resolve and most of the changes entail
using RESULT_UNKNOWN over ResultCode(-1).
5 years ago
Lioncash 69f16ba50e hle/service: Replace global system instance calls with instance-based ones
Migrates the HLE service code off the use of directly accessing the
global system instance where trivially able to do so.

This removes all usages of Core::CurrentProcess from the service code,
only 8 occurrences of this function exist elsewhere. There's still quite
a bit of "System::GetInstance()" being used, however this was able to
replace a few instances.
6 years ago
ReinUsesLisp 99db7d23dd service/filesystem: Silence -Wunused-variable 6 years ago
Zach Hilman 19c466dfb1 bcat: Add FSC accessors for BCAT data
Ports BCAT to use FSC interface
6 years ago
Zach Hilman f2073217a4 filesystem: Add getter for BCAT temporary directory 6 years ago
Zach Hilman 038bcec111 configure_debug: Move reporting option to logging 6 years ago
Zach Hilman a49169e819 filesystem: Add const qualification to various accessors 6 years ago
Zach Hilman c6ff4a6f4d yuzu: Port old usages of Filesystem namespace to FilesystemController 6 years ago
Zach Hilman 43af31836e filesystem: Pass Size Getter functions to IFileSystem for sizes 6 years ago
Zach Hilman 8abbc619a1 filesystem: Add FileSystemController to deglobalize FS services 6 years ago
Zach Hilman d40f38967e fsp-srv: Implement GetAccessLogVersionInfo
Returns some misc. data about logging to help the game determine if it should log.
6 years ago
Zach Hilman db2fdd0352 fsp-srv: Implement OutputAccessLogToSdCard
Allows games to log data to the SD.
6 years ago
bunnei 9186f76b07
Merge pull request #2382 from lioncash/table
service: Update service function tables
6 years ago
Lioncash ca96dc4676 service: Update service function tables
Updates function tables based off information from SwitchBrew.
6 years ago
Lioncash 8676832064 fsp_srv: Remove unnecessary parameter popping in IDirectory's Read()
IDirectory's Read() function doesn't take any input parameters. It only
uses the output parameters that we already provide.
6 years ago
Lioncash fc436bb09b fsp_srv: Log out option values in IFile's Read and Write functions
These indicate options that alter how a read/write is performed.

Currently we don't need to handle these, as the only one that seems to
be used is for writes, but all the custom options ever seem to do is
immediate flushing, which we already do by default.
6 years ago
bunnei 61f63bb994
Merge pull request #1957 from DarkLordZach/title-provider
file_sys: Provide generic interface for accessing game data
6 years ago
bunnei d6cddffb78
Merge pull request #2339 from lioncash/rank
service/fsp_srv: Update SaveDataInfo and SaveDataDescriptor structs
6 years ago
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.
6 years ago
Lioncash d0ed3ff4b7 service/fsp_srv: Remove unnecessary unknown member in OpenSaveDataFileSystem
The unknown member here is actually padding due to being passed as a
struct. We can do the same, and remove the need to pop a padding word.
6 years ago
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.
6 years ago
bunnei d6b7195192
Merge pull request #2338 from lioncash/fs
filesystem: Use a std::string_view in OpenFile()
6 years ago
Lioncash 15e0c4c4ec filesystem: Use a std::string_view in OpenFile()
Rather than make a full copy of the path, we can just use a string view
and truncate the viewed portion of the string instead of creating a totally
new truncated string.
6 years ago
Lioncash 7f506be2ee hle/service: Resolve unused variable warnings
In several places, we have request parsers where there's nothing to
really parse, simply because the HLE function in question operates on
buffers. In these cases we can just remove these instances altogether.

In the other cases, we can retrieve the relevant members from the parser
and at least log them out, giving them some use.
6 years ago
Zach Hilman 60f39060c6 core: Port current uses of RegisteredCache to ContentProvider 6 years ago
Lioncash 9f092554c2 fsp_srv: Unstub SetCurrentProcess
This just acts as a basic setter for a given PID value and performs no
further checking, so we can just store the passed in value.
6 years ago
Lioncash 09727a6a97 service/fsp-srv: Update function tables
Updates function tables based off information provided by SwitchBrew.
6 years ago
Zach Hilman 2e6b67a079 filesystem: Populate save data sizes from control data 6 years ago
Mat M 9bae3ac33a
Merge pull request #1891 from DarkLordZach/istorage-getsize
fsp_srv: Implement IStorage::GetSize
6 years ago
Zach Hilman 5e632caca5 fsp_srv: Implement IStorage::GetSize
Takes no input and returns the size as a u64. Needed by Katamari Damacy Reroll to boot.
6 years ago
Lioncash f3a555a484 service/fsp_srv: Correct returned value in GetGlobalAccessLogMode()
Based off RE, the backing code only ever seems to use 0-2 as the range
of values 1 being a generic log enable, with 2 indicating logging should
go to the SD card. These are used as a set of flags internally.

Given we only care about receiving the log in general, we can just
always signify that we want logging in general.
6 years ago
bunnei d08d4a366b
Merge pull request #1704 from DarkLordZach/oss-sysarchive
file_sys: Implement open source system archives
6 years ago
bunnei f6b22d9251
Merge pull request #1835 from lioncash/cache-global
filesystem: De-globalize registered_cache_union
6 years ago
Lioncash db4523f1ec filesystem: De-globalize registered_cache_union
We can just return a new instance of this when it's requested. This only
ever holds pointers to the existing registed caches, so it's not a large
object. Plus, this also gets rid of the need to keep around a separate
member function just to properly clear out the union.

Gets rid of one of five globals in the filesystem code.
6 years ago
Lioncash a7d9fe993a service/fsp_srv: Implement CleanDirectoryRecursively
This is the same behavior-wise as DeleteDirectoryRecursively, with the
only difference being that it doesn't delete the top level directory in
the hierarchy, so given:

root_dir/
  - some_dir/
    - File.txt
  - OtherFile.txt

The end result is just:

root_dir/
6 years ago
David Marcec f271316822 Reworked svcs slightly, improved error messages in AM and fsp_srv 6 years ago
David Marcec a2cc3b10bb Changed logging to be "Log before execution", Added more error logging, all services should now log on some level 6 years ago
Zach Hilman c3becdbca7 filesystem: Clear registered union paths on factory creation 6 years ago
bunnei 5b8f70ea2e
Merge pull request #1632 from DarkLordZach/keys-manager-optimizations
game_list: Optimize game list refresh
6 years ago