- Timestamp:
- Dec 6, 2018 2:41:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r74942 r76016 247 247 void UIMachineView::applyMachineViewScaleFactor() 248 248 { 249 /* Sanity check: */ 250 if (!frameBuffer()) 251 return; 252 249 253 /* Acquire selected scale-factor: */ 250 254 double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid(), m_uScreenId); 251 255 252 256 /* Take the device-pixel-ratio into account: */ 257 frameBuffer()->setDevicePixelRatio(gpDesktop->devicePixelRatio(machineWindow())); 258 frameBuffer()->setDevicePixelRatioActual(gpDesktop->devicePixelRatioActual(machineWindow())); 253 259 const double dDevicePixelRatioActual = frameBuffer()->devicePixelRatioActual(); 254 260 const bool fUseUnscaledHiDPIOutput = dScaleFactor != dDevicePixelRatioActual; … … 609 615 } 610 616 } 611 /* Reapply machine-view scale-factor if necessary: */ 612 if (m_pFrameBuffer) 613 applyMachineViewScaleFactor(); 617 /* Reapply machine-view scale-factor: */ 618 applyMachineViewScaleFactor(); 614 619 break; 615 620 } … … 1464 1469 /* Recache current host screen: */ 1465 1470 m_iHostScreenNumber = iCurrentHostScreenNumber; 1466 1467 /* Update frame-buffer arguments: */ 1468 if (m_pFrameBuffer) 1469 { 1470 /* Update device-pixel-ratio for underlying frame-buffer: */ 1471 m_pFrameBuffer->setDevicePixelRatio(gpDesktop->devicePixelRatio(machineWindow())); 1472 m_pFrameBuffer->setDevicePixelRatioActual(gpDesktop->devicePixelRatioActual(machineWindow())); 1473 /* Perform frame-buffer rescaling: */ 1474 m_pFrameBuffer->performRescale(); 1475 } 1476 1477 /* Update console's display viewport and 3D overlay: */ 1478 updateViewport(); 1471 /* Reapply machine-view scale-factor if necessary: */ 1472 applyMachineViewScaleFactor(); 1479 1473 } 1480 1474 break;
Note:
See TracChangeset
for help on using the changeset viewer.