VirtualBox

Changeset 62285 in vbox


Ignore:
Timestamp:
Jul 15, 2016 3:47:53 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
108805
Message:

FE/Qt: bugref:8502: Use the proper API to get the screen-shot while under the separate UI frontend.

File:
1 edited

Legend:

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

    r61052 r62285  
    27212721        uMaxHeight  = RT_MAX(uMaxHeight, height);
    27222722        QImage shot = QImage(width, height, QImage::Format_RGB32);
    2723         display().TakeScreenShot(i, shot.bits(), shot.width(), shot.height(), KBitmapFormat_BGR0);
     2723        /* For separate process: */
     2724        if (vboxGlobal().isSeparateProcess())
     2725        {
     2726            /* Take screen-data to array first: */
     2727            const QVector<BYTE> screenData = display().TakeScreenShotToArray(i, shot.width(), shot.height(), KBitmapFormat_BGR0);
     2728            /* And copy that data to screen-shot if it is Ok: */
     2729            if (display().isOk() && !screenData.isEmpty())
     2730                memcpy(shot.bits(), screenData.data(), shot.width() * shot.height() * 4);
     2731        }
     2732        /* For the same process: */
     2733        else
     2734        {
     2735            /* Take the screen-shot directly: */
     2736            display().TakeScreenShot(i, shot.bits(), shot.width(), shot.height(), KBitmapFormat_BGR0);
     2737        }
    27242738        images << shot;
    27252739    }
Note: See TracChangeset for help on using the changeset viewer.

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