Mirror the injected game's window into the host's borderless window so Steam RPT streams a live copy of the game. No injection needed for video. - capture/window_capture: WGC capture of a target HWND. Wraps our D3D11 device as an IDirect3DDevice, creates a free-threaded frame pool + capture session, hides the cursor and (best-effort) the capture border. Frames arrive on a WGC thread and are handed to the render thread, which copies the newest into a shader-resource texture and draws it -- keeping all D3D11 context use on one thread. Handles window resize via frame-pool Recreate. - capture/frame_renderer: fullscreen-triangle shader that blits the captured texture letterboxed (aspect-preserved) into the window. - capture_panel: "Mirror game window" toggle + lifecycle; target HWND comes from the hook's reported game window. - main: winrt apartment init; mirrored frame drawn as background, ImGui on top. - CMake: link windowsapp + d3dcompiler. Verified: builds clean; host starts (apartment init + shader compile succeed). Visual capture quality/latency to be judged on a real game. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
567 B
CMake
28 lines
567 B
CMake
add_executable(coop_host WIN32
|
|
src/main.cpp
|
|
src/d3d11_window.cpp
|
|
src/imgui_layer.cpp
|
|
src/debug_overlay.cpp
|
|
src/injection_panel.cpp
|
|
src/capture_panel.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)
|
|
|
|
target_include_directories(coop_host PRIVATE src)
|
|
|
|
target_link_libraries(coop_host PRIVATE
|
|
coop_common
|
|
imgui
|
|
d3d11
|
|
dxgi
|
|
dwmapi
|
|
d3dcompiler
|
|
windowsapp
|
|
xinput)
|
|
|
|
set_target_properties(coop_host PROPERTIES OUTPUT_NAME "coop_host")
|