@@ -313,12 +313,11 @@ QImage WbWrenWindow::grabWindowBufferNow() {
313313 mSnapshotBufferHeight = destinationHeight;
314314 mSnapshotBuffer = new unsigned char [4 * destinationWidth * destinationHeight];
315315 }
316- const qreal ratio = devicePixelRatio ();
317- const int sourceWidth = destinationWidth * ratio;
318- const int sourceHeight = destinationHeight * ratio;
316+ const int sourceWidth = destinationWidth;
317+ const int sourceHeight = destinationHeight;
319318 unsigned char *temp = new unsigned char [4 * sourceWidth * sourceHeight];
320319 readPixels (sourceWidth, sourceHeight, GL_BGRA, temp);
321- flipAndScaleDownImageBuffer (temp, mSnapshotBuffer , sourceWidth, sourceHeight, ratio );
320+ flipAndScaleDownImageBuffer (temp, mSnapshotBuffer , sourceWidth, sourceHeight, 1.0 );
322321 delete[] temp;
323322 WbWrenOpenGlContext::doneWren ();
324323
@@ -328,9 +327,8 @@ QImage WbWrenWindow::grabWindowBufferNow() {
328327void WbWrenWindow::initVideoPBO () {
329328 WbWrenOpenGlContext::makeWrenCurrent ();
330329
331- const int ratio = (int )devicePixelRatio ();
332- mVideoWidth = width () * ratio;
333- mVideoHeight = height () * ratio;
330+ mVideoWidth = width ();
331+ mVideoHeight = height ();
334332 const int size = 4 * mVideoWidth * mVideoHeight ;
335333 wr_scene_init_frame_capture (wr_scene_get_instance (), PBO_COUNT, mVideoPBOIds , size);
336334 mVideoPBOIndex = -1 ;
0 commit comments