Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 76015)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 76016)
@@ -247,8 +247,14 @@
 void UIMachineView::applyMachineViewScaleFactor()
 {
+    /* Sanity check: */
+    if (!frameBuffer())
+        return;
+
     /* Acquire selected scale-factor: */
     double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid(), m_uScreenId);
 
     /* Take the device-pixel-ratio into account: */
+    frameBuffer()->setDevicePixelRatio(gpDesktop->devicePixelRatio(machineWindow()));
+    frameBuffer()->setDevicePixelRatioActual(gpDesktop->devicePixelRatioActual(machineWindow()));
     const double dDevicePixelRatioActual = frameBuffer()->devicePixelRatioActual();
     const bool fUseUnscaledHiDPIOutput = dScaleFactor != dDevicePixelRatioActual;
@@ -609,7 +615,6 @@
                 }
             }
-            /* Reapply machine-view scale-factor if necessary: */
-            if (m_pFrameBuffer)
-                applyMachineViewScaleFactor();
+            /* Reapply machine-view scale-factor: */
+            applyMachineViewScaleFactor();
             break;
         }
@@ -1464,17 +1469,6 @@
                     /* Recache current host screen: */
                     m_iHostScreenNumber = iCurrentHostScreenNumber;
-
-                    /* Update frame-buffer arguments: */
-                    if (m_pFrameBuffer)
-                    {
-                        /* Update device-pixel-ratio for underlying frame-buffer: */
-                        m_pFrameBuffer->setDevicePixelRatio(gpDesktop->devicePixelRatio(machineWindow()));
-                        m_pFrameBuffer->setDevicePixelRatioActual(gpDesktop->devicePixelRatioActual(machineWindow()));
-                        /* Perform frame-buffer rescaling: */
-                        m_pFrameBuffer->performRescale();
-                    }
-
-                    /* Update console's display viewport and 3D overlay: */
-                    updateViewport();
+                    /* Reapply machine-view scale-factor if necessary: */
+                    applyMachineViewScaleFactor();
                 }
                 break;
