graphics: option to include subscreens in screenshot (#866)

## Link to GitHub Issue or related Pull Request, if one exists
#0

## Description of change
Adds `-screenshotsub`. Off by default. When on, screenshots include the
subscreens. All subscreens are captured, even if they are hidden from
view. Works for all four screens of gitadora arena model as well.

This should also fix an issue with API / companion app not capturing
gitadora subscreen correctly.

Note: only done for DX9... DX11 will need another PR to make this work.

Unrelated to this PR, there seems to be a bug with gitadora not
accepting mouse or api touch input.

## Testing
This commit is contained in:
bicarus
2026-08-14 04:05:50 -07:00
committed by GitHub
parent c6cd72c528
commit f5888609a8
11 changed files with 257 additions and 70 deletions
@@ -1478,7 +1478,7 @@ static void graphics_d3d9_ldj_on_present(IDirect3DDevice9 *wrapped_device) {
void graphics_d3d9_on_present(
HWND hFocusWindow,
IDirect3DDevice9 *device,
IDirect3DDevice9 *wrapped_device) {
WrappedIDirect3DDevice9 *wrapped_device) {
// image resize / orientation swap. run here (the present path) rather than from `EndScene`,
// which may fire several times per frame on multi-pass / render-to-texture games. this is the
@@ -1493,7 +1493,7 @@ void graphics_d3d9_on_present(
// before the overlay render so the screenshot excludes it
if (!GRAPHICS_SCREENSHOT_INCLUDE_OVERLAY) {
graphics_d3d9_process_screenshot(device, SUB_SWAP_CHAIN);
graphics_d3d9_process_screenshot(device, wrapped_device);
}
// Do overlay init as many d3d9 hooks create a dummy instance to get vtable offsets and never
@@ -1517,7 +1517,7 @@ void graphics_d3d9_on_present(
// after the overlay render so the screenshot includes toasts / menus
if (GRAPHICS_SCREENSHOT_INCLUDE_OVERLAY) {
graphics_d3d9_process_screenshot(device, SUB_SWAP_CHAIN);
graphics_d3d9_process_screenshot(device, wrapped_device);
}
// for IIDX TDJ / SDVX UFC, handle subscreen
@@ -1535,7 +1535,7 @@ void graphics_d3d9_on_present(
}
// API capture always includes the overlay
graphics_d3d9_process_capture(device, SUB_SWAP_CHAIN);
graphics_d3d9_process_capture(device, wrapped_device);
}
void update_backbuffer_dimensions(D3DPRESENT_PARAMETERS *params) {