Commit Graph

4824 Commits

Author SHA1 Message Date
f9d03b1d41 Merge pull request #1482 from lioncash/init
thread: Remove unnecessary memset from ResetThreadContext()
2018-10-12 12:06:51 -04:00
dc328440c8 Merge pull request #1479 from ogniK5377/nmap-revamped
Added error codes for nvmap
2018-10-12 12:06:22 -04:00
b492d43e63 thread: Remove unnecessary memset from ResetThreadContext()
Regular value initialization is adequate here for zeroing out data. It
also has the benefit of not invoking undefined behavior if a non-trivial
type is ever added to the struct for whatever reason.
2018-10-12 10:57:31 -04:00
4d2de6564f Returned an error before processing other remaps 2018-10-12 17:10:41 +11:00
c55b5de0fb Made the minimum alignment more clear 2018-10-12 17:06:46 +11:00
4ccf30dfaa svc: Fix typos in sanitizing checks for MapMemory/UnmapMemory 2018-10-12 01:48:26 -04:00
98b760c645 Wip 2018-10-12 16:28:00 +11:00
9bf409f275 Merge pull request #1474 from ogniK5377/hwopus-decodeinterleavedwithperformance
HwOpus, Implemented DecodeInterleavedWithPerformance
2018-10-11 16:52:13 -04:00
3fd26b7147 Merge pull request #1472 from lioncash/san
svc: Add missing address range sanitizing checks to MapMemory/UnmapMemory
2018-10-11 16:51:41 -04:00
85b0d9a7be Dynamically decide handheld variant based on supported npad id priority
Kirby input still doesn't work, should fix a lot of other games
2018-10-12 02:56:49 +11:00
c7763603ef Added error codes for nvmap 2018-10-11 23:06:34 +11:00
5dd538cace Passing an invalid nmap handle to Remap should throw an error
Added error for invalid nmap handles
2018-10-11 20:32:21 +11:00
bf795edac4 nvhost_as_gpu: Flush CPU VAddr on UnmapBuffer. 2018-10-11 00:19:36 -04:00
28ec921d0d core/CMakeLists: Make all web_service-related libraries private
Now that all external dependencies are hidden, we can remove
json-headers from the publically linked libraries, as the use of this
library is now completely hidden from external users of the web_service
library. We can also make the web_services library private as well,
considering it's not a requirement. If a library needs to link in
web_service, it should be done explicitly -- not via indirect linking.
2018-10-10 22:29:39 -04:00
fa10905e1e HwOpus, Implemented DecodeInterleavedWithPerformance
Used by sonic ages
2018-10-11 13:06:56 +11:00
6e6ce2ce39 core/CMakeLists: Use target_compile_definitions instead of add_definitions for specifying ENABLE_WEB_SERVICE
Avoids introducing the definition to the whole directory space and
localizes it to being added to the library that needs it.
2018-10-10 20:54:02 -04:00
72e9cb523e svc: Add missing address range sanitizing checks to MapMemory/UnmapMemory
This adds the missing address range checking that the service functions
do before attempting to map or unmap memory. Given that both service
functions perform the same set of checks in the same order, we can wrap
these into a function and just call it from both functions, which
deduplicates a little bit of code.
2018-10-10 20:30:49 -04:00
9e924f2ef2 Added BeginPermitVibrationSession and EndPermitVibrationSession
Used by Mario Party
2018-10-11 00:58:47 +11:00
3d75c9cd7a Added GetLedPattern and HandheldVariant
HandheldVariant is for specific games which expect handheld controllers to be at position 8(kirby), however this doesn't fix all games as some games require handhelds to be at position 0(snipperclips)
2018-10-10 21:38:43 +11:00
5c0408596f kernel/thread: Use a regular pointer for the owner/current process
There's no real need to use a shared pointer in these cases, and only
makes object management more fragile in terms of how easy it would be to
introduce cycles. Instead, just do the simple thing of using a regular
pointer. Much of this is just a hold-over from citra anyways.

