In the future, I would like to refactor HotkeyManager to give us a nice
way to have Android-exclusive hotkeys without relying on ifdefs. But I
want to get this one Android-exclusive hotkey into Dolphin before the
next release anyway, because this is one of the most requested hotkeys,
if not the most requested hotkey.
`RCConstraints::IsAnyConstraintActive()` was extremely inefficient.
It could be argued that, since it's only used in ASSERTs, they could have been changed to DEBUG_ASSERTs.
But with this, we can have them in release builds with little performance impact.
Also, the implementations of `RCConstraints` are moved to the header files, since they tend to be short and thus inline well.
All the low-hanging performance improvements for the register cache are now fixed, with profiling percentages being at expected values.
(Though more micro-optimizations are possible.)
Replace the "array of structure" design with a "structure of array". Boolean members are represented by a bitset.
The main benefit is that filtering the registers in regcache operations can be done in one simple bitwise instruction.
This is especially useful on `Flush`, as callers don't need anymore to limit the iterated registers for performance reasons.
The change only applies to the x86 regcache.
Dynamic input texture JSON could specify rectangles outside the base
image. CopyImageRegion then wrote replacement pixels beyond the
destination vector, allowing a crafted local texture pack to corrupt
the heap.
Validate coordinates and image bounds at the parser and caller. Make
CopyImageRegion independently reject invalid source or destination
ranges.
We now just pass a signal to tell the UI that hardcore mode has been turned on/off, and we replace Settings::IsDebugModeEnabled with Config::IsDebuggingEnabled, which always returns false if hardcore is on.
The register cache is inconsistent in using that or getting it from `GetDefaultLocation(preg_t preg)`.
Considering how simple that function is, let's only use that and remove some state.
Also add requirements for using range functions.
And micro-optimize testing if a bit is set (GCC and MSVC struggle to emit `bt` or `tbz`/`tbnz` with `bs & (1 << n)` compared to `(bs >> n) & 1`).
ScaleTexture flipped its rectangles for backends with a lower-left
origin, but textures are stored top row first and the copy shader
keeps the row order, so the flip is only a no-op for full rectangles.
With a sub-rectangle, OpenGL frame dumps and screenshots read the
bottom of the texture instead of the top, and came out shifted up with
a black band at the bottom.
Pass the rectangles through unchanged. Other backends and callers using
full rectangles are not affected.
Fixes https://bugs.dolphin-emu.org/issues/12286