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.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
* Forward declare ui and use unique_ptr
* ConfigureEnhancements: use unique_ptr for ui
* Use make_unique instead of new where applicable
* Move some of the ui includes that already used unique_ptr
* main.cpp: also make use of make_unique on Config
* Address review comments
The deep recursion has caused issues in certain games with large numbers of files, especially with MSVC builds.
Previously the recursion depth is about equal to the number of files present. With this the depth should be about equal to the maximum depth of the directory structure of the RomFS.
Consistency change with how we mark constants in the rest of the
codebase.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
The list of points is returned by const reference, so we don't need to
make a copy of every element in the list.
Co-authored-by: Lioncash <mathew1800@gmail.com>
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
anyway. This is Linux-specific, as the Apple and BSD versions of
`pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
"yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
fits into the Linux limit. Some other thread names are also cut off,
but I didn't bother addressing them as you can guess them from the
truncated versions. For a CPU thread, truncation means you can't see
which core it is!
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.
Co-Authored-By: LC <lioncash@users.noreply.github.com>
These are intentionally discarded internally, since the rest of the
public API allows querying success. We want all non-internal uses of
these functions to be explicitly checked, so we can signify that we
intentionally want to discard the return values here.
5.95 contains a potentially backward-compatibility breaking change, so
we should be updating to this to ensure that our code remains
forward-compatible.
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>