mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
merges HEL_SetCooperativeLevel and HAL_SetCooperativeLevel to MAIN_SetCooperativeLevel
the new desgin allown us to use HEL as callbacks, we need change all HEL calls to the new desgin now svn path=/trunk/; revision=21821
This commit is contained in:
parent
cf6a23c944
commit
234eeebea4
5 changed files with 28 additions and 59 deletions
|
@ -198,33 +198,6 @@ Hal_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
|||
}
|
||||
|
||||
|
||||
|
||||
HRESULT
|
||||
Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface)
|
||||
{
|
||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||
|
||||
DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode;
|
||||
|
||||
if (!(This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE))
|
||||
{
|
||||
return DDERR_NODRIVERSUPPORT;
|
||||
}
|
||||
|
||||
SetExclusiveMode.lpDD = &This->mDDrawGlobal;
|
||||
SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED;
|
||||
SetExclusiveMode.dwEnterExcl = This->cooperative_level;
|
||||
|
||||
if (This->mDDrawGlobal.lpDDCBtmp->HALDD.SetExclusiveMode(&SetExclusiveMode) != DDHAL_DRIVER_HANDLED)
|
||||
{
|
||||
return DDERR_NODRIVERSUPPORT;
|
||||
}
|
||||
|
||||
return SetExclusiveMode.ddRVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT
|
||||
Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
|
||||
LPDWORD total, LPDWORD free)
|
||||
|
|
|
@ -290,7 +290,8 @@ HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface, HWND hw
|
|||
DX_WINDBG_trace();
|
||||
|
||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||
|
||||
DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode;
|
||||
|
||||
// check the parameters
|
||||
if ((This->cooperative_level == cooplevel) && ((HWND)This->mDDrawGlobal.lpExclusiveOwner->hWnd == hwnd))
|
||||
return DD_OK;
|
||||
|
@ -314,13 +315,27 @@ HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface, HWND hw
|
|||
|
||||
This->cooperative_level = cooplevel;
|
||||
|
||||
if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)
|
||||
if ((This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE))
|
||||
{
|
||||
DX_STUB_str("HAL \n");
|
||||
SetExclusiveMode.SetExclusiveMode = This->mDDrawGlobal.lpDDCBtmp->HALDD.SetExclusiveMode;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Hal_DirectDraw_SetCooperativeLevel (iface);
|
||||
DX_STUB_str("HEL \n");
|
||||
SetExclusiveMode.SetExclusiveMode = This->mDDrawGlobal.lpDDCBtmp->HELDD.SetExclusiveMode;
|
||||
}
|
||||
|
||||
SetExclusiveMode.lpDD = &This->mDDrawGlobal;
|
||||
SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED;
|
||||
SetExclusiveMode.dwEnterExcl = This->cooperative_level;
|
||||
|
||||
if (SetExclusiveMode.SetExclusiveMode(&SetExclusiveMode) != DDHAL_DRIVER_HANDLED)
|
||||
{
|
||||
return DDERR_NODRIVERSUPPORT;
|
||||
}
|
||||
|
||||
return Hel_DirectDraw_SetCooperativeLevel(iface);
|
||||
|
||||
return SetExclusiveMode.ddRVal;
|
||||
}
|
||||
|
||||
HRESULT WINAPI Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight,
|
||||
|
|
|
@ -303,15 +303,13 @@ DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISu
|
|||
return DD_OK;
|
||||
|
||||
|
||||
#define DX_STUB_str(x) \
|
||||
static BOOL firstcall = TRUE; \
|
||||
if (firstcall) \
|
||||
{ \
|
||||
char buffer[1024]; \
|
||||
#define DX_STUB_str(x) \
|
||||
{ \
|
||||
char buffer[1024]; \
|
||||
sprintf ( buffer, "Function %s %s (%s:%d)\n", __FUNCTION__,x,__FILE__,__LINE__ ); \
|
||||
OutputDebugStringA(buffer); \
|
||||
firstcall = FALSE; \
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//#define DX_WINDBG_trace()
|
||||
|
||||
|
|
|
@ -11,26 +11,7 @@
|
|||
#include "rosdraw.h"
|
||||
|
||||
|
||||
/*
|
||||
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
|
||||
{
|
||||
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||
|
||||
This->HELMemoryAvilable = HEL_GRAPHIC_MEMORY_MAX;
|
||||
|
||||
This->mCallbacks.HELDD.dwFlags = DDHAL_CB32_CANCREATESURFACE;
|
||||
This->mCallbacks.HELDD.CanCreateSurface = HelDdCanCreateSurface;
|
||||
|
||||
This->mCallbacks.HELDD.dwFlags = DDHAL_CB32_CREATESURFACE;
|
||||
This->mCallbacks.HELDD.CreateSurface = HelDdCreateSurface;
|
||||
|
||||
return DD_OK;
|
||||
} */
|
||||
|
||||
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface)
|
||||
{
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,9 @@ DWORD CALLBACK HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiv
|
|||
{
|
||||
DX_WINDBG_trace();
|
||||
DX_STUB_str("Not implement yet, return DD_OK for not bsod\n");
|
||||
return DD_OK;
|
||||
lpSetExclusiveMode->ddRVal = DD_OK;
|
||||
|
||||
return DDHAL_DRIVER_HANDLED;
|
||||
}
|
||||
|
||||
DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface)
|
||||
|
|
Loading…
Reference in a new issue