Changeset 53897 in vbox
- Timestamp:
- Jan 21, 2015 12:11:05 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97746
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r53372 r53897 37 37 # include "CConsole.h" 38 38 # include "CDisplay.h" 39 40 /* Other VBox includes: */ 41 #include <VBox/VBoxOGL.h> 39 42 40 43 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 63 66 saveMachineViewSettings(); 64 67 65 /* Disable scaling: */66 frameBuffer()->setScaledSize(QSize());68 /* Return scaled-size to 'normal' mode: */ 69 applyMachineViewScaleFactor(); 67 70 68 71 /* Cleanup frame buffer: */ … … 72 75 void UIMachineViewScale::sltPerformGuestScale() 73 76 { 74 /* Check if scale is requested: */ 75 /* Set new frame-buffer scale-factor: */ 77 /* Adjust frame-buffer scaled-size: */ 76 78 frameBuffer()->setScaledSize(viewport()->size()); 79 80 /* Propagate scale-factor to 3D service if necessary: */ 81 if (machine().GetAccelerate3DEnabled() && vboxGlobal().is3DAvailable()) 82 { 83 const double xRatio = (double)frameBuffer()->scaledSize().width() / frameBuffer()->width(); 84 const double yRatio = (double)frameBuffer()->scaledSize().height() / frameBuffer()->height(); 85 display().NotifyScaleFactorChange(m_uScreenId, 86 (uint32_t)(xRatio * VBOX_OGL_SCALE_FACTOR_MULTIPLIER), 87 (uint32_t)(yRatio * VBOX_OGL_SCALE_FACTOR_MULTIPLIER)); 88 } 77 89 78 90 /* Scale the pause-pixmap: */
Note:
See TracChangeset
for help on using the changeset viewer.