4200 Commits

Author SHA1 Message Date
Dentomologist
4e359cf1c5 WindowsDevice: Silence missing property log spam
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).
2025-10-13 11:55:12 -07:00
Jordan Woyak
3978e1eb2c WindowsDevice: Add some utility functions for getting device properties using CfgMgr32. 2025-10-12 12:33:13 -05:00
JMC47
d8bcd6d82e Merge pull request #13996 from SuperSamus/jit64-dynamic-known-jmp-len
Jit64: Dynamic length of regular jump instruction (for known addresses)
2025-10-09 14:07:13 -04:00
JMC47
4f7a910e92 Merge pull request #13964 from ryanmcgrath/macos/qos
macoS: update QoSSession with SO_NET_SERVICE_TYPE.
2025-10-09 14:05:42 -04:00
Martino Fontana
8a97ce9124 MMU: Use templates for Read/Write functions 2025-10-08 11:27:06 +02:00
Martino Fontana
f6e5448b43 Jit64: Dynamic length of regular jump instruction (for known addresses)
Conditional jumps already do that, so let's be consistent.
2025-10-08 00:15:57 +02:00
JosJuice
03ef9b4995 Merge pull request #13995 from Dentomologist/deletedirrecursively_dont_report_error_if_directory_is_absent
DeleteDirRecursively: Don't report error for absent directory
2025-10-06 20:04:32 +02:00
Dentomologist
f64e57442c DeleteDirRecursively: Don't report error for absent directory
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.
2025-10-05 16:29:41 -07:00
Jordan Woyak
b2fef6ee1f Common/Network: Add BluetoothAddress struct and string conversion functions. 2025-10-04 14:51:17 -05:00
Jordan Woyak
b1e8de82a6 Common: Add some utilities to a new UnixUtil header. 2025-10-04 14:51:17 -05:00
Jordan Woyak
504ea99cfa CommonFuncs: Add StrerrorString version of LastStrerrorString that accepts an error number. 2025-10-04 14:51:17 -05:00
Martino Fontana
4f737b7aaf dcbz: Fix AVX path 2025-10-01 21:09:18 +02:00
JosJuice
0c89c00d8b Merge pull request #13929 from SuperSamus/dcbz-jit-improvements
Jit: Small `dcbz` improvements
2025-09-30 18:52:09 +02:00
JMC47
593d386496 Merge pull request #13968 from dwilliams27/remove-logs-mail
Logging: Remove unused Logs/Mail/ dir
2025-09-26 17:16:54 -04:00
JMC47
ff9e0eb2c3 Merge pull request #13945 from iwubcode/math_transpose_function
Common: add transpose function to Matrix class
2025-09-26 17:14:09 -04:00
JMC47
a8fe5c0303 Merge pull request #13634 from jordan-woyak/enum-concepts
Common: Replace enable_if with concepts and other minor modernizations.
2025-09-26 16:13:20 -04:00
Farmerbilly27
8cbfee2136 chore: remove unused Logs/Mail/ dir 2025-09-24 17:42:59 -05:00
Ryan McGrath
5a6730ab4e macoS: update QoSSession with SO_NET_SERVICE_TYPE.
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".
2025-09-22 17:30:18 -04:00
iwubcode
9a37c8081d Common: add transpose function to Matrix class 2025-09-17 11:14:09 -05:00
JMC47
fce5f7c74e Merge pull request #13874 from sepalani/bitcast-ptr
Common/BitUtils: Add operator[] to BitCastPtrType
2025-09-17 04:42:22 -04:00
JMC47
1e3952c801 Merge pull request #13935 from iwubcode/matrix_inverted
Core: support inverting a 4x4 matrix
2025-09-16 14:51:42 -04:00
JosJuice
36f49d140f Merge pull request #13905 from JosJuice/arm64emitter-shift-4
Arm64Emitter: Replace shifting size by 4 with IntLog2 minus 3
2025-09-16 20:08:59 +02:00
iwubcode
d403bc3985 Core: support inverting a 4x4 matrix 2025-09-07 11:41:09 -05:00
Martino Fontana
d1ba849876 Jit64: dcbz, use VMOVAPS with YMM registers on AVX CPUs
LLVM does this, so let's do it as well.
2025-09-02 23:15:27 +02:00
Martino Fontana
5e69da7eba x64Emitter: Support YMM registers
This is accomplished by adding a 0x100 bit the the register.
Made sure that, on AVX instructions, that bit is trucated.
2025-09-02 22:15:16 +02:00
Tilka
b47a75fa2d Merge pull request #13912 from jordan-woyak/simplify-saturating-cast
MathUtil: Simplify SaturatingCast implementation and fix edge case.
2025-08-30 03:00:15 +01:00
JMC47
e0c72cd963 Merge pull request #13825 from jordan-woyak/dont-count-playtime-while-suspended
Common/Timer: Add a SteadyAwakeClock class to make play time tracking ignore time while suspended.
2025-08-28 13:58:26 -04:00
Jordan Woyak
da546bebb8 MathUtil: Simplify SaturatingCast implementation with std::cmp_less/cmp_greater and fix a floating point edge case.
Thanks to Dentomologist for catching the edge case.
2025-08-27 21:24:46 -05:00
JosJuice
9716148203 Arm64Emitter: Replace shifting size by 4 with IntLog2 minus 3
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.
2025-08-24 10:48:21 +02:00
Sepalani
e9f58193a7 Common/BitUtils: Add operator[] to BitCastPtrType 2025-08-18 13:06:12 +04:00
OatmealDome
221d396b3a FloatUtils: Replace quieting SNaNs via 0.0 + x with MakeQuiet 2025-08-17 11:24:38 -04:00
OatmealDome
cfb78dc816 FloatUtils: Move MakeQuiet function here from Interpreter_FPUtils 2025-08-17 11:23:12 -04:00
Tilka
a07974e2c3 Merge pull request #13846 from JoshuaVandaele/better-xcb
Qt: Better wayland detection to enforce xcb
2025-08-10 05:09:25 +01:00
JMC47
c6d55d1b50 Merge pull request #13791 from jordan-woyak/realtek-firmware-loader
BTReal: Implement Realtek firmware loading.
2025-08-04 19:42:59 -04:00
Joshua Vandaële
f8b85edd0c Qt: Better wayland detection to enforce xcb
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/
2025-08-04 19:34:31 +02:00
Admiral H. Curtiss
06e05e0f90 Merge pull request #13794 from Sintendo/doouble-lookup
Avoid map/set double lookups
2025-08-01 21:43:12 +02:00
JosJuice
9f32562e36 PPCSymbolDB: Don't return non-const pointers
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.
2025-07-27 17:03:57 +02:00
JosJuice
fef77a5f20 PPCSymbolDB: Add missing locking
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.
2025-07-27 16:26:47 +02:00
JosJuice
803e6b017b PPCSymbolDB: Reduce lock contention in LoadMap/LoadMapOnBoot
By building the map in a local variable and then swapping it with the
member variable, we avoid the need to hold a lock while building the
map.
2025-07-27 16:26:47 +02:00
Jordan Woyak
62c773ac75 Common/Timer: Add a SteadyAwakeClock class which counts non-suspended system running time. 2025-07-24 23:56:10 -05:00
Jordan Woyak
bfef65a9d1 BTReal: Implement Realtek Bluetooth firmware loading.
Logic and structures are largely taken from Linux source:
drivers/bluetooth/btusb.c
drivers/bluetooth/btrtl.c
drivers/bluetooth/btrtl.h
2025-07-23 19:58:25 -05:00
Jordan Woyak
2b541361c6 Common: Move AsU8Span utility function from BTReal to Common/BitUtils. 2025-07-23 19:58:25 -05:00
Admiral H. Curtiss
68713e08b4 Common: Move GetDeviceProperty() into its own header
Otherwise we include Windows headers in the entire codebase through CommonFuncs.h
2025-07-19 21:24:51 +02:00
JMC47
295ae819f5 Merge pull request #13792 from Tilka/wii_banners
WiiSaveBanner: fall back to $userdir/Load/WiiBanners
2025-07-16 20:29:46 -04:00
Dentomologist
8a28b95480 IOFile: Require trivially copyable types
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.
2025-07-14 11:55:24 -07:00
Joshua Vandaële
06882bd2dc Fix various warnings 2025-07-12 12:47:30 +02:00
Sintendo
f2392e4048 Avoid map/set double lookups
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.
2025-07-08 06:53:42 +02:00
Jordan Woyak
d55012f8d0 Merge pull request #13726 from hoogmin/cpp23_ranges_patch
Common: Replace Contains and ContainsSubrange with C++23 std::ranges equivalents
2025-07-07 21:05:28 -05:00
Tillmann Karras
fe6fd2279c WiiSaveBanner: fall back to $userdir/Load/WiiBanners
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.
2025-07-04 23:15:50 +01:00
TryTwo
fe121e4c6e PPCSymbolDB: Move loading map on boot logic from boot.cpp into PPCSymbolDB, as it will be needing a mutex.
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.
2025-06-25 12:01:16 -07:00