Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -192,6 +192,8 @@ |
193 | 193 | {
|
194 | 194 | fakex = ddsd.dwWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
195 | 195 | fakey = ddsd.dwHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
| 196 | + ddInterface->renderer->xoffset = GetSystemMetrics(SM_XVIRTUALSCREEN);
|
| 197 | + ddInterface->renderer->yoffset = GetSystemMetrics(SM_YVIRTUALSCREEN);
|
196 | 198 | }
|
197 | 199 | else
|
198 | 200 | {
|
— | — | @@ -758,9 +760,9 @@ |
759 | 761 | {
|
760 | 762 | HRESULT error;
|
761 | 763 | RECT tmprect;
|
762 | | - glDirectDrawSurface7 *pattern;
|
| 764 | + glDirectDrawSurface7* pattern;
|
763 | 765 | BltCommand cmd;
|
764 | | - TRACE_ENTER(6,14,this,26,lpDestRect,14,lpDDSrcSurface,26,lpSrcRect,9,dwFlags,14,lpDDBltFx);
|
| 766 | + TRACE_ENTER(6, 14, this, 26, lpDestRect, 14, lpDDSrcSurface, 26, lpSrcRect, 9, dwFlags, 14, lpDDBltFx);
|
765 | 767 | if (!this) TRACE_RET(HRESULT, 23, DDERR_INVALIDOBJECT);
|
766 | 768 | if ((dwFlags & DDBLT_DEPTHFILL) && !lpDDBltFx) TRACE_RET(HRESULT, 32, DDERR_INVALIDPARAMS);
|
767 | 769 | if ((dwFlags & DDBLT_COLORFILL) && !lpDDBltFx) TRACE_RET(HRESULT, 23, DDERR_INVALIDPARAMS);
|
— | — | @@ -768,7 +770,12 @@ |
769 | 771 | ZeroMemory(&cmd, sizeof(BltCommand));
|
770 | 772 | cmd.dest = this->texture;
|
771 | 773 | cmd.destlevel = this->miplevel;
|
772 | | - if (lpDestRect) cmd.destrect = *lpDestRect;
|
| 774 | + if (lpDestRect)
|
| 775 | + {
|
| 776 | + cmd.destrect = *lpDestRect;
|
| 777 | + if(!ddInterface->GetFullscreen() && (ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
|
| 778 | + OffsetRect(&cmd.destrect, 0 - ddInterface->renderer->xoffset, 0 - ddInterface->renderer->yoffset);
|
| 779 | + }
|
773 | 780 | else cmd.destrect = nullrect;
|
774 | 781 | if (lpSrcRect) cmd.srcrect = *lpSrcRect;
|
775 | 782 | else cmd.srcrect = nullrect;
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -3992,6 +3992,7 @@ |
3993 | 3993 | viewport[3] = viewrect->bottom;
|
3994 | 3994 | ClientToScreen(This->RenderWnd->GetHWnd(),(LPPOINT)&viewrect->left);
|
3995 | 3995 | ClientToScreen(This->RenderWnd->GetHWnd(),(LPPOINT)&viewrect->right);
|
| 3996 | + OffsetRect(viewrect, 0 - This->xoffset, 0 - This->yoffset);
|
3996 | 3997 | view[0] = (GLfloat)viewrect->left;
|
3997 | 3998 | view[1] = (GLfloat)viewrect->right;
|
3998 | 3999 | view[2] = (GLfloat)texture->bigheight-(GLfloat)viewrect->top;
|
Index: ddraw/glRenderer.h |
— | — | @@ -160,6 +160,7 @@ |
161 | 161 | GLsizei fvf_stride;
|
162 | 162 | BOOL mode_3d;
|
163 | 163 | float postsizex, postsizey;
|
| 164 | + int xoffset, yoffset;
|
164 | 165 | } glRenderer;
|
165 | 166 |
|
166 | 167 | HRESULT glRenderer_AddCommand(glRenderer *This, QueueCmd *cmd, BOOL inner, BOOL wait);
|