mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Fixed a crach. and do not hardcode the flag ddsd to primersurface amd other value.
svn path=/trunk/; revision=18935
This commit is contained in:
parent
b954033d53
commit
4fdcdd13c6
1 changed files with 7 additions and 12 deletions
|
@ -62,10 +62,6 @@ HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pD
|
||||||
|
|
||||||
/* FIXME we are skipping filling in some data, I do not care for now */
|
/* FIXME we are skipping filling in some data, I do not care for now */
|
||||||
|
|
||||||
LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal = &This->owner->DirectDrawGlobal;
|
|
||||||
This->ddsd.dwFlags = DDSD_CAPS;
|
|
||||||
This->ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
|
|
||||||
|
|
||||||
/* surface global struct */
|
/* surface global struct */
|
||||||
memset(&This->Global, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
|
memset(&This->Global, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
|
||||||
This->Global.lpDD = &This->owner->DirectDrawGlobal;
|
This->Global.lpDD = &This->owner->DirectDrawGlobal;
|
||||||
|
@ -88,17 +84,16 @@ HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pD
|
||||||
This->Local.ddsCaps = *(DDSCAPS*)&This->ddsd.ddsCaps;
|
This->Local.ddsCaps = *(DDSCAPS*)&This->ddsd.ddsCaps;
|
||||||
|
|
||||||
/* for the double pointer below */
|
/* for the double pointer below */
|
||||||
DDRAWI_DDRAWSURFACE_LCL *pLocal[2];
|
This->pLocal[0] = &This->Local;
|
||||||
pLocal[0] = &This->Local;
|
This->pLocal[1] = NULL;
|
||||||
pLocal[1] = NULL;
|
|
||||||
|
|
||||||
/* the parameter struct */
|
/* the parameter struct */
|
||||||
DDHAL_CREATESURFACEDATA CreateData;
|
DDHAL_CREATESURFACEDATA CreateData;
|
||||||
memset(&CreateData, 0, sizeof(DDHAL_CREATESURFACEDATA));
|
memset(&CreateData, 0, sizeof(DDHAL_CREATESURFACEDATA));
|
||||||
CreateData.lpDD = pDirectDrawGlobal;
|
CreateData.lpDD = &This->owner->DirectDrawGlobal;
|
||||||
CreateData.lpDDSurfaceDesc = (LPDDSURFACEDESC) &This->ddsd;
|
CreateData.lpDDSurfaceDesc = (LPDDSURFACEDESC) &This->ddsd;
|
||||||
CreateData.dwSCnt = 1;
|
CreateData.dwSCnt = 1;
|
||||||
CreateData.lplpSList = pLocal;
|
CreateData.lplpSList = This->pLocal;
|
||||||
CreateData.ddRVal = DD_FALSE;
|
CreateData.ddRVal = DD_FALSE;
|
||||||
|
|
||||||
/* this is the call we were waiting for */
|
/* this is the call we were waiting for */
|
||||||
|
|
Loading…
Reference in a new issue