diff options
author | Chris Xiong <chirs241097@gmail.com> | 2022-02-28 00:54:20 -0500 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2022-02-28 00:56:37 -0500 |
commit | 07ee50be7c390668f8c600b8eb5805f56cf6a8a1 (patch) | |
tree | 7f91ffcd88638d4978f3d55ed26b8739e71ec253 /visualization/qmpvisualization.cpp | |
parent | 3123c15dc60de97ce1696ea1e33aeae46c9831ba (diff) | |
download | QMidiPlayer-07ee50be7c390668f8c600b8eb5805f56cf6a8a1.tar.xz |
Fix clipped output in rendering if video resolution > monitor resolution.
Diffstat (limited to 'visualization/qmpvisualization.cpp')
-rw-r--r-- | visualization/qmpvisualization.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index e18426c..db896fd 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -149,6 +149,7 @@ void qmpVisualization::showThread() nebuf = new smEntity3DBuffer(); tdscn = sm->smTargetCreate(wwidth * wsupersample, wheight * wsupersample, wmultisample); tdparticles = sm->smTargetCreate(wwidth * wsupersample, wheight * wsupersample, wmultisample); + rdrtrg = rendermode ? sm->smTargetCreate(wwidth, wheight) : 0; if (!api->getOptionString("Visualization/font2").length() || !font.loadTTF(api->getOptionString("Visualization/font2").c_str(), fontsize)) if (!font.loadTTF("/usr/share/fonts/truetype/freefont/FreeMono.ttf", fontsize)) if (!font.loadTTF("/usr/share/fonts/gnu-free/FreeMono.otf", fontsize)) @@ -921,7 +922,7 @@ bool qmpVisualization::update() } if (!flat) updateVisualization3D(); - sm->smRenderBegin2D(); + sm->smRenderBegin2D(false, rdrtrg); sm->smClrscr(0xFF666666); q.blend = BLEND_ALPHABLEND; for (int i = 0; i < 4; ++i) @@ -1051,7 +1052,6 @@ bool qmpVisualization::update() font.render(xp, yp += 3 * step, 0.5, 0xFFFFFFFF, align); font.render(xp - 1, yp - 1, 0.5, 0xFF000000, align); } - sm->smRenderEnd(); if (rendermode) { if (ctk > api->getMaxTick()) @@ -1062,6 +1062,7 @@ bool qmpVisualization::update() framecb(fbcont, 4 * wwidth * wheight, ctk, api->getMaxTick()); } } + sm->smRenderEnd(); return shouldclose; } |