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
Since PR #14115, writeAddr is p_paddr | 0x80000000, so comparing it against
the physical RAM size skipped every segment and broke booting MIOS
(GameCube discs from the Wii Disc Channel).
Mask to the physical address before comparing.
Fixes https://bugs.dolphin-emu.org/issues/14176
GLX11Window::Create called XSelectInput(display, parent_window,
StructureNotifyMask) on the host's display connection, which replaces
the event mask that the host (DolphinQt or DolphinNoGUI) selected for
the window instead of adding to it.
As a result, Qt stopped receiving FocusIn/FocusOut, key and mouse
events for the render window once an OpenGL context had been created
on it. The same issue made DolphinNoGUI lose its key and focus events
with OpenGL.
The GL code doesn't process any events itself, and the hosts already
select StructureNotify, so just drop the call. Also stop discarding
pending events in XSync, as the event queue belongs to the host.
Fixes https://bugs.dolphin-emu.org/issues/13354
The context menu was created with Qt::WA_DeleteOnClose, but its actions
open modal dialogs from within QMenu's own activation code. A nested
event loop could process the menu's deferred deletion before control
returned to QMenu, which then accessed freed memory, causing crashes or
heap corruption.
Own the menu with a std::unique_ptr so it is only destroyed once
QMenu::exec has returned.
Fixes https://bugs.dolphin-emu.org/issues/13816
All PowerPC add and subtract instructions compute a + b + carry_in,
with ~rA as a for the subtract forms. Helper_Add computes this sum in
64 bits and writes rD. Depending on its template parameters, it also
writes CA (bit 32 of the sum), and OV and CR0 as requested by the OE
and Rc bits.
This replaces the carry and overflow code of each instruction and
HasAddOverflowed. There is no behavior change.
With GCC -O3 on x86-64, each instruction compiles to the same number
of host instructions as before, or one fewer.
When XER[CA] was set, addme and subfme always cleared it.
Both instructions add 0xFFFFFFFF and CA to their operand (rA for addme,
~rA for subfme). With CA=1, this adds 2^32, so there is always a carry
out. With CA=0, there is a carry out unless the operand is 0.
This affected the interpreter, the cached interpreter and the JitArm64
fallbacks (addmeo/subfmeo). Jit64 already computes the right value.
PopulateConfig is called through FillBackendInfo both from Initialize
and from InitBackendInfo, which creates a temporary GL context to query
the backend's capabilities. InitBackendInfo runs when booting (from
Core::Init) and when the graphics settings refresh the backend info, so
the "Video Info" message got queued two or three times, and all of them
were shown once the first frame was drawn.
Move the OSD messages to Initialize so they're only added once per
emulation start.
Fixes https://bugs.dolphin-emu.org/issues/13574
`slice_length` is defined as an int, but was being zero-extended to 64
bits on x64. We should match what we do for ARM64 and sign-extend, as
discussed in PR #14944.
I do not own an Apple device and as such this is completely untested by myself. A user requesting this feature on Discord has confirmed this makes dolphin-tool show up. Most of these changes come from looking at what already exists for DolphinQt and the Mac Updater.
Related issue: https://bugs.dolphin-emu.org/issues/13259