Don't log a warning in GetPropertyHelper when the property isn't
present. The function returns an optional, so any callers that want to
log a warning when nullopt is returned can do so themselves.
This prevents plugged-in devices (an Xbox One controller in my case)
from spamming the message "W[COMMON]: CM_Get_DevNode_Property returned:
37" twice per second (that value being CR_NO_SUCH_VALUE).
Check if the return value of std::filesystem::remove_all is -1 rather
than 0; the former is the specified return value if there's an error
while 0 just means the directory already didn't exist (which is the end
result we want).
Previously error messages such as the following were possible:
E[COMMON]: DeleteDirRecursively: [path]/User/RedirectSession/ failed The
operation completed successfully.
Also adds a period in the error string to make it look nicer.
macOS does not support `SO_PRIORITY` on sockets, but it does apparently
support configuring sockets with a priority flag via a parameter called
`SO_NET_SERVICE_TYPE`. It doesn't appear to be especially well
documented, but it seems to exist as far back as 10.11 (El Capitan).
This patch sets QoSSession to treat connections as
"responsive multimedia audio/video", which some docs appear to describe
as "low delay tolerant, low-medium, loss tolerant, elastic flow,
variable packet interval, rate and size".
The instruction implementations that were shifting the size by 4 would
emit an incorrect instruction when given a size of 64. The correct
implementation is to count the number of leading or trailing zeroes in
the size parameter, which is what IntLog2 does.
No callers are affected by this, as they all use sizes other than 64.
Actually, some of these instructions are even invalid with a size of 64,
but I'm changing them anyway for consistency with the others.
In certain cases, the platform can be "wayland-egl", "wayland-xcomposite", and other values for which I haven't found a full list yet. Instead of matching only "wayland", we now look for "wayland" anywhere in the `QT_QPA_PLATFORM` string in a case-insensitive manner.
Acknowledgements:
`CaseInsensitiveContains`' implementation was heavily inspired by GNU's non-standard glibc `strcasestr` function, which can be found here licensed under GPLv2 or later: https://ftp.gnu.org/gnu/libc/
For thread safety, we shouldn't return any pointers or references that
can be used to mutate the state of the PPCSymbolDB. This should be the
final part of making PPCSymbolDB thread safe unless I've missed
something.
9395238 added locking in some PPCSymbolDB functions that access member
variables, but far from all. To ensure thread safety, this commit adds
the missing locking.
Require ReadArray and WriteArray to be called with a trivially copyable
type.
ReadArray and WriteArray call std::fread and std::fwrite respectively.
These functions trigger undefined behavior when the objects are not
trivially copyable, so this adds that requirement to the callers.
Fix some common anti-patterns with these data structures.
- You can dereference the iterator returned by `find` to access the
underlying value directly, without an extra `operator[]`/`at`.
- Rather than checking for an element before insertion/deletion, you can
just do the operation and if needed check the return value to
determine if the insertion/deletion succeeded.
Unlike custom banners which work as an override, this mechanism works as
a fallback. The use case is if you have games you don't really play but
want to keep around for testing purposes without filling up your NAND
with lots of saves. For ease of use, the directory structure is the same
but only title/$title_hi/$title_lo/data/banner.bin files are
relevant.
Cleanup loading code and reduce amount of signals.
On boot. allow previously loaded map to be kept, if its filename matches. Useful for restarting a game with a large symbol map.