From b730308e2ff5390091cc3a41794eb0fd8fb40563 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Fri, 5 Aug 2022 10:54:36 +0200 Subject: [PATCH] mouseclick: Account for render target scale when creating geometry --- src/effects/mouseclick/mouseclick.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/effects/mouseclick/mouseclick.cpp b/src/effects/mouseclick/mouseclick.cpp index 76c5b37e8e..0b0002211f 100644 --- a/src/effects/mouseclick/mouseclick.cpp +++ b/src/effects/mouseclick/mouseclick.cpp @@ -277,6 +277,7 @@ void MouseClickEffect::drawCircleGl(const QColor &color, float cx, float cy, flo static const float theta = 2 * 3.1415926 / float(num_segments); static const float c = cosf(theta); // precalculate the sine and cosine static const float s = sinf(theta); + const float scale = effects->renderTargetScale(); float t; float x = r; // we start at angle = 0 @@ -290,7 +291,7 @@ void MouseClickEffect::drawCircleGl(const QColor &color, float cx, float cy, flo verts.reserve(num_segments * 2); for (int ii = 0; ii < num_segments; ++ii) { - verts << x + cx << y + cy; // output vertex + verts << (x + cx) * scale << (y + cy) * scale; // output vertex // apply the rotation matrix t = x; x = c * x - s * y;