Commit Graph

17 Commits

Author SHA1 Message Date
Lioncash 4473ebd41d patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
Neither of these functions require the use of shared ownership of the
returned pointer. This makes it more difficult to create reference
cycles with, and makes the interface more generic, as std::shared_ptr
instances can be created from a std::unique_ptr, but the vice-versa
isn't possible. This also alters relevant functions to take NCA
arguments by const reference rather than a const reference to a
std::shared_ptr. These functions don't alter the ownership of the memory
used by the NCA instance, so we can make the interface more generic by
not assuming anything about the type of smart pointer the NCA is
contained within and make it the caller's responsibility to ensure the
supplied NCA is valid.
2018-10-09 14:38:03 -04:00
Zach Hilman 598ca547b2 romfs_factory: Extract packed update setter to new function 2018-10-05 08:53:51 -04:00
Zach Hilman bbbac65dc4 loader: Add getter for packed update
Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
2018-10-05 08:46:31 -04:00
Zach Hilman 9488564c1e loader: Add ReadRomFSIVFCOffset to NSP, XCI, and NAX loaders
Fixes errors with certain updates
2018-10-05 08:46:31 -04:00
Lioncash 06b47d8e6f loader: Make the Load() function take a process as a regular reference, not a SharedPtr
A process should never require being reference counted in this
situation. If the handle to a process is freed before this function is
called, it's definitely a bug with our lifetime management, so we can
put the requirement in place for the API that the process must be a
valid instance.
2018-09-29 16:00:03 -04:00
Zach Hilman 14a18fd7ae patch_manager: Centralize Control-type NCA parsing 2018-09-04 16:25:10 -04:00
Zach Hilman ac7d3882b4 game_list: Fix version display on non-NAND titles 2018-09-04 16:24:02 -04:00
Zach Hilman 57769f8d0d card_image: Parse XCI secure partition with NSP
Eliminated duplicate code and adds support for Rev1+ carts
2018-09-04 14:27:33 -04:00
Zach Hilman 1c1491a1cf xci: Fix error masking issue
Prevents NCA-related errors from being masked into MissingProgramNCA or MissingKeyFile
2018-08-23 11:52:44 -04:00
Lioncash f5b5d53cde loader/xci: Remove unnecessary includes and member variables
Many of these aren't necessary and will cause this file to be required
to be recompiled whenever any changes to those files are made, which
lengthens compile times for no reason.

This also removes an unused metadata variable from AppLoader_XCI
2018-08-15 01:41:35 -04:00
Zach Hilman da921ac3f3 loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09 21:06:59 -04:00
Zach Hilman d53b3a13b3 loader: Add icon and title support to XCI 2018-08-06 23:13:42 -04:00
Zach Hilman 9a3f7d702f Fix merge conflicts with opus and update docs 2018-08-01 00:16:54 -04:00
Zach Hilman 9b710a5901 Use more descriptive error codes and messages 2018-08-01 00:16:54 -04:00
Zach Hilman f93e75f496 Use ErrorEncrypted where applicable and fix no keys crash 2018-08-01 00:16:54 -04:00
Zach Hilman 272ca87298 Make XCI comply to review and style guidelines 2018-08-01 00:16:54 -04:00
Zach Hilman b10c0d291f Remove files that are not used 2018-08-01 00:16:54 -04:00