Commit graph

723 commits

Author SHA1 Message Date
bunnei 3d592972dc
Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
Lioncash be1954e04c core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
2020-10-17 19:50:39 -04:00
Lioncash 39c8d18feb core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by
applying it to Linux side of things as well. This also makes it more
consistent with the warning settings in other libraries in the project.

This also updates httplib to 0.7.9, as there are several warning
cleanups made that allow us to enable several warnings as errors.
2020-10-13 13:16:49 -04:00
bunnei d291fc1a51
Merge pull request #3929 from FearlessTobi/ticket-keys
file_sys/nsp: Make SetTicketKeys actually do something
2020-10-12 17:58:36 -07:00
Morph 3602df7f1f submission_package: Fix updates integrated into cartridge images. 2020-09-24 17:23:14 -04:00
Lioncash ff45c39578 General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.

This also makes it consistent how we return empty optionals.
2020-09-22 17:32:33 -04:00
Lioncash a881efbf26 ips_layer: Eliminate a redundant copy in Parse()
Prevents unnecessary copying of the line being parsed.
2020-09-22 16:38:45 -04:00
bunnei 53829d4cbd
Merge pull request #4675 from Morph1984/fix-boot-multicontent
submission_package: Account for multi-content NSPs
2020-09-21 16:36:46 -07:00
Morph 41c2f5200c submission_package: Account for multi-content NSPs
Previously we assumed a submission package can only contain one Program NCA with a single TitleID.
However, Super Mario 3D All-Stars contains four Program NCAs, each with their unique TitleIDs.
This accounts for the existence of multi-content games such as this one.
- Fixes booting Super Mario 3D All-Stars from the games list.
2020-09-17 20:44:51 -04:00
Lioncash 02b8b6677a control_metadata: Resolve typo in Portuguese language name
This isn't used anywhere, so this is a trivial fix.
2020-09-17 11:45:30 -04:00
Lioncash a62c1999c5 file_sys/romfs_factory: Eliminate usage of the global system accessor 2020-09-16 19:15:19 -04:00
Lioncash 0e80567bef file_sys/bis_factory: Eliminate usage of the global system accessor 2020-09-16 18:16:04 -04:00
Rodrigo Locatti 004bfefeb5
Merge pull request #4658 from lioncash/copy3
nca_patch: Reduce stack usage size within SearchBucketEntry()
2020-09-16 00:25:11 +00:00
Lioncash 66fc037ef2 nca_patch: Significantly reduce the stack usage size within SearchBucketEntry()
Previously this function was using ~16KB of stack (16528 bytes), which
was caused by the function arguments being taken by value rather than by
reference.

We can make this significantly lighter on the stack by taking them by
reference.
2020-09-15 09:10:58 -04:00
Lioncash 99b372a6c5 nca_patch: Make SearchBucketEntry() internally linked
This is only used internally and doesn't depend on any class state, so
we can make it fully internal.
2020-09-15 09:06:46 -04:00
Lioncash ba7eb5abf4 cheat_engine: Remove unnecessary system argument to CheatParser's Parse function
This isn't used within the function at all in any implementations, so we
can remove it entirely.
2020-09-15 03:20:40 -04:00
Lioncash 33e4a0b6c1 patch_manager: Resolve implicit truncations in FormatTitleVersion()
We make it explicit that we're truncating arithmetic here to resolve
compiler warnings (even if the sizes weren't u32/u64 arithmetic
generally promotes to int :<)
2020-09-14 19:19:59 -04:00
Lioncash a4392c24cf patch_manager: Make use of type aliases
We can use these to avoid typing the same type redundantly. This way, if
these ever change, only a single location needs to be modified.
2020-09-14 19:17:50 -04:00
Lioncash 637ab14ae6 patch_manager: Make a few functions internally linked
These functions are only used within this translation unit, so we can
make them internally linked.
2020-09-14 19:04:51 -04:00
ReinUsesLisp 827ff077e7 file_sys/patch_manager: Add missing include
Fixes build issues
2020-09-03 04:51:49 -03:00
bunnei 57e43682ed
Merge pull request #4564 from lioncash/file-include
file_sys: Replace inclusions with forward declarations where applicable
2020-09-02 23:06:38 -04:00
bunnei dd828607e0
Merge pull request #4563 from lioncash/rcache
registered_cache: Make use of designated initializers
2020-08-25 10:07:33 -04:00
Lioncash 01d1b5cdaf file_sys: Replace inclusions with forward declarations where applicable
Same behavior, minus unnecessary inclusions where not necessary.
2020-08-23 17:02:55 -04:00
Lioncash 67a8e73101 registered_cache: Make use of ends_with for string suffix checking
Simplifies code.
2020-08-23 11:25:45 -04:00
Lioncash f83c6e1e0c registered_cache: Make use of designated initializers
Removes the need for comments to indicate the fields being assigned.
2020-08-23 10:26:20 -04:00
Lioncash 551882e512 vfs_real: Resolve sign conversion warnings 2020-08-18 14:58:33 -04:00
Lioncash ed9ae5a977 vfs_real: Avoid redundant map lookups
Avoids some trivially avoidable map lookups by keeping the result of
find operations around and querying them.
2020-08-18 14:58:29 -04:00
Lioncash c4ed791164 common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.

