summaryrefslogtreecommitdiff
path: root/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
diff options
context:
space:
mode:
authorFelix Geyer <fgeyer@debian.org>2014-04-05 22:17:15 +0200
committerFelix Geyer <fgeyer@debian.org>2014-04-05 22:17:15 +0200
commit1700c7d32f7d9d101cbba9f1fcb8bb57ed16a727 (patch)
tree727251ad65172262944f82bb0f28601c3fb6f6b3 /src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
parent1e85aed889b772c2f2daa7a6d9e8bd967aa213d8 (diff)
downloadvirtualbox-upstream.tar.gz
Imported Upstream version 4.3.10-dfsgupstream/4.3.10-dfsgupstream
Diffstat (limited to 'src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp')
-rw-r--r--src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
index e9ae9e78c..10cdf5cfb 100644
--- a/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
+++ b/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp
@@ -194,7 +194,6 @@ static int crServerRedirMuralDbSyncFb(CRMuralInfo *mural, HCR_FRAMEBUFFER hFb, C
for (uint32_t i = 0; i < mural->cBuffers; ++i)
{
VBOXVR_TEXTURE Tex;
- int rc;
Tex.width = mural->width;
Tex.height = mural->height;
Tex.hwid = mural->aidColorTexs[i];
@@ -687,7 +686,8 @@ DECLEXPORT(int) crServerVBoxScreenshotGet(uint32_t u32Screen, uint32_t width, ui
|| pScreen->u32LineSize != pitch
|| pScreen->u16BitsPerPixel != 32)
{
- RTRECT Rect;
+ RTRECT SrcRect;
+ RTRECT DstRect;
pScreenshot->Img.cbData = pScreen->u32LineSize * pScreen->u32Height;
if (!pvBuffer)
@@ -711,11 +711,15 @@ DECLEXPORT(int) crServerVBoxScreenshotGet(uint32_t u32Screen, uint32_t width, ui
pScreenshot->Img.height = height;
pScreenshot->Img.bpp = 32;
pScreenshot->Img.pitch = pitch;
- Rect.xLeft = 0;
- Rect.yTop = 0;
- Rect.xRight = pScreen->u32Width;
- Rect.yBottom = pScreen->u32Height;
- int rc = CrFbBltGetContents(hFb, &Rect, 1, &Rect, &pScreenshot->Img);
+ SrcRect.xLeft = 0;
+ SrcRect.yTop = 0;
+ SrcRect.xRight = pScreen->u32Width;
+ SrcRect.yBottom = pScreen->u32Height;
+ DstRect.xLeft = 0;
+ DstRect.yTop = 0;
+ DstRect.xRight = width;
+ DstRect.yBottom = height;
+ int rc = CrFbBltGetContents(hFb, &SrcRect, &DstRect, 1, &DstRect, &pScreenshot->Img);
if (!RT_SUCCESS(rc))
{
WARN(("CrFbBltGetContents failed %d", rc));