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
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>
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>
The settings.h file doesn't actually need all of the definitions
on cam.h, only some of the enums. They can, therefore, be separated
into another file, which is included by settings.h instead.
The other changes are fixing files that included settings.h and
depended on indirect includes from includes of includes of cam.h