| Age | Commit message (Collapse) | Author |
|
|
|
file_sys: Add support for loading IPS patches
|
|
submission_package: Cleanup and bug fixes
|
|
card_image: Ensure program_nca_status is always initialized
|
|
GetName() returns a std::string by value, not by reference, so after the
std::string_view is constructed, it's not well defined to actually
execute any member functions of std::string_view that attempt to access
the data, as the std::string has already been destroyed. Instead, we can
just use a std::string and erase the last four characters.
|
|
If a ticket file was ever a null pointer, we'd cause a null pointer
dereference, as we were calling GetExtension() on the pointer instance.
|
|
in InitializeExeFSAndRomFS()
When searching for a file extension, it's generally preferable to begin
the search at the end of the string rather than the beginning, as the
whole string isn't going to be walked just to check for something at the
end of it.
|
|
If an error occurs when constructing the PartitionFilesystem instance,
the constructor would be exited early, which wouldn't initialize the
extracted data member, making it possible for other code to perform an
uninitialized read by calling the public IsExtractedType() member
function. This prevents that.
|
|
Like the other two bits of factored out code, this can also be put
within its own function. We can also modify the code so that it accepts
a const reference to a std::vector of files, this way, we can
deduplicate the file retrieval.
Now the constructor for NSP isn't a combination of multiple behaviors in
one spot. It's nice and separate.
|
|
This too, is completely separate behavior from what is in the
constructor, so we can move this to its own isolated function to keep
everything self-contained.
|
|
This behavior is entirely independent of the surrounding code, so it can
be put in its own function to keep the behavior separate.
|
|
nesting
We can use early continues here to reduce the amount of nesting.
|
|
If any of the error paths before the NCA retrieval are taken, it'll
result in program_nca_status being left in an inconsistent state. So we
initialize it by default with a value indicating an error.
|
|
Avoid resource-heavy classes and remove quasi-duplicated code.
|
|
While PatchExeFS operated on the entire directory, this function operates on the uncompressed NSO. Avoids copying decompression code to PatchManager.
|
|
|
|
|
|
|
|
Command #5
|
|
Previous behavior was to assert. Seems to mirror expected game behavior.
|
|
|
|
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.
|
|
process/vm_manager: Initial modifications to load NPDM metadata
|
|
Avoids making copies of large std::vector instances where it's trivially
avoidable to do so.
|
|
Theres no need to do explicit bitwise arithmetic here, when we have a
function that does this with a more descriptive name.
|
|
Avoids the need to nest code quite a bit by early-exiting in error
cases.
|
|
initializer list
Orders the initializer list members to be in the same order that they
would be initialized in. Avoids compiler warnings.
|
|
Cast where explicitly necessary and in other cases we can simply modify
the algorithm to accomodate larger data.
|
|
RomFSBuildFileContext and RomFSBuildDirectoryContext
There's no need to duplicate in-class initializers with a constructor
initializer list. std::strings also initialize to empty by default.
|
|
The std::vector instances are already initially allocated with all
entries having these values, there's no need to loop through and fill
them with it again when they aren't modified.
|
|
auto x = 0;
auto-deduces x to be an int. This is undesirable when working with
unsigned values. It also causes sign conversion warnings. Instead, we
can make it a proper unsigned value with the correct width that the
following expressions operate on.
|
|
Given we just recently had a patch backport this from citra, let's try
and keep the convention uniform.
|
|
Given these are only added to the class to allow those functions to
access the private constructor, it's a better approach to just make them
static functions in the interface, to make the dependency explicit.
|
|
This converts it into a regular constructor parameter. There's no need
to make this a template parameter on the class when it functions
perfectly well as a constructor argument.
This also reduces the amount of code bloat produced by the compiler, as
it doesn't need to generate the same code for multiple different
instantiations of the same class type, but with a different fill value.
|
|
Rather than hard-code the address range to be 36-bit, we can derive the
parameters from supplied NPDM metadata if the supplied exectuable
supports it. This is the bare minimum necessary for this to be possible.
The following commits will rework the memory code further to adjust to
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reads multiple dirs through as if a waterfall.
|
|
Maps a vector into the VFS interface.
|
|
Always returns the template argument byte for all reads. Doesn't support writes.
|
|
|
|
Maps name string to directory or file.
|
|
file-sys: Default heavy-weight class destructors in the cpp file
|
|
savedata_factory: Add TemporaryStorage SaveDataType
|
|
control_metadata: Move language name array definition to the cpp file
|