Morph
eb149ec696
controllers/npad: Fix inconsistencies with controller connection statuses
6 years ago
Morph
334ef2efdd
controllers/npad: Fix LibNX controller connection statuses
This allows homebrew applications to be able to properly detect connected controllers.
6 years ago
Morph
e7c174b426
controllers/npad: Fix LedPattern for P1-4
6 years ago
Morph
f0fac0c7fb
Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
6 years ago
ReinUsesLisp
56ac22f737
cpu_interrupt_handler: Misc style changes
6 years ago
ReinUsesLisp
ea7bda25ba
cpu_interrupt_handler: Make is_interrupted an atomic
Fixes a race condition detected from tsan
6 years ago
Lioncash
67a8e73101
registered_cache: Make use of ends_with for string suffix checking
Simplifies code.
6 years ago
Lioncash
f83c6e1e0c
registered_cache: Make use of designated initializers
Removes the need for comments to indicate the fields being assigned.
6 years ago
Lioncash
b62a8ca43e
key_manager: Make data arrays constexpr
We can convert these maps into constexpr arrays to eliminate some
runtime static constructors.
6 years ago
Lioncash
544fbd5c84
cpu_manager: Make use of ranged for where applicable
We can simplify a few loops by making use of ranged for.
6 years ago
Lioncash
79504f1a39
core_timing: Remove unused header
6 years ago
Lioncash
25cd5d9dda
core_timing: Move clock initializer into constructor initializer list
Same behavior, minus unnecessary zeroing out of the pointer.
6 years ago
Lioncash
2624b1eae6
core_timing: Resolve sign conversion warning
This constant is only ever assigned to downcount, which is a s64, not a
u64.
6 years ago
Lioncash
f6bb905182
common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
6 years ago
Lioncash
551882e512
vfs_real: Resolve sign conversion warnings
6 years ago
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.
6 years ago
MerryMage
836ec9176a
dynarmic: Add unsafe optimizations
6 years ago
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.
6 years ago
Lioncash
b14277ef97
time_zone_content_manager: Collapse auto and default case
Prevents a useless self-assignment from occurring.
6 years ago
Lioncash
03d5a5d9de
software_keyboard: Resolve a pessimizing move warning
A std::vector created in place like this is already an rvalue and
doesn't need to be moved.
6 years ago
Lioncash
2296e921d2
core: Resolve several -Wextra-semi warnings
We can amend one of the cascade macros to require semicolons in order to
compile. In other cases, we can just remove the superfluous semicolons.
6 years ago
Lioncash
a93f6e51d3
emu_window: Mark Scoped constructor and Acquire() as nodiscard
Ensures that callers make use of the constructor, preventing bugs from
silently occurring.
6 years ago
Lioncash
f808258ed9
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
6 years ago
Lioncash
b724a4d90c
General: Tidy up clang-format warnings part 2
6 years ago
Lioncash
8e86fa7e60
common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.
While we're at it, we can also make the template match the requirements
of the standardized variant as well.
6 years ago
Lioncash
61cd7eb47d
freezer: Move entry finding to its own function
Cleans up the callsites in other functions.
6 years ago
Lioncash
06ab28263b
freezer: Take address values by value
VAddr will always be 64-bit, so there's no need to take a trivial
primitive alias by reference.
6 years ago
Lioncash
253a17451b
freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
6 years ago
Lioncash
5b89291308
cheat_engine: Resolve implicit bool->u64 conversion
We can just return zero here.
6 years ago
Lioncash
df96a214ae
cheat_engine: Make use of designated initializers
Same behavior, but makes the member being assigned obvious.
6 years ago
Lioncash
4f2acc54f5
partition_data_manager: Update master key hashes
Fills in some hashes that were previously unhandled.
6 years ago
Lioncash
7f0f37fca7
partition_data_manager: Make data arrays constexpr
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().
This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.
To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
6 years ago
Lioncash
04bb47f57f
partition_data_manager: Eliminate magic value
We can use sizeof to make it obvious at the call site where the value is
coming from.
6 years ago
Lioncash
09f884b7bd
aes_util: Make use of non-template variant of Transcode
Same behavior, less template instantiations.
6 years ago
Lioncash
87c64c41d2
system_control: Make functions internally linked where applicable
These functions are only ever used internally as implementation details
for GenerateRandomRange(), so these can be given internal linkage.
6 years ago
Lioncash
a10d64ea79
kernel: Remove unused variables
Resolves a few compiler warnings.
6 years ago
Lioncash
9893da8e2c
scheduler: Resolve sign conversion warning
6 years ago
Lioncash
1a45b15a8c
address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
6 years ago
Lioncash
a77ee63f65
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
It's undefined behavior to use non-trivially copyable objects with
std::memcpy, so we can add asserts to catch usages of these at
compile-time.
6 years ago
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.
6 years ago
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.
6 years ago
Lioncash
570150bc86
perf_stats: Make use of designated initializers
Same behavior, but allows us to avoid a now-unnecessary zero
initialization.
6 years ago
Lioncash
d767be65be
perf_stats: Mark GetMeanFrametime() as const
The general pattern is to mark mutexes as mutable when it comes to
matters of constness, given the mutex acts as a transient member of a
data structure.
6 years ago
Lioncash
b249e4e0ce
yuzu: Resolve C++20 deprecation warnings related to lambda captures
C++20 deprecates capturing the this pointer via the '=' capture.
Instead, we replace it or extend the capture specification.
6 years ago
Lioncash
f525da56e5
service/ldr: Resolve sign mismatch warnings
We were performing an int < size_t comparison. We can just correct the
type of the induction variable.
6 years ago
Lioncash
04ca1ed2bd
time_zone_binary: Make use of designated initializers
6 years ago
Lioncash
9b837c6069
buffer_queue: Make use of std::nullopt
Allows compilers to eliminate unnecessary zeroing out of the optional's
buffer.
6 years ago
Lioncash
24bd068a08
buffer_queue: Make use of designated initializers
6 years ago
Lioncash
b9831fd80a
profile_manager: Make use of std::nullopt
Allows some implementations to completely avoid unnecessarily zeroing
out the internal buffer.
6 years ago
Lioncash
3fcaf937d2
profile_manager: Make use of designated initializers
More compact code.
6 years ago