Add an injected IDXGISwapChain::Present / Present1 hook as a lower-latency, border-free alternative to WGC. The hook copies the swapchain backbuffer into a shared keyed-mutex texture (coop_video_<pid>); the host opens it by name and samples it. New opt-in HookSubsys_Video (protocol v6 -> v7); the Video mirror panel gains a WGC vs Hooked source toggle that installs/removes the subsystem. Verified by present_hook_test (drives a real D3D11 swapchain end-to-end and reads the rendered pixels back through the shared texture) and against Phantom Brave (D3D9: hook installs cleanly and stays idle, WGC fallback). All 5 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
990 B
CMake
40 lines
990 B
CMake
add_executable(coop_host WIN32
|
|
src/main.cpp
|
|
src/d3d11_window.cpp
|
|
src/imgui_layer.cpp
|
|
src/controllers_panel.cpp
|
|
src/injection_panel.cpp
|
|
src/capture_panel.cpp
|
|
src/audio_panel.cpp
|
|
src/log_panel.cpp
|
|
src/ui/app_chrome.cpp
|
|
src/input/xinput_source.cpp
|
|
src/inject/process_list.cpp
|
|
src/inject/injector.cpp
|
|
src/ipc/ipc_server.cpp
|
|
src/capture/frame_renderer.cpp
|
|
src/capture/window_capture.cpp
|
|
src/capture/shared_texture.cpp
|
|
src/audio/audio_loopback.cpp
|
|
src/audio/process_loopback_capture.cpp)
|
|
|
|
target_include_directories(coop_host PRIVATE src)
|
|
|
|
# Process-loopback capture (AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK) needs the
|
|
# Windows 10 20H1 (NTDDI_WIN10_CO) headers; raise the target SDK version for it.
|
|
target_compile_definitions(coop_host PRIVATE NTDDI_VERSION=0x0A00000B)
|
|
|
|
target_link_libraries(coop_host PRIVATE
|
|
coop_common
|
|
imgui
|
|
d3d11
|
|
dxgi
|
|
dwmapi
|
|
d3dcompiler
|
|
windowsapp
|
|
xinput
|
|
mmdevapi
|
|
ole32)
|
|
|
|
set_target_properties(coop_host PROPERTIES OUTPUT_NAME "coop_host")
|