Changeset 27218 in vbox
- Timestamp:
- Mar 9, 2010 2:55:14 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r27215 r27218 772 772 CConsole console = session().GetConsole(); 773 773 774 /* Take the screenshot for debugging purposes and save it */ 774 /* Take the screenshot for debugging purposes and save it. 775 * TODO: create png's from all configured monitors if possible. */ 775 776 QString strLogFolder = console.GetMachine().GetLogFolder(); 776 777 QString strFileName = strLogFolder + "/VBox.png"; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r27215 r27218 975 975 (state != KMachineState_TeleportingPausedVM || m_previousState != KMachineState_Teleporting)) 976 976 { 977 /* Take a screen snapshot. Note that TakeScreenShot() always needs a 32bpp image: */ 978 QImage shot = QImage(m_pFrameBuffer->width(), m_pFrameBuffer->height(), QImage::Format_RGB32); 979 CDisplay dsp = session().GetConsole().GetDisplay(); 980 dsp.TakeScreenShot(shot.bits(), shot.width(), shot.height()); 981 /* TakeScreenShot() may fail if, e.g. the Paused notification was delivered 982 * after the machine execution was resumed. It's not fatal: */ 983 if (dsp.isOk()) 977 if (screenId() == 0) 984 978 { 985 dimImage(shot); 986 m_pauseShot = QPixmap::fromImage(shot); 987 /* Fully repaint to pick up m_pauseShot: */ 988 repaint(); 979 /* Take a screen snapshot. Note that TakeScreenShot() always needs a 32bpp image: */ 980 QImage shot = QImage(m_pFrameBuffer->width(), m_pFrameBuffer->height(), QImage::Format_RGB32); 981 CDisplay dsp = session().GetConsole().GetDisplay(); 982 dsp.TakeScreenShot(shot.bits(), shot.width(), shot.height()); 983 /* TakeScreenShot() may fail if, e.g. the Paused notification was delivered 984 * after the machine execution was resumed. It's not fatal: */ 985 if (dsp.isOk()) 986 { 987 dimImage(shot); 988 m_pauseShot = QPixmap::fromImage(shot); 989 /* Fully repaint to pick up m_pauseShot: */ 990 repaint(); 991 } 992 }else 993 { 994 /* For secondary monitors we support 32 bit formats only for now. */ 995 if ( m_pFrameBuffer 996 && m_pFrameBuffer->pixelFormat() == FramebufferPixelFormat_FOURCC_RGB 997 && m_pFrameBuffer->bitsPerPixel() == 32) 998 { 999 BYTE *pMem; 1000 m_pFrameBuffer->GetAddress(&pMem); 1001 QImage shot = QImage(pMem, m_pFrameBuffer->width(), m_pFrameBuffer->height(), QImage::Format_RGB32); 1002 dimImage(shot); 1003 m_pauseShot = QPixmap::fromImage(shot); 1004 /* Fully repaint to pick up m_pauseShot: */ 1005 repaint(); 1006 } 1007 else 1008 { 1009 /* If there is no framebuffer or a unsupported format, just create a black image to show. */ 1010 QImage shot = QImage(m_pFrameBuffer->width(), m_pFrameBuffer->height(), QImage::Format_RGB32); 1011 shot.fill(0); 1012 m_pauseShot = QPixmap::fromImage(shot); 1013 /* Fully repaint to pick up m_pauseShot: */ 1014 repaint(); 1015 } 989 1016 } 990 1017 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r27207 r27218 595 595 QMenu *pMenu = m_pMenuPool->createMenu(actionsPool()); 596 596 597 /* Re-init menu pool for the case m anu were recreated: */597 /* Re-init menu pool for the case menu were recreated: */ 598 598 reinitMenuPool(); 599 599 … … 607 607 QMenuBar *pMenuBar = m_pMenuPool->createMenuBar(actionsPool()); 608 608 609 /* Re-init menu pool for the case m anu were recreated: */609 /* Re-init menu pool for the case menu were recreated: */ 610 610 reinitMenuPool(); 611 611
Note:
See TracChangeset
for help on using the changeset viewer.