VirtualBox

Changeset 28384 in vbox


Ignore:
Timestamp:
Apr 15, 2010 7:04:22 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: Create screen shots of all configured monitors in the VM stuck case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r28342 r28384  
    4343
    4444#include "QIFileDialog.h"
    45 //#include "QIHttp.h"
    4645
    4746#include "UISession.h"
     
    660659            CConsole console = session().GetConsole();
    661660
    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. */
    664662            QString strLogFolder = console.GetMachine().GetLogFolder();
    665             QString strFileName = strLogFolder + "/VBox.png";
    666663            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            }
    674680
    675681            /* Warn the user about GURU: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette