For the remote server preview, display at 90% scale

* This makes it more clear that the preview is coming from renderdoc's
  replay, not the original program.
This commit is contained in:
baldurk
2018-01-02 15:22:09 +00:00
parent 6f6ee4ce01
commit c30511e523
+6 -13
View File
@@ -1949,20 +1949,13 @@ void ReplayProxy::RefreshPreviewWindow()
float xScale = float(winWidth) / float(texInfo.width);
float yScale = float(winHeight) / float(texInfo.height);
if(xScale > yScale)
{
// use the y scale, calculate the x offset to centre horizontally
cfg.scale = yScale;
// use the smaller scale, and shrink a little so we don't display it fullscreen - makes it a
// little clearer that this is the replay, not the original application
cfg.scale = RDCMIN(xScale, yScale) * 0.9f;
cfg.xOffset = (float(winWidth) - float(texInfo.width) * cfg.scale) / 2.0f;
}
else
{
// use the x scale, calculate the y offset to centre vertically
cfg.scale = xScale;
cfg.yOffset = (float(winHeight) - float(texInfo.height) * cfg.scale) / 2.0f;
}
// centre the texture
cfg.xOffset = (float(winWidth) - float(texInfo.width) * cfg.scale) / 2.0f;
cfg.yOffset = (float(winHeight) - float(texInfo.height) * cfg.scale) / 2.0f;
m_Replay->RenderTexture(cfg);
}