From 11b3a0bebdfdfe15ca2985624244fd1acd978fe4 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Tue, 4 Sep 2018 14:19:53 -0600 Subject: [PATCH] rescale refresh frame for X11 direct scaling --- cinelerra-5.1/cinelerra/cwindowgui.C | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index eca6fad0..3b1d0ac8 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -1082,6 +1082,15 @@ void CWindowCanvas::draw_refresh(int flush) in_x2 > in_x1 && in_y2 > in_y1) { +// input scaled from session to refresh frame coordinates + int ow = get_output_w(mwindow->edl); + int oh = get_output_h(mwindow->edl); + int rw = refresh_frame->get_w(); + int rh = refresh_frame->get_h(); + float xs = (float)rw / ow; + float ys = (float)rh / oh; + in_x1 *= xs; in_x2 *= xs; + in_y1 *= ys; in_y2 *= ys; // Can't use OpenGL here because it is called asynchronously of the // playback operation. get_canvas()->draw_vframe(refresh_frame, -- 2.26.2