mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
make ddraw.dll lite more msvs frendly
svn path=/trunk/; revision=27184
This commit is contained in:
@@ -47,10 +47,10 @@ Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
|
||||
|
||||
while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE)
|
||||
{
|
||||
DX_STUB_str("here\n");
|
||||
|
||||
DDSURFACEDESC2 SurfaceDesc;
|
||||
|
||||
DX_STUB_str("here\n");
|
||||
|
||||
iMode++;
|
||||
|
||||
SurfaceDesc.dwSize = sizeof (DDSURFACEDESC2);
|
||||
@@ -121,10 +121,10 @@ Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeig
|
||||
DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
|
||||
{
|
||||
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
||||
DX_WINDBG_trace();
|
||||
|
||||
HRESULT ret = DD_OK;
|
||||
|
||||
DX_STUB_str("here\n");
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
// FIXME: Check primary if surface is locked / busy etc.
|
||||
@@ -145,6 +145,7 @@ Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeig
|
||||
}
|
||||
else
|
||||
{
|
||||
LONG retval;
|
||||
// Here we go
|
||||
DEVMODE DevMode;
|
||||
DevMode.dmFields = 0;
|
||||
@@ -163,7 +164,8 @@ Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeig
|
||||
DevMode.dmBitsPerPel = dwBPP;
|
||||
DevMode.dmDisplayFrequency = dwRefreshRate;
|
||||
|
||||
LONG retval = ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN); /* FIXME: Are we supposed to set CDS_SET_PRIMARY as well ? */
|
||||
retval = ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN);
|
||||
/* FIXME: Are we supposed to set CDS_SET_PRIMARY as well ? */
|
||||
|
||||
if(retval == DISP_CHANGE_BADMODE)
|
||||
{
|
||||
@@ -200,10 +202,12 @@ Main_DirectDraw_RestoreDisplayMode (LPDIRECTDRAW7 iface)
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
BOOL ModeChanged;
|
||||
|
||||
ChangeDisplaySettings(NULL, 0);
|
||||
|
||||
// Update Interals
|
||||
BOOL ModeChanged;
|
||||
|
||||
|
||||
This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
|
||||
DdReenableDirectDrawObject(This->lpLcl->lpGbl, &ModeChanged);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<define name="WINVER">0x0600</define>
|
||||
<define name="_WIN32_WINNT">0x0501</define>
|
||||
|
||||
<library>ntdll</library>
|
||||
|
||||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
|
||||
@@ -192,7 +192,7 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7);
|
||||
} \
|
||||
return DD_OK;
|
||||
|
||||
|
||||
#ifdef __GNU__
|
||||
#define DX_STUB_str(x) \
|
||||
{ \
|
||||
char buffer[1024]; \
|
||||
@@ -200,6 +200,7 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7);
|
||||
OutputDebugStringA(buffer); \
|
||||
}
|
||||
|
||||
|
||||
#define DX_WINDBG_trace() \
|
||||
static BOOL firstcallx = TRUE; \
|
||||
if (firstcallx) \
|
||||
@@ -210,6 +211,8 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7);
|
||||
firstcallx = TRUE; \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define DX_WINDBG_trace_res(width,height,bpp) \
|
||||
static BOOL firstcallxx = TRUE; \
|
||||
if (firstcallxx) \
|
||||
@@ -220,4 +223,10 @@ VOID Hal_DirectDraw_Release (LPDIRECTDRAW7);
|
||||
firstcallxx = FALSE; \
|
||||
}
|
||||
|
||||
#else
|
||||
#define DX_WINDBG_trace() //
|
||||
#define DX_STUB_str(x) //
|
||||
#define DX_WINDBG_trace_res(width,height,bpp) //
|
||||
#endif
|
||||
|
||||
#endif /* __DDRAW_PRIVATE */
|
||||
|
||||
@@ -37,11 +37,11 @@ Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW* pIface,
|
||||
/* fixme linking too second link when we shall not doing it */
|
||||
if (IsBadReadPtr(This,sizeof(LPDIRECTDRAW)))
|
||||
{
|
||||
DX_STUB_str("1. no linking\n");
|
||||
|
||||
/* We do not have a DirectDraw interface, we need alloc it*/
|
||||
LPDDRAWI_DIRECTDRAW_INT memThis;
|
||||
|
||||
DX_STUB_str("1. no linking\n");
|
||||
|
||||
DxHeapMemAlloc(memThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||
if (memThis == NULL)
|
||||
{
|
||||
@@ -60,10 +60,11 @@ Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW* pIface,
|
||||
}
|
||||
else
|
||||
{
|
||||
DX_STUB_str("2.linking\n");
|
||||
/* We got the DirectDraw interface alloc and we need create the link */
|
||||
LPDDRAWI_DIRECTDRAW_INT newThis;
|
||||
|
||||
DX_STUB_str("2.linking\n");
|
||||
|
||||
/* step 1.Alloc the new DDRAWI_DIRECTDRAW_INT for the lnking */
|
||||
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||
if (newThis == NULL)
|
||||
@@ -378,6 +379,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
|
||||
D3DHAL_GLOBALDRIVERDATA mD3dDriverData;
|
||||
DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks;
|
||||
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
||||
DDHAL_GETDRIVERINFODATA DdGetDriverInfo = { 0 };
|
||||
|
||||
DX_WINDBG_trace();
|
||||
|
||||
@@ -533,7 +535,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
|
||||
|
||||
/* FIXME D3D setup mD3dCallbacks and mD3dDriverData */
|
||||
|
||||
DDHAL_GETDRIVERINFODATA DdGetDriverInfo = { 0 };
|
||||
|
||||
|
||||
|
||||
if (mHALInfo.dwFlags & DDHALINFO_GETDRIVERINFOSET)
|
||||
|
||||
Reference in New Issue
Block a user