It also doesn't make sense from a behavioral point of view for a
process' thread to prolong the lifetime of the process itself (the
process is supposed to own the thread, not the other way around).
2018-10-10 02:04:55 -04:00
46cdeb4549 Kirby expects handheld controllers to be at position 8 2018-10-10 14:21:56 +11:00
5461b21c7a Merge pull request #1461 from lioncash/warn
ips_layer: Silence truncation and conversion warnings
2018-10-09 22:30:01 -04:00
3ac874c32e Merge pull request #1464 from lioncash/unique
patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
2018-10-09 22:29:39 -04:00
f43815af5d Added the ability to "disconnect" individual npads
Fixes arms
2018-10-10 13:15:39 +11:00
b79c294c02 Removed unneeded forward declarations 2018-10-10 13:15:37 +11:00
5857aea94e Addressed changes for better hid 2018-10-10 13:15:37 +11:00
56f35ab262 "Better Hid" rework part 1 2018-10-10 13:15:35 +11:00
2db37ddea9 Changed all casts in svc_wrap.h to be static_cast instead 2018-10-10 12:49:08 +11:00
09b6dda8f0 Use a better name than "dont_kill_application"
signal_debugger seems like a more fitting name
2018-10-10 12:27:44 +11:00
a4412c8e22 Fixed incorrect types for svcBreak
svcBreak reason should be a u32, not a u64.
2018-10-10 12:23:50 +11:00
fe16905de1 Merge pull request #1459 from ogniK5377/break
svcBreak, Signalling to the debugger should not kill execution
2018-10-09 16:57:37 -04:00
89939be9e6 Merge pull request #1465 from lioncash/telemetry
telemetry_session: Minor miscellaneous changes
2018-10-09 16:56:56 -04:00
e3b4d31f4e telemetry_session: Remove doxygen comment for a non-existent parameter
There's no "func" parameter, so this can just be removed.
2018-10-09 14:52:10 -04:00
8aa4889e76 telemetry_session: Add missing includes
Prevents potential compilation issues in the future by including missing
headers for certain functions and types.
2018-10-09 14:51:39 -04:00
1964f4bbb3 telemetry_session: Remove unimplemented FinalizeAsyncJob prototype
This isn't implemented anywhere, so it can just be removed.
2018-10-09 14:46:31 -04:00
8723cc8798 telemetry_session: Use a std::array in GenerateTelemetryId()
We don't need to potentially heap-allocate a std::string instance here,
given the data is known ahead of time. We can just place it within an
array and pass this to the mbedtls functions.
2018-10-09 14:46:26 -04:00
6636f3ff47 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
465175cdf5 ips_layer: Avoid constructing std::vector instances where not necessary
We can just compare the existing std::vector instance with a constexpr
std::array containing the desired match. This is lighter resource-wise,
as we don't need to allocate on the heap.
2018-10-09 14:10:22 -04:00
9ff743bc0a ips_layer: Remove unnecessary explicit std::pair constructor in std::array
Makes the layout of the array consistent, by making all elements match,
instead of special-casing the first one.
2018-10-09 14:10:22 -04:00
f7d2889fb4 ips_layer: Add missing includes
Adds missing includes to prevent potential compilation issues in the
future. Also moves the definition of a struct into the cpp file, so that
some includes don't need to be introduced within the header.
2018-10-09 14:10:13 -04:00
93ac8d0fea ips_layer: std::move data within PatchIPS() and Apply()
We don't need to make a copy of the read data, so we can std::move it
into the make_shared call here.
2018-10-09 14:06:44 -04:00
567e818440 ips_layer: Silence truncation and conversion warnings
Makes type conversions explicit to avoid compiler warnings.
2018-10-09 13:18:23 -04:00
f5631e78d1 Added bitfield instead of manually checking if the bit is set 2018-10-09 12:11:14 +11:00
af3ba94b2a Actual kill execution when the bit isn't set, not the other way around 2018-10-09 11:14:48 +11:00
c50f66a8eb svcBreak, Signalling to the debugger should not kill execution
When loading NROs, svcBreak is called to signal to the debugger that a new "module" is loaded. As no debugger is technically attached we shouldn't be killing the programs execution.
2018-10-09 11:10:30 +11:00
561d79e034 Merge pull request #1423 from DarkLordZach/romfs-file-exts
fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFS
2018-10-08 12:31:27 -04:00
6b48ba5271 Merge pull request #1424 from DarkLordZach/ips-witch
ips_layer: Add support for IPSwitch executable patches
2018-10-08 12:30:33 -04:00
fd891ee9c0 Merge pull request #1456 from ogniK5377/aoc-u-fixups
Fixed assertion due to CountAddOnContent & Casting warnings
2018-10-08 01:21:05 -04:00
3f1f82a8c4 Merge pull request #1457 from ogniK5377/unmap-buffer
Unmapping an unmapped buffer should succeed
2018-10-08 01:20:18 -04:00
c5c184246d Unmapping an unmapped buffer should succeed
Hardware tests show that trying to unmap an unmapped buffer already should always succeed. Hardware test was tested up to 32 iterations of attempting to unmap
2018-10-08 13:26:48 +11:00