mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 17:40:58 +00:00
adding more seh, everthing need warp around seh in ddraw.
svn path=/trunk/; revision=27032
This commit is contained in:
parent
9ad6d62b37
commit
8c5a2928ed
|
@ -4,25 +4,35 @@
|
|||
* PROJECT: ReactOS DirectX
|
||||
* FILE: ddraw/ddraw/ddraw_displaymode.c
|
||||
* PURPOSE: IDirectDraw7 Implementation
|
||||
* PROGRAMMER: Maarten Bosma
|
||||
* PROGRAMMER: Maarten Bosma, Magnus Olsen (add seh support)
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "rosdraw.h"
|
||||
|
||||
/* PSEH for SEH Support */
|
||||
#include <pseh/pseh.h>
|
||||
|
||||
HRESULT WINAPI
|
||||
Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||
LPDDSURFACEDESC2 pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK2 pCallback)
|
||||
{
|
||||
HRESULT ret = DD_OK;
|
||||
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
||||
INT iMode = 0;
|
||||
DEVMODE DevMode;
|
||||
|
||||
DX_WINDBG_trace();
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
if(!pCallback)
|
||||
return DDERR_INVALIDPARAMS;
|
||||
{
|
||||
ret = DDERR_INVALIDPARAMS;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
DevMode.dmSize = sizeof(DEVMODE);
|
||||
DevMode.dmDriverExtra = 0;
|
||||
|
@ -78,10 +88,16 @@ Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
|||
}
|
||||
|
||||
if((*pCallback)(&SurfaceDesc, pContext) == DDENUMRET_CANCEL)
|
||||
return DD_OK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
}
|
||||
_SEH_END;
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI
|
||||
|
|
|
@ -137,10 +137,17 @@ Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
|
|||
DX_WINDBG_trace();
|
||||
// EnterCriticalSection(&ddcs);
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
if (This->lpLcl->lpGbl->lpExclusiveOwner == This->lpLcl)
|
||||
{
|
||||
retVal = DDERR_NOEXCLUSIVEMODE;
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
}
|
||||
_SEH_END;
|
||||
// LeaveCriticalSection(&ddcs);
|
||||
return retVal;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue