Changeset 3110 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 14, 2007 4:18:18 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 21993
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/DisplayImpl.cpp
r2981 r3110 1334 1334 } 1335 1335 1336 STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aColorDepth )1336 STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aColorDepth, ULONG aDisplay) 1337 1337 { 1338 1338 AutoLock lock(this); … … 1358 1358 bpp = cBits; 1359 1359 } 1360 ULONG vramSize; 1361 mParent->machine()->COMGETTER(VRAMSize)(&vramSize); 1362 /* enough VRAM? */ 1363 if ((width * height * (bpp / 8)) > (vramSize * 1024 * 1024)) 1364 return setError(E_FAIL, tr("Not enough VRAM for the selected video mode")); 1360 ULONG cMonitors; 1361 mParent->machine()->COMGETTER(MonitorCount)(&cMonitors); 1362 if (cMonitors == 0 && aDisplay > 0) 1363 return E_INVALIDARG; 1364 if (aDisplay >= cMonitors) 1365 return E_INVALIDARG; 1366 1367 // sunlover 20070614: It is up to the guest to decide whether the hint is valid. 1368 // ULONG vramSize; 1369 // mParent->machine()->COMGETTER(VRAMSize)(&vramSize); 1370 // /* enough VRAM? */ 1371 // if ((width * height * (bpp / 8)) > (vramSize * 1024 * 1024)) 1372 // return setError(E_FAIL, tr("Not enough VRAM for the selected video mode")); 1365 1373 1366 1374 if (mParent->getVMMDev()) 1367 mParent->getVMMDev()->getVMMDevPort()->pfnRequestDisplayChange(mParent->getVMMDev()->getVMMDevPort(), aWidth, aHeight, aColorDepth );1375 mParent->getVMMDev()->getVMMDevPort()->pfnRequestDisplayChange(mParent->getVMMDev()->getVMMDevPort(), aWidth, aHeight, aColorDepth, aDisplay); 1368 1376 return S_OK; 1369 1377 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r3001 r3110 6298 6298 <interface 6299 6299 name="IDisplay" extends="$unknown" 6300 uuid=" FD443EC1-0012-4F5B-9282-D72760A66916"6300 uuid="0a6a7746-5469-47e4-9a00-8b1ea28891b8" 6301 6301 wsmap="suppress" 6302 6302 > … … 6353 6353 Specifying "0" for either width and height or the color depth 6354 6354 means that the dimensions or color depth should not be changed. 6355 It is possible to specify the number of the guest display 6356 that has to be resized, if guest supports multimonitor configuration. 6357 The display value 0 means primary display, 1 - first secondary. 6355 6358 </desc> 6356 6359 <param name="width" type="unsigned long" dir="in"/> 6357 6360 <param name="height" type="unsigned long" dir="in"/> 6358 6361 <param name="colorDepth" type="unsigned long" dir="in"/> 6362 <param name="display" type="unsigned long" dir="in"/> 6359 6363 </method> 6360 6364 -
trunk/src/VBox/Main/include/DisplayImpl.h
r3001 r3110 138 138 STDMETHOD(UnlockFramebuffer)(); 139 139 STDMETHOD(RegisterExternalFramebuffer)(IFramebuffer *frameBuf); 140 STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG colorDepth );140 STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG colorDepth, ULONG display); 141 141 STDMETHOD(TakeScreenShot)(BYTE *address, ULONG width, ULONG height); 142 142 STDMETHOD(DrawToScreen)(BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
Note:
See TracChangeset
for help on using the changeset viewer.