If an overlay is closed with overlayMsg_close, the message can be freed
while it is still being used by msg_render, resulting in a segfault. Lock
the message list for the duration of msg_render to fix this.
The renderer contains an optimization to skip ImGui if there is nothing to
show, but the status overlay always returns a damage rect, even if it
didn't draw anything, so the optimization can never take effect.
While resuming from hibernation lgmpTimer may transition app.state to
APP_STATE_REINIT_LGMP. Sometimes the transition is lost if the app_main
processing loop also changes app.state simultaneously. This seems to
occur frequently with the hibernation use case.
Separate lgmp timer state into its own enum. Move resulting app.state
transitions to the app_main loop so they are serialized.
When the heapTest fails for DMA copies to shared memory, fallback to
conventional CPU copy via mapped resources. While this is less optimal,
it is still faster then the older DXGI capture backend.
As reported by @Crispy-fried-chicken in issue #1133 there is a potential
XXE vulnerability here. This fixes this problem by verifying the value
of `vmf->pgff` does not exceed the bounds of the memory mapping.
Fixes: #1133
virt-manager (or libvirt itself) tends to preserve outer quotation marks but explode inner double-quotes into '"' which is annoying.
this looks nicer when pasted into the XML editor and applied
Also used double-quotes for the QEMU <6.2 example for consistency
PS: added myself to AUTHORS since this is my first contribution
AMD GPUs and older NVidia GPUs can initialize fine but fail when we
start to create resources in the shared memory heap, we must test it
early to detect this so we can fallback to a working capture method.
Moving this prevented the RX580 crash early in init, but later
presents during the capture. As we want to ensure fallback to DXGI
if this happens we need to catch this fault during init. This moves
the order back so that we fail back into a working state.