From 17831ca0f4caa1ce57653ff9b154b5d5f620aaaf Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Tue, 11 Oct 2022 15:15:40 +0200 Subject: [PATCH] video zoom: Fix visual tools with DPI scaling --- src/video_display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_display.cpp b/src/video_display.cpp index f4d899847..3d91f5fcf 100644 --- a/src/video_display.cpp +++ b/src/video_display.cpp @@ -197,11 +197,11 @@ void VideoDisplay::Render() try { int client_w, client_h; GetClientSize(&client_w, &client_h); - E(glViewport(0, 0, client_w, client_h)); + E(glViewport(0, 0, client_w * scale_factor, client_h * scale_factor)); E(glMatrixMode(GL_PROJECTION)); E(glLoadIdentity()); - E(glOrtho(0.0f, client_w / scale_factor, client_h / scale_factor, 0.0f, -1000.0f, 1000.0f)); + E(glOrtho(0.0f, client_w, client_h, 0.0f, -1000.0f, 1000.0f)); if (OPT_GET("Video/Overscan Mask")->GetBool()) { double ar = con->videoController->GetAspectRatioValue();