This also allows for high-traffic FS related code to alias the
filesystem function namespace as

namespace FS = Common::FS;

for more concise typing.
2020-08-16 06:52:40 -04:00
Lioncash b724a4d90c General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
bunnei 664019954a
Merge pull request #4488 from lioncash/file
vfs_vector: Make creation of array vfs files less verbose
2020-08-09 17:19:34 -04:00
bunnei 35c1607f23
Merge pull request #4484 from lioncash/aesutil
aes_util: Allow SetIV() to be non-allocating
2020-08-05 22:35:41 -04:00
Lioncash 0a5456feb9 vfs_vector: Make creation of array vfs files less verbose
We can add a helper function to make creation of these files nicer.
While we're at it, we can eliminate an unnecessary std::array copy in
the constructor. This makes the overhead on some of these functions way
less intensive, given some arrays were quite large.

e.g. The timezone location names are 9633 bytes in size.
2020-08-05 12:37:00 -04:00
bunnei 142930e609
Merge pull request #4476 from lioncash/tz
time_zone_binary: Make use of designated initializers
2020-08-04 18:56:28 -04:00
David 741cbbdc0e
Merge pull request #4470 from lioncash/qualifier
patch_manager: Resolve -Wignored-qualifier warnings
2020-08-04 14:09:48 +10:00
bunnei 0dbb95c42d
Merge pull request #4456 from Morph1984/stub-really-long-fs-func
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
2020-08-03 18:06:48 -07:00
Lioncash 15660bd857 aes_util: Allow SetIV to be non-allocating
In a few places, the data to be set as the IV is already within an array.
We shouldn't require this data to be heap-allocated if it doesn't need
to be. This allows certain callers to reduce heap churn.
2020-08-03 14:29:58 -04:00
bunnei a971667d1f
Merge pull request #4468 from lioncash/regcache
registered_cache: Resolve -Wmaybe_uninitialized warnings
2020-08-03 11:26:45 -07:00
bunnei 3697fc8d14
Merge pull request #4467 from lioncash/mode
file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
2020-08-03 08:07:56 -07:00
Lioncash 04ca1ed2bd time_zone_binary: Make use of designated initializers 2020-08-03 10:42:38 -04:00
Lioncash 2b8ae009a0 file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
Same behavior, minus a hand-rolled operator.
2020-08-03 07:52:36 -04:00
Lioncash 1c6d3ba397 patch_manager: Resolve -Wignored-qualifier warnings
Top level const will always be ignored in this case, so it can be
removed.
2020-08-03 07:42:56 -04:00
Lioncash 4ca0014479 registered_cache: Resolve -Wmaybe_uninitialized warnings
While we're at it, we can avoid a redundant map lookup.
2020-08-03 07:34:46 -04:00
Morph 45fd67c109 fs: Rename SaveDataDescriptor to SaveDataAttribute 2020-07-30 15:29:39 -04:00
Morph ed46f3c62a xts_archive: Check if the file is nullptr prior to parsing
Fixes an access violation where the file no longer exists at the specified path while being parsed.
2020-07-29 06:50:30 -04:00
Morph 2ec852dd9f registered_cache: Add support for removing folder ncas 2020-07-29 06:50:30 -04:00
FearlessTobi 4d4bbe756f file_sys/nsp: Make SetTicketKeys actually do something
Previously, the method wasn't modifying any class state and therefore not having any effects when called.
Since this has been the case for a very long time now, I'm not sure if we couldn't just remove this method altogether.
2020-07-18 02:02:39 +02:00
bunnei 0f0b756775
Merge pull request #4309 from Morph1984/fix-romfs-bug
fs: Fix RomFS building when zero byte files are present
2020-07-17 17:01:20 -04:00
Morph f66e3181dc Check for empty section0 and CNMT prior to install 2020-07-16 05:22:51 -04:00
Morph 0ca7b8269a clang format 2020-07-15 13:27:04 -04:00
Morph 1bbc61f5f1 Use proper install result when overwriting files 2020-07-15 13:27:04 -04:00