Index: ddraw/glDirectDraw.cpp |
— | — | @@ -902,6 +902,7 @@ |
903 | 903 | if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
904 | 904 | if(!lpDDSD2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
905 | 905 | if(!lpEnumSurfacesCallback) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 906 | + if(dwFlags & 0xFFFFFFE0) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
906 | 907 | FIXME("IDirectDraw::EnumSurfaces: stub\n");
|
907 | 908 | TRACE_EXIT(23,DDERR_GENERIC);
|
908 | 909 | ERR(DDERR_GENERIC);
|
— | — | @@ -1182,6 +1183,8 @@ |
1183 | 1184 | {
|
1184 | 1185 | TRACE_ENTER(3,14,this,13,hWnd,9,dwFlags);
|
1185 | 1186 | if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 1187 | + if(hWnd && !IsWindow(hWnd)) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1188 | + if(dwFlags & 0xFFFFE020) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1186 | 1189 | this->hWnd = hWnd;
|
1187 | 1190 | winstyle = GetWindowLongPtrA(hWnd,GWL_STYLE);
|
1188 | 1191 | winstyleex = GetWindowLongPtrA(hWnd,GWL_EXSTYLE);
|
— | — | @@ -1535,6 +1538,8 @@ |
1536 | 1539 | if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
1537 | 1540 | if(dwFlags & DDWAITVB_BLOCKBEGINEVENT)
|
1538 | 1541 | TRACE_RET(HRESULT,23,DDERR_UNSUPPORTED);
|
| 1542 | + if(dwFlags & 0xFFFFFFFA) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 1543 | + if(dwFlags == 5) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
1539 | 1544 | if(!lastsync) lastsync = true;
|
1540 | 1545 | else primary->RenderScreen(primary->texture,primary,1);
|
1541 | 1546 | TRACE_EXIT(23,DD_OK);
|
Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | glDirectDrawSurface7::glDirectDrawSurface7(LPDIRECTDRAW7 lpDD7, LPDDSURFACEDESC2 lpDDSurfaceDesc2, HRESULT *error, bool copysurface, glDirectDrawPalette *palettein)
|
43 | 43 | {
|
44 | 44 | TRACE_ENTER(6,14,this,14,lpDD7,14,lpDDSurfaceDesc2,14,error,21,copysurface,14,palettein);
|
| 45 | + overlay = false;
|
45 | 46 | hasstencil = false;
|
46 | 47 | dirty = 2;
|
47 | 48 | handle = 0;
|
— | — | @@ -704,6 +705,9 @@ |
705 | 706 | {
|
706 | 707 | TRACE_ENTER(3,14,this,14,lpDDSurfaceTargetOverride,9,dwFlags);
|
707 | 708 | if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
|
| 709 | + if(dwFlags & 0xF8FFFFC0) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
| 710 | + if(locked) TRACE_RET(HRESULT,23,DDERR_SURFACEBUSY);
|
| 711 | + if(!overlay && ((dwFlags & DDFLIP_ODD) || (dwFlags & DDFLIP_EVEN))) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
|
708 | 712 | DWORD i;
|
709 | 713 | glDirectDrawSurface7 *tmp;
|
710 | 714 | if(dwFlags & DDFLIP_NOVSYNC) swapinterval=0;
|
Index: ddraw/glDirectDrawSurface.h |
— | — | @@ -149,6 +149,7 @@ |
150 | 150 | int pagelocked;
|
151 | 151 | GLint magfilter,minfilter;
|
152 | 152 | glDirect3DDevice7 *device;
|
| 153 | + bool overlay;
|
153 | 154 | };
|
154 | 155 |
|
155 | 156 | // Legacy DDRAW Interfaces
|