mirror of
https://github.com/reactos/reactos.git
synced 2024-09-09 04:10:19 +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
|
* PROJECT: ReactOS DirectX
|
||||||
* FILE: ddraw/ddraw/ddraw_displaymode.c
|
* FILE: ddraw/ddraw/ddraw_displaymode.c
|
||||||
* PURPOSE: IDirectDraw7 Implementation
|
* PURPOSE: IDirectDraw7 Implementation
|
||||||
* PROGRAMMER: Maarten Bosma
|
* PROGRAMMER: Maarten Bosma, Magnus Olsen (add seh support)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "rosdraw.h"
|
#include "rosdraw.h"
|
||||||
|
|
||||||
|
/* PSEH for SEH Support */
|
||||||
|
#include <pseh/pseh.h>
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
LPDDSURFACEDESC2 pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK2 pCallback)
|
LPDDSURFACEDESC2 pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK2 pCallback)
|
||||||
{
|
{
|
||||||
|
HRESULT ret = DD_OK;
|
||||||
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
||||||
INT iMode = 0;
|
INT iMode = 0;
|
||||||
DEVMODE DevMode;
|
DEVMODE DevMode;
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
if(!pCallback)
|
if(!pCallback)
|
||||||
return DDERR_INVALIDPARAMS;
|
{
|
||||||
|
ret = DDERR_INVALIDPARAMS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
DevMode.dmSize = sizeof(DEVMODE);
|
DevMode.dmSize = sizeof(DEVMODE);
|
||||||
DevMode.dmDriverExtra = 0;
|
DevMode.dmDriverExtra = 0;
|
||||||
|
@ -78,10 +88,16 @@ Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||||
}
|
}
|
||||||
|
|
||||||
if((*pCallback)(&SurfaceDesc, pContext) == DDENUMRET_CANCEL)
|
if((*pCallback)(&SurfaceDesc, pContext) == DDENUMRET_CANCEL)
|
||||||
return DD_OK;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return DD_OK;
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -137,10 +137,17 @@ Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
// EnterCriticalSection(&ddcs);
|
// EnterCriticalSection(&ddcs);
|
||||||
|
|
||||||
|
_SEH_TRY
|
||||||
|
{
|
||||||
if (This->lpLcl->lpGbl->lpExclusiveOwner == This->lpLcl)
|
if (This->lpLcl->lpGbl->lpExclusiveOwner == This->lpLcl)
|
||||||
{
|
{
|
||||||
retVal = DDERR_NOEXCLUSIVEMODE;
|
retVal = DDERR_NOEXCLUSIVEMODE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
|
}
|
||||||
|
_SEH_END;
|
||||||
// LeaveCriticalSection(&ddcs);
|
// LeaveCriticalSection(&ddcs);
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue