mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Add option to renderdoccmd replay to specify a loop count
This commit is contained in:
@@ -56,7 +56,8 @@ rdcarray<rdcstr> convertArgs(const std::vector<std::string> &args)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void DisplayRendererPreview(IReplayController *renderer, uint32_t width, uint32_t height)
|
||||
void DisplayRendererPreview(IReplayController *renderer, uint32_t width, uint32_t height,
|
||||
uint32_t numLoops)
|
||||
{
|
||||
if(renderer == NULL)
|
||||
return;
|
||||
@@ -100,7 +101,7 @@ void DisplayRendererPreview(IReplayController *renderer, uint32_t width, uint32_
|
||||
d.resourceId = id;
|
||||
}
|
||||
|
||||
DisplayRendererPreview(renderer, d, width, height);
|
||||
DisplayRendererPreview(renderer, d, width, height, numLoops);
|
||||
}
|
||||
|
||||
std::map<std::string, Command *> commands;
|
||||
@@ -517,6 +518,8 @@ struct ReplayCommand : public Command
|
||||
parser.set_footer("<capture.rdc>");
|
||||
parser.add<uint32_t>("width", 'w', "The preview window width.", false, 1280);
|
||||
parser.add<uint32_t>("height", 'h', "The preview window height.", false, 720);
|
||||
parser.add<uint32_t>("loops", 'l', "How many times to loop the replay, or 0 for indefinite.",
|
||||
false, 0);
|
||||
parser.add<string>("remote-host", 0,
|
||||
"Instead of replaying locally, replay on this host over the network.", false);
|
||||
parser.add<uint32_t>("remote-port", 0, "If --remote-host is set, use this port.", false,
|
||||
@@ -574,7 +577,7 @@ struct ReplayCommand : public Command
|
||||
if(status == ReplayStatus::Succeeded)
|
||||
{
|
||||
DisplayRendererPreview(renderer, parser.get<uint32_t>("width"),
|
||||
parser.get<uint32_t>("height"));
|
||||
parser.get<uint32_t>("height"), parser.get<uint32_t>("loops"));
|
||||
|
||||
remote->CloseCapture(renderer);
|
||||
}
|
||||
@@ -606,7 +609,7 @@ struct ReplayCommand : public Command
|
||||
if(status == ReplayStatus::Succeeded)
|
||||
{
|
||||
DisplayRendererPreview(renderer, parser.get<uint32_t>("width"),
|
||||
parser.get<uint32_t>("height"));
|
||||
parser.get<uint32_t>("height"), parser.get<uint32_t>("loops"));
|
||||
|
||||
renderer->Shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user