mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 19:41:57 +00:00
adding smore check for createsurface, (still does not create a surface)
svn path=/trunk/; revision=26751
This commit is contained in:
parent
57f86bb38b
commit
336c7c37c4
2 changed files with 22 additions and 6 deletions
|
@ -139,6 +139,12 @@ HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDE
|
|||
return DDERR_GENERIC;
|
||||
}
|
||||
|
||||
if (pDDSD)
|
||||
{
|
||||
/* FIXME send back right return code */
|
||||
return DDERR_GENERIC;
|
||||
}
|
||||
|
||||
EnterCriticalSection(&ddcs);
|
||||
|
||||
ret = DDERR_GENERIC;
|
||||
|
|
|
@ -9,17 +9,27 @@
|
|||
*/
|
||||
#include "rosdraw.h"
|
||||
|
||||
/*
|
||||
* all param have been checked if they are vaild before they are call to
|
||||
* Internal_CreateSurface, if not please fix the code in the functions
|
||||
* call to Internal_CreateSurface, ppSurf are being vaildate in
|
||||
* Internal_CreateSurface
|
||||
*/
|
||||
|
||||
HRESULT
|
||||
Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
|
||||
LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter)
|
||||
{
|
||||
if (!pDDraw->lpLcl->dwLocalFlags & DDRAWILCL_DIRECTDRAW7)
|
||||
|
||||
/*
|
||||
* pDDSD->dwCaps can not contain both DDSCAPS_SYSTEMMEMORY and DDSCAPS_VIDEOMEMORY
|
||||
* if both are define ddraw.dll will return error code 0x88760064
|
||||
*/
|
||||
if ( (pDDSD->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) &&
|
||||
(pDDSD->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
|
||||
{
|
||||
/* it is directdraw 1-6 so no DirectD3D support */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* directdraw 7 support */
|
||||
/* translate the error code I got back to a name */
|
||||
return 0x88760064;
|
||||
}
|
||||
|
||||
return DDERR_GENERIC;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue