Preview windows changes

This commit is contained in:
2026-05-20 14:47:45 +10:00
parent bfaa3f5e0e
commit 7e17315e74
6 changed files with 13 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
namespace RenderCadenceCompositor
{
constexpr double kDefaultPreviewFps = 30.0;
constexpr double kDefaultPreviewFps = 60.0;
constexpr double kMinimumPreviewFps = 1.0;
struct PreviewWindowConfig

View File

@@ -210,6 +210,10 @@ void PreviewWindowThread::Paint(HWND window)
frame.height > 0;
if (canPaintFrame)
{
const int previousStretchMode = SetStretchBltMode(dc, HALFTONE);
POINT previousBrushOrigin = {};
SetBrushOrgEx(dc, 0, 0, &previousBrushOrigin);
BITMAPINFO bitmapInfo = {};
bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bitmapInfo.bmiHeader.biWidth = static_cast<LONG>(frame.width);
@@ -232,6 +236,10 @@ void PreviewWindowThread::Paint(HWND window)
&bitmapInfo,
DIB_RGB_COLORS,
SRCCOPY);
if (previousStretchMode != 0)
SetStretchBltMode(dc, previousStretchMode);
SetBrushOrgEx(dc, previousBrushOrigin.x, previousBrushOrigin.y, nullptr);
}
else
{