| 488 | return true; |
| 489 | } |
| 490 | virtual int Execute(const CaptureOptions &) |
| 491 | { |
| 492 | std::cerr << "Spawning a replay host listening on " << (host.empty() ? "*" : host); |
| 493 | if(port != 0) |
| 494 | std::cerr << ":" << port; |
| 495 | std::cerr << "..." << std::endl; |
| 496 | |
| 497 | if(daemon) |
| 498 | { |
| 499 | std::cerr << "Detaching." << std::endl; |
| 500 | Daemonise(); |
| 501 | } |
| 502 | |
| 503 | usingKillSignal = true; |
| 504 | |
| 505 | // by default have a do-nothing callback that creates no windows |
| 506 | RENDERDOC_PreviewWindowCallback previewWindow; |
| 507 | |
| 508 | // if the user asked for a preview, then call to the platform-specific preview function |
| 509 | if(preview) |
| 510 | previewWindow = &DisplayRemoteServerPreview; |
| 511 | |
| 512 | // OR if the platform-specific preview function always has a window, then return it anyway. |
| 513 | if(DisplayRemoteServerPreview(false, {}).system != WindowingSystem::Unknown) |
| 514 | previewWindow = &DisplayRemoteServerPreview; |
| 515 | |
| 516 | RENDERDOC_BecomeRemoteServer( |
| 517 | conv(host), port, []() { return killSignal; }, previewWindow); |
| 518 | |
| 519 | std::cerr << std::endl << "Cleaning up from replay hosting." << std::endl; |
| 520 | |
| 521 | return 0; |
| 522 | } |
| 523 | }; |
| 524 | |
| 525 | struct ReplayCommand : public Command |
nothing calls this directly
no test coverage detected