mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
netplay: let a title present its own sandboxed local view
psx_mod_render_local_view() runs a title's draw code in the render-pass sandbox on a forward netplay frame and keeps the drawn display rect in the OpenGL presenter's surface only. The authoritative CPU VRAM, guest RAM, rollback snapshots and digests keep the canonical frame; the presenter shows this peer's own image. A committed image cancels any local-view crop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -161,6 +161,16 @@ that identical frame; only what its window shows changes:
|
||||
savestate, and is ignored offline. The headless present-image ring records
|
||||
the same rectangle, which is how a harness checks it. Vulkan, which netplay
|
||||
replaces with the software present, ignores it.
|
||||
- `psx_mod_render_local_view(cpu, rect, fn, user)` (`mod_plugins.h`): this
|
||||
peer draws its *own* image of a display rect with the game's code, for
|
||||
example its seat's single full-screen view, inside the render-pass sandbox
|
||||
(docs/RENDER_PASSES.md, "Netplay local view"). The machine is restored
|
||||
afterwards, so the canonical frame stays in the authoritative VRAM, rollback
|
||||
snapshots and digests; only the OpenGL presenter's surface keeps the image.
|
||||
A committed image cancels any `psx_netplay_present_local_view` crop
|
||||
(`psx_netplay_local_view_clear`). Forward netplay frames only; a title falls
|
||||
back to the crop when `psx_mod_render_local_view_status()` is not ready
|
||||
(software present, Vulkan, resimulation).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user