Changeset 28384 in vbox
- Timestamp:
- Apr 15, 2010 7:04:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r28342 r28384 43 43 44 44 #include "QIFileDialog.h" 45 //#include "QIHttp.h"46 45 47 46 #include "UISession.h" … … 660 659 CConsole console = session().GetConsole(); 661 660 662 /* Take the screenshot for debugging purposes and save it. 663 * TODO: create png's from all configured monitors if possible. */ 661 /* Take the screenshot for debugging purposes and save it. */ 664 662 QString strLogFolder = console.GetMachine().GetLogFolder(); 665 QString strFileName = strLogFolder + "/VBox.png";666 663 CDisplay display = console.GetDisplay(); 667 ULONG width = 0; 668 ULONG height = 0; 669 ULONG bpp = 0; 670 display.GetScreenResolution(0, width, height, bpp); 671 QImage shot = QImage(width, height, QImage::Format_RGB32); 672 display.TakeScreenShot(0, shot.bits(), shot.width(), shot.height()); 673 shot.save(QFile::encodeName(strFileName), "PNG"); 664 int cGuestScreens = uisession()->session().GetMachine().GetMonitorCount(); 665 for (int i=0; i < cGuestScreens; ++i) 666 { 667 QString strFileName; 668 if (i == 0) 669 strFileName = strLogFolder + "/VBox.png"; 670 else 671 strFileName = QString("%1/VBox.%2.png").arg(strLogFolder).arg(i); 672 ULONG width = 0; 673 ULONG height = 0; 674 ULONG bpp = 0; 675 display.GetScreenResolution(i, width, height, bpp); 676 QImage shot = QImage(width, height, QImage::Format_RGB32); 677 display.TakeScreenShot(i, shot.bits(), shot.width(), shot.height()); 678 shot.save(QFile::encodeName(strFileName), "PNG"); 679 } 674 680 675 681 /* Warn the user about GURU: */
Note:
See TracChangeset
for help on using the changeset viewer.