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`).
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
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
Legacy savestate headers controlled both the compressed input length
and the decompression buffer size. The input was read into a fixed-size
buffer without validation, and the unsafe LZO API could write past its
output buffer.
Use the legacy block size as the output capacity, reject oversized
compressed blocks, and use the bounds-checking LZO decompressor.
FIFO logs control each memory update address and data size. Playback
masked only the start address into RAM or EXRAM, then copied the
complete update contiguously. An update reaching the end of a mapped
region could therefore write beyond host-mapped emulated memory.
Resolve the target through MemoryManager and reject updates larger than
the remaining valid span before copying them.
ReceiveL2capData forwarded HID output reports to m_hid_source without
checking it. SetSource accepts nullptr (e.g. Wii Remote set to "Real"
with no real remote connected), and the game's L2CAP channel can still
be open when that happens, so the next output report crashed the CPU
thread with a null dereference.
Seen on Android with Skylanders: Spyro's Adventure and Wii Remote 1 set
to Real Wii Remote.
Previously, if the USB Gecko server failed to bind to any port in the
55020-55030 range, it silently returned with no indication to the user.
Now displays an on-screen message and logs an error.