ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
168 discussions
Start a n
N
ew thread
[greatlrd] 25148: fixing more format from tab to space
by greatlrd@svn.reactos.org
Author: greatlrd Date: Thu Dec 14 00:28:52 2006 New Revision: 25148 URL:
http://svn.reactos.org/svn/reactos?rev=25148&view=rev
Log: fixing more format from tab to space Modified: trunk/reactos/dll/directx/ddraw/callbacks_hel.c trunk/reactos/dll/directx/ddraw/callbacks_surf_hel.c trunk/reactos/dll/directx/ddraw/cleanup.c trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Modified: trunk/reactos/dll/directx/ddraw/callbacks_hel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/callback…
============================================================================== --- trunk/reactos/dll/directx/ddraw/callbacks_hel.c (original) +++ trunk/reactos/dll/directx/ddraw/callbacks_hel.c Thu Dec 14 00:28:52 2006 @@ -20,82 +20,82 @@ DWORD CALLBACK HelDdDestroyDriver(LPDDHAL_DESTROYDRIVERDATA lpDestroyDriver) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdCreateSurface(LPDDHAL_CREATESURFACEDATA lpCreateSurface) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdSetColorKey(LPDDHAL_DRVSETCOLORKEYDATA lpDrvSetColorKey) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdSetMode(LPDDHAL_SETMODEDATA SetMode) -{ - DEVMODE DevMode; +{ + DEVMODE DevMode; - DX_STUB_str("in hel"); + DX_STUB_str("in hel"); - DevMode.dmSize = (WORD)sizeof(DEVMODE); - DevMode.dmDriverExtra = 0; + DevMode.dmSize = (WORD)sizeof(DEVMODE); + DevMode.dmDriverExtra = 0; SetMode->ddRVal = DDERR_UNSUPPORTEDMODE; if (EnumDisplaySettingsEx(NULL, SetMode->dwModeIndex, &DevMode, 0 ) != 0) - { - DX_WINDBG_trace_res((int)DevMode.dmPelsWidth, (int)DevMode.dmPelsHeight, (int)DevMode.dmBitsPerPel ); + { + DX_WINDBG_trace_res((int)DevMode.dmPelsWidth, (int)DevMode.dmPelsHeight, (int)DevMode.dmBitsPerPel ); - if (ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) - { - DX_STUB_str("FAIL"); - SetMode->ddRVal = DDERR_UNSUPPORTEDMODE; - } - else - { - DX_STUB_str("OK"); - SetMode->ddRVal = DD_OK; - } - } - - return DDHAL_DRIVER_HANDLED; + if (ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) + { + DX_STUB_str("FAIL"); + SetMode->ddRVal = DDERR_UNSUPPORTEDMODE; + } + else + { + DX_STUB_str("OK"); + SetMode->ddRVal = DD_OK; + } + } + + return DDHAL_DRIVER_HANDLED; } DWORD CALLBACK HelDdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA lpWaitForVerticalBlank) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA lpCanCreateSurface) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdCreatePalette(LPDDHAL_CREATEPALETTEDATA lpCreatePalette) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdGetScanLine(LPDDHAL_GETSCANLINEDATA lpGetScanLine) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode) { - DX_WINDBG_trace(); - DX_STUB_str("Not implement yet, return DD_OK for not bsod\n"); - lpSetExclusiveMode->ddRVal = DD_OK; - - return DDHAL_DRIVER_HANDLED; + DX_WINDBG_trace(); + DX_STUB_str("Not implement yet, return DD_OK for not bsod\n"); + lpSetExclusiveMode->ddRVal = DD_OK; + + return DDHAL_DRIVER_HANDLED; } DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface) { - DX_STUB; + DX_STUB; } Modified: trunk/reactos/dll/directx/ddraw/callbacks_surf_hel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/callback…
============================================================================== --- trunk/reactos/dll/directx/ddraw/callbacks_surf_hel.c (original) +++ trunk/reactos/dll/directx/ddraw/callbacks_surf_hel.c Thu Dec 14 00:28:52 2006 @@ -16,78 +16,77 @@ DWORD CALLBACK HelDdSurfAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA lpDestroySurface) { - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdSurfBlt(LPDDHAL_BLTDATA lpBltData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfDestroySurface(LPDDHAL_DESTROYSURFACEDATA lpDestroySurfaceData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfFlip(LPDDHAL_FLIPDATA lpFlipData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfGetBltStatus(LPDDHAL_GETBLTSTATUSDATA lpGetBltStatusData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA lpGetFlipStatusData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfLock(LPDDHAL_LOCKDATA lpLockData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfreserved4(DWORD *lpPtr) -{ - /* - This api is not doucment by MS So I leave it - as stub. +{ + /* + This api is not doucment by MS So I leave it + as stub. */ - DX_STUB; + DX_STUB; } DWORD CALLBACK HelDdSurfSetClipList(LPDDHAL_SETCLIPLISTDATA lpSetClipListData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKeyData) -{ - DX_STUB; +{ + DX_STUB; } - DWORD CALLBACK HelDdSurfSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA lpSetOverlayPositionData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfSetPalette(LPDDHAL_SETPALETTEDATA lpSetPaletteData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfUnlock(LPDDHAL_UNLOCKDATA lpUnLockData) -{ - DX_STUB; +{ + DX_STUB; } DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOveryLayData) -{ - DX_STUB; +{ + DX_STUB; } Modified: trunk/reactos/dll/directx/ddraw/cleanup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/cleanup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/cleanup.c (original) +++ trunk/reactos/dll/directx/ddraw/cleanup.c Thu Dec 14 00:28:52 2006 @@ -18,8 +18,6 @@ /* FIXME free all memory and delete all dx stuff */ - + } - - Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Thu Dec 14 00:28:52 2006 @@ -8,34 +8,27 @@ * */ -/* - * IMPLEMENT - * Status ok - */ #include "../rosdraw.h" - - - HRESULT WINAPI Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface, - REFIID id, - LPVOID *obj) + REFIID id, + LPVOID *obj) { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DX_WINDBG_trace(); + DX_WINDBG_trace(); - /* fixme - the D3D object cab be optain from here - Direct3D7 - */ + /* fixme + the D3D object cab be optain from here + Direct3D7 + */ if (IsEqualGUID(&IID_IDirectDraw7, id)) { - /* DirectDraw7 Vtable */ - This->lpVtbl = &DirectDraw7_Vtable; + /* DirectDraw7 Vtable */ + This->lpVtbl = &DirectDraw7_Vtable; *obj = &This->lpVtbl; } else @@ -43,10 +36,11 @@ *obj = NULL; return E_NOINTERFACE; } - + Main_DirectDraw_AddRef(iface); return S_OK; } + /* * IMPLEMENT * Status ok @@ -57,59 +51,56 @@ { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DX_WINDBG_trace(); - - if (iface!=NULL) - { - This->dwIntRefCnt++; - This->lpLcl->dwLocalRefCnt++; - - if (This->lpLcl->lpGbl != NULL) - { - This->lpLcl->lpGbl->dwRefCnt++; - } - } + DX_WINDBG_trace(); + + if (iface!=NULL) + { + This->dwIntRefCnt++; + This->lpLcl->dwLocalRefCnt++; + + if (This->lpLcl->lpGbl != NULL) + { + This->lpLcl->lpGbl->dwRefCnt++; + } + } return This->dwIntRefCnt; } -/* - * IMPLEMENT - * Status ok - */ + ULONG WINAPI Main_DirectDraw_Release (LPDIRECTDRAW7 iface) { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DX_WINDBG_trace(); - - if (iface!=NULL) - { - This->lpLcl->dwLocalRefCnt--; - This->dwIntRefCnt--; - - if (This->lpLcl->lpGbl != NULL) - { - This->lpLcl->lpGbl->dwRefCnt--; - } + DX_WINDBG_trace(); + + if (iface!=NULL) + { + This->lpLcl->dwLocalRefCnt--; + This->dwIntRefCnt--; + + if (This->lpLcl->lpGbl != NULL) + { + This->lpLcl->lpGbl->dwRefCnt--; + } + + if ( This->dwIntRefCnt == 0) + { + // set resoltion back to the one in registry + /*if(This->cooperative_level & DDSCL_EXCLUSIVE) + { + ChangeDisplaySettings(NULL, 0); + }*/ - if ( This->dwIntRefCnt == 0) - { - // set resoltion back to the one in registry - /*if(This->cooperative_level & DDSCL_EXCLUSIVE) - { - ChangeDisplaySettings(NULL, 0); - }*/ - - Cleanup(iface); + Cleanup(iface); if (This!=NULL) - { - HeapFree(GetProcessHeap(), 0, This); + { + HeapFree(GetProcessHeap(), 0, This); } - } - } - return This ? This->dwIntRefCnt : 0; + } + } + return This ? This->dwIntRefCnt : 0; } /* @@ -120,7 +111,7 @@ WINAPI Main_DirectDraw_Compact(LPDIRECTDRAW7 iface) { - /* MSDN say not implement but my question what does it return then */ + /* MSDN say not implement but my question what does it return then */ DX_WINDBG_trace(); return DD_OK; } @@ -132,44 +123,41 @@ HRESULT WINAPI Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, - DWORD dwFlags, + DWORD dwFlags, LPDIRECTDRAWCLIPPER *ppClipper, - IUnknown *pUnkOuter) -{ - //LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - LPDDRAWI_DDRAWCLIPPER_INT That; + IUnknown *pUnkOuter) +{ + //LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + LPDDRAWI_DDRAWCLIPPER_INT That; DX_WINDBG_trace(); if (pUnkOuter!=NULL) - { + { return CLASS_E_NOAGGREGATION; - } - - - That = (LPDDRAWI_DDRAWCLIPPER_INT) DxHeapMemAlloc(sizeof(DDRAWI_DDRAWCLIPPER_INT)); - + } + + That = (LPDDRAWI_DDRAWCLIPPER_INT) DxHeapMemAlloc(sizeof(DDRAWI_DDRAWCLIPPER_INT)); if (That == NULL) - { - return DDERR_OUTOFMEMORY; //E_OUTOFMEMORY; - } - + { + return DDERR_OUTOFMEMORY; //E_OUTOFMEMORY; + } + That->lpVtbl = &DirectDrawClipper_Vtable; *ppClipper = (LPDIRECTDRAWCLIPPER)That; - DirectDrawClipper_AddRef((LPDIRECTDRAWCLIPPER)That); + DirectDrawClipper_AddRef((LPDIRECTDRAWCLIPPER)That); return DirectDrawClipper_Initialize((LPDIRECTDRAWCLIPPER)That, (LPDIRECTDRAW)iface, dwFlags); } - HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7 iface, DWORD dwFlags, LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE* ppPalette, LPUNKNOWN pUnkOuter) { - DX_WINDBG_trace(); - - DX_STUB; + DX_WINDBG_trace(); + + DX_STUB; } @@ -181,144 +169,142 @@ LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter) { - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; LPDDRAWI_DDRAWSURFACE_INT That; - DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface; - DDHAL_CREATESURFACEDATA mDdCreateSurface; - - /* - * check if pUnkOuter is NULL if it is not fail - * for accrdiong msdn and own test this member is not - * set. - */ + DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface; + DDHAL_CREATESURFACEDATA mDdCreateSurface; + + /* + * check if pUnkOuter is NULL if it is not fail + * for accrdiong msdn and own test this member is not + * set. + */ if (pUnkOuter!=NULL) - { + { return CLASS_E_NOAGGREGATION; - } - - /* Check so it is vaild pointer we got of ppSurf */ - if (IsBadWritePtr( ppSurf, sizeof( LPDIRECTDRAWSURFACE7 )) ) - { - return DDERR_INVALIDPARAMS; - } - - /* Check so it is vaild pointer we got of pDDSD - */ - if (IsBadWritePtr( pDDSD, sizeof( LPDDSURFACEDESC2 )) ) - { - return DDERR_INVALIDPARAMS; - } - - if (IsBadReadPtr(pDDSD, sizeof( LPDDSURFACEDESC2 )) ) - { - return DDERR_INVALIDPARAMS; - } - - /* Check if it version 1 or version 2 of the DDSURFACEDESC struct - * both struct are vaild. - */ + } + + /* Check so it is vaild pointer we got of ppSurf */ + if (IsBadWritePtr( ppSurf, sizeof( LPDIRECTDRAWSURFACE7 )) ) + { + return DDERR_INVALIDPARAMS; + } + + /* Check so it is vaild pointer we got of pDDSD + */ + if (IsBadWritePtr( pDDSD, sizeof( LPDDSURFACEDESC2 )) ) + { + return DDERR_INVALIDPARAMS; + } + + if (IsBadReadPtr(pDDSD, sizeof( LPDDSURFACEDESC2 )) ) + { + return DDERR_INVALIDPARAMS; + } + + /* Check if it version 1 or version 2 of the DDSURFACEDESC struct + * both struct are vaild. + */ if (sizeof(DDSURFACEDESC2)!=pDDSD->dwSize) - { + { return DDERR_UNSUPPORTED; - } - - - /* here we need start fixing bugs - * the code above is 100% correct behovir - * checked how ms ddraw behivor - */ - - - /* FIXME - * Alloc memory for the ppSurf pointer - * we expect it is NULL, But we maybe should add a NULL check - * for it, so we do not over write it, and also add a pointer vaildate - * for it. - */ + } + + + /* here we need start fixing bugs + * the code above is 100% correct behovir + * checked how ms ddraw behivor + */ + + /* FIXME + * Alloc memory for the ppSurf pointer + * we expect it is NULL, But we maybe should add a NULL check + * for it, so we do not over write it, and also add a pointer vaildate + * for it. + */ That = (LPDDRAWI_DDRAWSURFACE_INT)DxHeapMemAlloc(sizeof(DDRAWI_DDRAWSURFACE_INT)); if (That == NULL) - { + { return E_OUTOFMEMORY; - } - - /* FIXME - Alloc memory for the local surface struct we need - we should check if NULL or not see comment above - */ - That->lpLcl = (LPDDRAWI_DDRAWSURFACE_LCL)DxHeapMemAlloc(sizeof(DDRAWI_DDRAWSURFACE_LCL)); - if (That->lpLcl == NULL) - { - /* shall we free it if it fail ?? */ - DxHeapMemFree(That); + } + + /* FIXME + Alloc memory for the local surface struct we need + we should check if NULL or not see comment above + */ + That->lpLcl = (LPDDRAWI_DDRAWSURFACE_LCL)DxHeapMemAlloc(sizeof(DDRAWI_DDRAWSURFACE_LCL)); + if (That->lpLcl == NULL) + { + /* shall we free it if it fail ?? */ + DxHeapMemFree(That); return E_OUTOFMEMORY; - } - - /* Alloc memory for DDRAWI_DDRAWSURFACE_MORE */ - That->lpLcl->lpSurfMore = DxHeapMemAlloc(sizeof(DDRAWI_DDRAWSURFACE_MORE)); - if (That->lpLcl->lpSurfMore == NULL) - { - /* shall we free it if it fail ?? */ - DxHeapMemFree(That->lpLcl); - DxHeapMemFree(That); - return DDERR_OUTOFMEMORY; - } - - That->lpLcl->lpSurfMore->slist = DxHeapMemAlloc(sizeof(LPDDRAWI_DDRAWSURFACE_LCL)<<1); - if (That->lpLcl->lpSurfMore->slist == NULL) - { - /* shall we free it if it fail ?? */ - DxHeapMemFree(That->lpLcl->lpSurfMore); - DxHeapMemFree(That->lpLcl); - DxHeapMemFree(That); - return DDERR_OUTOFMEMORY; - } - - - /* setup some value */ - *ppSurf = (LPDIRECTDRAWSURFACE7)That; - - That->lpVtbl = &DirectDrawSurface7_Vtable; - That->lpLcl->lpGbl = &ddSurfGbl; - That->lpLcl->lpGbl->lpDD = &ddgbl; - That->lpLcl->lpSurfMore->dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE); - That->lpLcl->lpSurfMore->lpDD_int = This; - That->lpLcl->lpSurfMore->lpDD_lcl = This->lpLcl; - That->lpLcl->lpSurfMore->slist[0] = That->lpLcl; - That->lpLcl->dwProcessId = GetCurrentProcessId(); - - /* this two line should be move to startup code */ + } + + /* Alloc memory for DDRAWI_DDRAWSURFACE_MORE */ + That->lpLcl->lpSurfMore = DxHeapMemAlloc(sizeof(DDRAWI_DDRAWSURFACE_MORE)); + if (That->lpLcl->lpSurfMore == NULL) + { + /* shall we free it if it fail ?? */ + DxHeapMemFree(That->lpLcl); + DxHeapMemFree(That); + return DDERR_OUTOFMEMORY; + } + + That->lpLcl->lpSurfMore->slist = DxHeapMemAlloc(sizeof(LPDDRAWI_DDRAWSURFACE_LCL)<<1); + if (That->lpLcl->lpSurfMore->slist == NULL) + { + /* shall we free it if it fail ?? */ + DxHeapMemFree(That->lpLcl->lpSurfMore); + DxHeapMemFree(That->lpLcl); + DxHeapMemFree(That); + return DDERR_OUTOFMEMORY; + } + + /* setup some value */ + *ppSurf = (LPDIRECTDRAWSURFACE7)That; + + That->lpVtbl = &DirectDrawSurface7_Vtable; + That->lpLcl->lpGbl = &ddSurfGbl; + That->lpLcl->lpGbl->lpDD = &ddgbl; + That->lpLcl->lpSurfMore->dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE); + That->lpLcl->lpSurfMore->lpDD_int = This; + That->lpLcl->lpSurfMore->lpDD_lcl = This->lpLcl; + That->lpLcl->lpSurfMore->slist[0] = That->lpLcl; + That->lpLcl->dwProcessId = GetCurrentProcessId(); + + /* this two line should be move to startup code */ That->lpLcl->lpGbl->lpDD = This->lpLcl->lpGbl; That->lpLcl->lpGbl->lpDDHandle = This->lpLcl->lpGbl; - /* setup the callback struct right - * maybe we should fill in - * xx.lpDD, xx.function, xx.ddRVal - * in startup and do a cache of it - * to save time ?? - */ - - mDdCanCreateSurface.lpDD = This->lpLcl->lpGbl; - mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat; - mDdCanCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD; - mDdCanCreateSurface.CanCreateSurface = This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface; - mDdCanCreateSurface.ddRVal = DDERR_GENERIC; - - mDdCreateSurface.lpDD = This->lpLcl->lpGbl; - mDdCreateSurface.CreateSurface = This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface; - mDdCreateSurface.ddRVal = DDERR_GENERIC; - mDdCreateSurface.dwSCnt = That->dwIntRefCnt + 1; // is this correct - mDdCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD; - - mDdCreateSurface.lplpSList = That->lpLcl->lpSurfMore->slist; - + /* setup the callback struct right + * maybe we should fill in + * xx.lpDD, xx.function, xx.ddRVal + * in startup and do a cache of it + * to save time ?? + */ + + mDdCanCreateSurface.lpDD = This->lpLcl->lpGbl; + mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat; + mDdCanCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD; + mDdCanCreateSurface.CanCreateSurface = This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface; + mDdCanCreateSurface.ddRVal = DDERR_GENERIC; + + mDdCreateSurface.lpDD = This->lpLcl->lpGbl; + mDdCreateSurface.CreateSurface = This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface; + mDdCreateSurface.ddRVal = DDERR_GENERIC; + mDdCreateSurface.dwSCnt = That->dwIntRefCnt + 1; // is this correct + mDdCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD; + + mDdCreateSurface.lplpSList = That->lpLcl->lpSurfMore->slist; + if (pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) - { + { - This->lpLcl->lpPrimary = That; + This->lpLcl->lpPrimary = That; if (mDdCanCreateSurface.CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED) { @@ -330,44 +316,43 @@ return DDERR_NOTINITIALIZED; } - /* FIXME - * check the value from pDDSD and use it as size - */ - - if (This->lpLcl->dwLocalFlags & DDRAWILCL_ISFULLSCREEN) - { - That->lpLcl->lpGbl->wWidth = This->lpLcl->lpGbl->vmiData.dwDisplayWidth; - That->lpLcl->lpGbl->wHeight = This->lpLcl->lpGbl->vmiData.dwDisplayHeight; - That->lpLcl->lpGbl->lPitch = This->lpLcl->lpGbl->vmiData.lDisplayPitch; - } - else - { - RECT rect; - - if(GetWindowRect((HWND)This->lpLcl->hWnd, &rect)) - { - That->lpLcl->lpGbl->wWidth = rect.right - rect.left; - That->lpLcl->lpGbl->wHeight = rect.bottom - rect.top; - That->lpLcl->lpGbl->lPitch = This->lpLcl->lpGbl->vmiData.lDisplayPitch; - } - } - - + /* FIXME + * check the value from pDDSD and use it as size + */ + + if (This->lpLcl->dwLocalFlags & DDRAWILCL_ISFULLSCREEN) + { + That->lpLcl->lpGbl->wWidth = This->lpLcl->lpGbl->vmiData.dwDisplayWidth; + That->lpLcl->lpGbl->wHeight = This->lpLcl->lpGbl->vmiData.dwDisplayHeight; + That->lpLcl->lpGbl->lPitch = This->lpLcl->lpGbl->vmiData.lDisplayPitch; + } + else + { + RECT rect; + if(GetWindowRect((HWND)This->lpLcl->hWnd, &rect)) + { + That->lpLcl->lpGbl->wWidth = rect.right - rect.left; + That->lpLcl->lpGbl->wHeight = rect.bottom - rect.top; + That->lpLcl->lpGbl->lPitch = This->lpLcl->lpGbl->vmiData.lDisplayPitch; + } + } + + // That->lpLcl->dwFlags = DDRAWISURF_PARTOFPRIMARYCHAIN|DDRAWISURF_HASOVERLAYDATA; That->lpLcl->ddsCaps.dwCaps = pDDSD->ddsCaps.dwCaps; - + mDdCreateSurface.lplpSList = That->lpLcl->lpSurfMore->slist; - + if (mDdCreateSurface.CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED) { - return DDERR_NOTINITIALIZED; + return DDERR_NOTINITIALIZED; } - + if (mDdCreateSurface.ddRVal != DD_OK) { return mDdCreateSurface.ddRVal; } - + return DD_OK; } else if (pDDSD->ddsCaps.dwCaps & DDSCAPS_OVERLAY) @@ -390,8 +375,8 @@ { DX_STUB_str( "Can not create offscreenplain surface"); } - - DX_STUB_str("DDERR_INVALIDSURFACETYPE"); + + DX_STUB_str("DDERR_INVALIDSURFACETYPE"); return DDERR_INVALIDSURFACETYPE; } @@ -415,8 +400,8 @@ HRESULT WINAPI Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags, LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback) { - - DX_STUB_DD_OK; + + DX_STUB_DD_OK; // IDirectDrawImpl* This = (IDirectDrawImpl*)iface; // DDSURFACEDESC2 desc_callback; @@ -583,26 +568,26 @@ Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface) { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DDHAL_FLIPTOGDISURFACEDATA mDdFlipToGDISurface; - - DX_WINDBG_trace(); - - mDdFlipToGDISurface.ddRVal = DDERR_NOTINITIALIZED; - mDdFlipToGDISurface.dwReserved = 0; - mDdFlipToGDISurface.dwToGDI = TRUE; - mDdFlipToGDISurface.FlipToGDISurface = This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface; - - if (mDdFlipToGDISurface.FlipToGDISurface == NULL) - { - return DDERR_NODRIVERSUPPORT; - } - - if (mDdFlipToGDISurface.FlipToGDISurface(&mDdFlipToGDISurface)==DDHAL_DRIVER_HANDLED); - { - return mDdFlipToGDISurface.ddRVal; - } - - return DDERR_NODRIVERSUPPORT; + DDHAL_FLIPTOGDISURFACEDATA mDdFlipToGDISurface; + + DX_WINDBG_trace(); + + mDdFlipToGDISurface.ddRVal = DDERR_NOTINITIALIZED; + mDdFlipToGDISurface.dwReserved = 0; + mDdFlipToGDISurface.dwToGDI = TRUE; + mDdFlipToGDISurface.FlipToGDISurface = This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface; + + if (mDdFlipToGDISurface.FlipToGDISurface == NULL) + { + return DDERR_NODRIVERSUPPORT; + } + + if (mDdFlipToGDISurface.FlipToGDISurface(&mDdFlipToGDISurface)==DDHAL_DRIVER_HANDLED); + { + return mDdFlipToGDISurface.ddRVal; + } + + return DDERR_NODRIVERSUPPORT; } /* @@ -612,39 +597,37 @@ HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps, LPDDCAPS pHELCaps) -{ - +{ DDSCAPS2 ddscaps = {0}; DWORD status = DD_FALSE; LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DX_WINDBG_trace(); - - if (pDriverCaps != NULL) - { - Main_DirectDraw_GetAvailableVidMem(iface, - &ddscaps, - &This->lpLcl->lpGbl->ddCaps.dwVidMemTotal, - &This->lpLcl->lpGbl->ddCaps.dwVidMemFree); - - RtlCopyMemory(pDriverCaps,&This->lpLcl->lpGbl->ddCaps,sizeof(DDCORECAPS)); - pDriverCaps->dwSize=sizeof(DDCAPS); - - status = DD_OK; + DX_WINDBG_trace(); + + if (pDriverCaps != NULL) + { + Main_DirectDraw_GetAvailableVidMem(iface, + &ddscaps, + &This->lpLcl->lpGbl->ddCaps.dwVidMemTotal, + &This->lpLcl->lpGbl->ddCaps.dwVidMemFree); + + RtlCopyMemory(pDriverCaps,&This->lpLcl->lpGbl->ddCaps,sizeof(DDCORECAPS)); + pDriverCaps->dwSize=sizeof(DDCAPS); + + status = DD_OK; } if (pHELCaps != NULL) - { - Main_DirectDraw_GetAvailableVidMem(iface, - &ddscaps, - &This->lpLcl->lpGbl->ddHELCaps.dwVidMemTotal, - &This->lpLcl->lpGbl->ddHELCaps.dwVidMemFree); - - RtlCopyMemory(pDriverCaps,&This->lpLcl->lpGbl->ddHELCaps,sizeof(DDCORECAPS)); - status = DD_OK; - } - + { + Main_DirectDraw_GetAvailableVidMem(iface, + &ddscaps, + &This->lpLcl->lpGbl->ddHELCaps.dwVidMemTotal, + &This->lpLcl->lpGbl->ddHELCaps.dwVidMemFree); + + RtlCopyMemory(pDriverCaps,&This->lpLcl->lpGbl->ddHELCaps,sizeof(DDCORECAPS)); + status = DD_OK; + } return status; } @@ -721,7 +704,7 @@ { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DX_WINDBG_trace(); + DX_WINDBG_trace(); if (freq == NULL) { @@ -740,32 +723,32 @@ Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine) { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DDHAL_GETSCANLINEDATA mDdGetScanLine; - - DX_WINDBG_trace(); + DDHAL_GETSCANLINEDATA mDdGetScanLine; + + DX_WINDBG_trace(); *lpdwScanLine = 0; - mDdGetScanLine.ddRVal = DDERR_NOTINITIALIZED; - mDdGetScanLine.dwScanLine = 0; - mDdGetScanLine.GetScanLine = This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine; - mDdGetScanLine.lpDD = This->lpLcl->lpGbl; - - if (mDdGetScanLine.GetScanLine == NULL) - { - return DDERR_NODRIVERSUPPORT; - } - - mDdGetScanLine.ddRVal = DDERR_NOTPALETTIZED; - mDdGetScanLine.dwScanLine = 0; - - if (mDdGetScanLine.GetScanLine(&mDdGetScanLine)==DDHAL_DRIVER_HANDLED); - { - *lpdwScanLine = mDdGetScanLine.dwScanLine; - return mDdGetScanLine.ddRVal; - } - - return DDERR_NODRIVERSUPPORT; + mDdGetScanLine.ddRVal = DDERR_NOTINITIALIZED; + mDdGetScanLine.dwScanLine = 0; + mDdGetScanLine.GetScanLine = This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine; + mDdGetScanLine.lpDD = This->lpLcl->lpGbl; + + if (mDdGetScanLine.GetScanLine == NULL) + { + return DDERR_NODRIVERSUPPORT; + } + + mDdGetScanLine.ddRVal = DDERR_NOTPALETTIZED; + mDdGetScanLine.dwScanLine = 0; + + if (mDdGetScanLine.GetScanLine(&mDdGetScanLine)==DDHAL_DRIVER_HANDLED); + { + *lpdwScanLine = mDdGetScanLine.dwScanLine; + return mDdGetScanLine.ddRVal; + } + + return DDERR_NODRIVERSUPPORT; } /* @@ -796,7 +779,7 @@ return DDERR_NOTINITIALIZED; } - return DDERR_ALREADYINITIALIZED; + return DDERR_ALREADYINITIALIZED; } /* @@ -819,19 +802,25 @@ HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel) { - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - - DX_WINDBG_trace(); - - if (cooplevel & DDSCL_FULLSCREEN) - { - This->lpLcl->dwLocalFlags |= DDRAWILCL_ISFULLSCREEN; - } - - /* This code should be a callback */ - This->lpLcl->hWnd = hwnd; - This->lpLcl->hFocusWnd = hwnd; - ReCreateDirectDraw((LPDIRECTDRAW*)iface); + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + + DX_WINDBG_trace(); + + if (cooplevel & DDSCL_FULLSCREEN) + { + This->lpLcl->dwLocalFlags |= DDRAWILCL_ISFULLSCREEN; + } + + if (cooplevel & DDSCL_EXCLUSIVE) + { + This->lpLcl->lpGbl->lpExclusiveOwner = This->lpLcl; + } + + + /* This code should be a callback */ + This->lpLcl->hWnd = hwnd; + This->lpLcl->hFocusWnd = hwnd; + ReCreateDirectDraw((LPDIRECTDRAW*)iface); // TODO: // - create a scaner that check which driver we should get the HDC from @@ -843,9 +832,9 @@ // // DDHAL_SETEXCLUSIVEMODEDATA SetExclusiveMode; - //DX_WINDBG_trace(); + //DX_WINDBG_trace(); // - // + // // // check the parameters // if ((HWND)This->lpLcl->lpGbl->lpExclusiveOwner->hWnd == hwnd) // return DD_OK; @@ -862,13 +851,13 @@ // This->lpLcl->lpGbl->lpExclusiveOwner->hWnd = (ULONG_PTR) hwnd; // This->lpLcl->lpGbl->lpExclusiveOwner->hDC = (ULONG_PTR)GetDC(hwnd); - // - ///* FIXME : fill the mDDrawGlobal.lpExclusiveOwner->dwLocalFlags right */ - ////mDDrawGlobal.lpExclusiveOwner->dwLocalFlags + // + ///* FIXME : fill the mDDrawGlobal.lpExclusiveOwner->dwLocalFlags right */ + ////mDDrawGlobal.lpExclusiveOwner->dwLocalFlags // SetExclusiveMode.ddRVal = DDERR_NOTPALETTIZED; - //if ((This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)) + //if ((This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)) // { // // SetExclusiveMode.SetExclusiveMode = This->lpLcl->lpGbl->lpDDCBtmp->cbDDCallbacks.SetExclusiveMode; @@ -896,76 +885,73 @@ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - BOOL dummy = TRUE; - DEVMODE DevMode; + BOOL dummy = TRUE; + DEVMODE DevMode; int iMode=0; int Width=0; int Height=0; int BPP=0; - DDHAL_SETMODEDATA mDdSetMode; - - DX_WINDBG_trace(); - - /* FIXME check the refresrate if it same if it not same do the mode switch */ - - if ((This->lpLcl->lpGbl->vmiData.dwDisplayHeight == dwHeight) && - (This->lpLcl->lpGbl->vmiData.dwDisplayWidth == dwWidth) && - (This->lpLcl->lpGbl->vmiData.ddpfDisplay.dwRGBBitCount == dwBPP)) - { - - return DD_OK; - } - - mDdSetMode.ddRVal = DDERR_NOTINITIALIZED; - mDdSetMode.dwModeIndex = 0; - mDdSetMode.inexcl = 0; - mDdSetMode.lpDD = This->lpLcl->lpGbl; - mDdSetMode.useRefreshRate = FALSE; - mDdSetMode.SetMode = This->lpLcl->lpDDCB->cbDDCallbacks.SetMode; - - if (mDdSetMode.SetMode == NULL) - { - return DDERR_NODRIVERSUPPORT; - } - - /* Check use the Hal or Hel for SetMode */ - // this only for exclusive mode - /*if(!(This->cooperative_level & DDSCL_EXCLUSIVE)) - { - return DDERR_NOEXCLUSIVEMODE; - }*/ - - DevMode.dmSize = (WORD)sizeof(DEVMODE); - DevMode.dmDriverExtra = 0; + DDHAL_SETMODEDATA mDdSetMode; + + DX_WINDBG_trace(); + + /* FIXME check the refresrate if it same if it not same do the mode switch */ + + if ((This->lpLcl->lpGbl->vmiData.dwDisplayHeight == dwHeight) && + (This->lpLcl->lpGbl->vmiData.dwDisplayWidth == dwWidth) && + (This->lpLcl->lpGbl->vmiData.ddpfDisplay.dwRGBBitCount == dwBPP)) + { + return DD_OK; + } + + mDdSetMode.ddRVal = DDERR_NOTINITIALIZED; + mDdSetMode.dwModeIndex = 0; + mDdSetMode.inexcl = 0; + mDdSetMode.lpDD = This->lpLcl->lpGbl; + mDdSetMode.useRefreshRate = FALSE; + mDdSetMode.SetMode = This->lpLcl->lpDDCB->cbDDCallbacks.SetMode; + + if (mDdSetMode.SetMode == NULL) + { + return DDERR_NODRIVERSUPPORT; + } + + /* Check use the Hal or Hel for SetMode */ + // this only for exclusive mode + /*if(!(This->cooperative_level & DDSCL_EXCLUSIVE)) + { + return DDERR_NOEXCLUSIVEMODE; + }*/ + + DevMode.dmSize = (WORD)sizeof(DEVMODE); + DevMode.dmDriverExtra = 0; while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0 ) != 0) { - + if ((dwWidth == DevMode.dmPelsWidth) && (dwHeight == DevMode.dmPelsHeight) && ( dwBPP == DevMode.dmBitsPerPel)) - { - Width = DevMode.dmPelsWidth; - Height = DevMode.dmPelsHeight; - BPP = DevMode.dmBitsPerPel; + { + Width = DevMode.dmPelsWidth; + Height = DevMode.dmPelsHeight; + BPP = DevMode.dmBitsPerPel; break; - } - iMode++; - } - - if ((dwWidth != DevMode.dmPelsWidth) || (dwHeight != DevMode.dmPelsHeight) || ( dwBPP != DevMode.dmBitsPerPel)) - { - return DDERR_UNSUPPORTEDMODE; - } - - - - mDdSetMode.dwModeIndex = iMode; + } + iMode++; + } + + if ((dwWidth != DevMode.dmPelsWidth) || (dwHeight != DevMode.dmPelsHeight) || ( dwBPP != DevMode.dmBitsPerPel)) + { + return DDERR_UNSUPPORTEDMODE; + } + + mDdSetMode.dwModeIndex = iMode; mDdSetMode.SetMode(&mDdSetMode); - - DdReenableDirectDrawObject(This->lpLcl->lpGbl, &dummy); - - /* FIXME fill the This->DirectDrawGlobal.vmiData right */ + + DdReenableDirectDrawObject(This->lpLcl->lpGbl, &dummy); + + /* FIXME fill the This->DirectDrawGlobal.vmiData right */ //This->lpLcl->lpGbl->lpExclusiveOwner->hDC = (ULONG_PTR)GetDC( (HWND)This->lpLcl->lpGbl->lpExclusiveOwner->hWnd); - return mDdSetMode.ddRVal; + return mDdSetMode.ddRVal; } /* @@ -976,35 +962,37 @@ Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags, HANDLE h) { - - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DDHAL_WAITFORVERTICALBLANKDATA mDdWaitForVerticalBlank; - - DX_WINDBG_trace(); + + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + DDHAL_WAITFORVERTICALBLANKDATA mDdWaitForVerticalBlank; + + DX_WINDBG_trace(); - if (!(This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)) - { - return DDERR_NODRIVERSUPPORT; - } - - if (mDdWaitForVerticalBlank.WaitForVerticalBlank == NULL) - { - return DDERR_NODRIVERSUPPORT; - } - - mDdWaitForVerticalBlank.bIsInVB = DDWAITVB_BLOCKBEGIN ; /* return begin ? */ - mDdWaitForVerticalBlank.ddRVal = DDERR_NOTINITIALIZED; - mDdWaitForVerticalBlank.dwFlags = dwFlags; - mDdWaitForVerticalBlank.hEvent = (DWORD)h; - mDdWaitForVerticalBlank.lpDD = This->lpLcl->lpGbl; - mDdWaitForVerticalBlank.WaitForVerticalBlank = This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank; - - if (mDdWaitForVerticalBlank.WaitForVerticalBlank(&mDdWaitForVerticalBlank)==DDHAL_DRIVER_HANDLED); - { - return mDdWaitForVerticalBlank.ddRVal; - } - - return DDERR_NODRIVERSUPPORT; + if (!(This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)) + { + return DDERR_NODRIVERSUPPORT; + } + + if (mDdWaitForVerticalBlank.WaitForVerticalBlank == NULL) + { + return DDERR_NODRIVERSUPPORT; + } + + mDdWaitForVerticalBlank.bIsInVB = DDWAITVB_BLOCKBEGIN ; /* return begin ? */ + mDdWaitForVerticalBlank.ddRVal = DDERR_NOTINITIALIZED; + mDdWaitForVerticalBlank.dwFlags = dwFlags; + mDdWaitForVerticalBlank.hEvent = (DWORD)h; + mDdWaitForVerticalBlank.lpDD = This->lpLcl->lpGbl; + mDdWaitForVerticalBlank.WaitForVerticalBlank = This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank; + + if (mDdWaitForVerticalBlank.WaitForVerticalBlank(&mDdWaitForVerticalBlank) + != DDHAL_DRIVER_HANDLED) + { + return DDERR_NODRIVERSUPPORT; + } + + + return mDdWaitForVerticalBlank.ddRVal; } /* @@ -1014,39 +1002,39 @@ HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps, LPDWORD total, LPDWORD free) -{ - DDHAL_GETAVAILDRIVERMEMORYDATA mem; - - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - - DX_WINDBG_trace(); - - - /* Only Hal version exists acodring msdn */ - if (!(This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY)) - { - return DDERR_NODRIVERSUPPORT; - } - - mem.lpDD = This->lpLcl->lpGbl; +{ + DDHAL_GETAVAILDRIVERMEMORYDATA mem; + + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + + DX_WINDBG_trace(); + + + /* Only Hal version exists acodring msdn */ + if (!(This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY)) + { + return DDERR_NODRIVERSUPPORT; + } + + mem.lpDD = This->lpLcl->lpGbl; mem.ddRVal = DDERR_NOTPALETTIZED; mem.DDSCaps.dwCaps = ddscaps->dwCaps; mem.ddsCapsEx.dwCaps2 = ddscaps->dwCaps2; mem.ddsCapsEx.dwCaps3 = ddscaps->dwCaps3; mem.ddsCapsEx.dwCaps4 = ddscaps->dwCaps4; - if (This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks.GetAvailDriverMemory(&mem) == DDHAL_DRIVER_HANDLED); - { - if (total !=NULL) - { + if (This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks.GetAvailDriverMemory(&mem) == DDHAL_DRIVER_HANDLED); + { + if (total !=NULL) + { *total = mem.dwTotal; - } + } *free = mem.dwFree; - return mem.ddRVal; - } - - return DDERR_NODRIVERSUPPORT; + return mem.ddRVal; + } + + return DDERR_NODRIVERSUPPORT; } /*
18 years
1
0
0
0
[greatlrd] 25147: fixed format of this file do not mix tab and space
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Dec 13 23:57:09 2006 New Revision: 25147 URL:
http://svn.reactos.org/svn/reactos?rev=25147&view=rev
Log: fixed format of this file do not mix tab and space Modified: trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Wed Dec 13 23:57:09 2006 @@ -20,7 +20,7 @@ HRESULT WINAPI StartDirectDraw(LPDIRECTDRAW* iface, LPGUID lpGuid, BOOL reenable) { - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; DWORD hal_ret = DD_FALSE; DWORD hel_ret = DD_FALSE; DEVMODE devmode; @@ -29,50 +29,49 @@ UCHAR *pbmiData; BITMAPINFO *pbmi; DWORD *pMasks; - INT devicetypes = 0; - DWORD dwFlags = 0; + INT devicetypes = 0; + DWORD dwFlags = 0; DX_WINDBG_trace(); - + if (reenable == FALSE) - { - if (This->lpLink == NULL) - { - RtlZeroMemory(&ddgbl, sizeof(DDRAWI_DIRECTDRAW_GBL)); - This->lpLcl->lpGbl->dwRefCnt++; - - if (ddgbl.lpDDCBtmp == NULL) - { - ddgbl.lpDDCBtmp = (LPDDHAL_CALLBACKS) DxHeapMemAlloc(sizeof(DDHAL_CALLBACKS)); - if (ddgbl.lpDDCBtmp == NULL) - { - DX_STUB_str("Out of memmory"); - return DD_FALSE; - } - } - } - } - - /* - Visual studio think this code is a break point if we call - second time to this function, press on continue in visual - studio the program will work. No real bug. gcc 3.4.5 genreate - code that look like MS visual studio break point. + { + if (This->lpLink == NULL) + { + RtlZeroMemory(&ddgbl, sizeof(DDRAWI_DIRECTDRAW_GBL)); + This->lpLcl->lpGbl->dwRefCnt++; + if (ddgbl.lpDDCBtmp == NULL) + { + ddgbl.lpDDCBtmp = (LPDDHAL_CALLBACKS) DxHeapMemAlloc(sizeof(DDHAL_CALLBACKS)); + if (ddgbl.lpDDCBtmp == NULL) + { + DX_STUB_str("Out of memmory"); + return DD_FALSE; + } + } + } + } + + /* + Visual studio think this code is a break point if we call + second time to this function, press on continue in visual + studio the program will work. No real bug. gcc 3.4.5 genreate + code that look like MS visual studio break point. */ - This->lpLcl->lpDDCB = ddgbl.lpDDCBtmp; + This->lpLcl->lpDDCB = ddgbl.lpDDCBtmp; /* Same for HEL and HAL */ - if (ddgbl.lpModeInfo == NULL) - { - ddgbl.lpModeInfo = (DDHALMODEINFO*) DxHeapMemAlloc(1 * sizeof(DDHALMODEINFO)); - if (ddgbl.lpModeInfo == NULL) - { - DX_STUB_str("DD_FALSE"); - return DD_FALSE; - } - } + if (ddgbl.lpModeInfo == NULL) + { + ddgbl.lpModeInfo = (DDHALMODEINFO*) DxHeapMemAlloc(1 * sizeof(DDHALMODEINFO)); + if (ddgbl.lpModeInfo == NULL) + { + DX_STUB_str("DD_FALSE"); + return DD_FALSE; + } + } EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); @@ -83,71 +82,67 @@ This->lpLcl->lpGbl->lpModeInfo[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency; - if (reenable == FALSE) - { - if (lpGuid == NULL) - { - devicetypes = 1; - - /* Create HDC for default, hal and hel driver */ - This->lpLcl->hDC = (ULONG_PTR) CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); - - /* cObsolete is undoc in msdn it being use in CreateDCA */ - RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); - RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7); - - dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV; - } - - else if (lpGuid == (LPGUID) DDCREATE_HARDWAREONLY) - { - devicetypes = 2; - - /* Create HDC for default, hal and hel driver */ - This->lpLcl->hDC = (ULONG_PTR)CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); - - /* cObsolete is undoc in msdn it being use in CreateDCA */ - RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); - RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7); - - dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV; - } - - else if (lpGuid == (LPGUID) DDCREATE_EMULATIONONLY) - { - devicetypes = 3; - - /* Create HDC for default, hal and hel driver */ - This->lpLcl->hDC = (ULONG_PTR) CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); - - /* cObsolete is undoc in msdn it being use in CreateDCA */ - RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); - RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7); - - dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV; - } - else - { - /* FIXME : need getting driver from the GUID that have been pass in from - the register. we do not support that yet - */ - devicetypes = 4; - This->lpLcl->hDC = (ULONG_PTR) NULL ; - } - - if ( (HDC)This->lpLcl->hDC == NULL) - { - DX_STUB_str("DDERR_OUTOFMEMORY"); - return DDERR_OUTOFMEMORY ; - } - } + if (reenable == FALSE) + { + if (lpGuid == NULL) + { + devicetypes = 1; + + /* Create HDC for default, hal and hel driver */ + This->lpLcl->hDC = (ULONG_PTR) CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); + + /* cObsolete is undoc in msdn it being use in CreateDCA */ + RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); + RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7); + + dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV; + } + else if (lpGuid == (LPGUID) DDCREATE_HARDWAREONLY) + { + devicetypes = 2; + /* Create HDC for default, hal and hel driver */ + This->lpLcl->hDC = (ULONG_PTR)CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); + + /* cObsolete is undoc in msdn it being use in CreateDCA */ + RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); + RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7); + dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV; + } + else if (lpGuid == (LPGUID) DDCREATE_EMULATIONONLY) + { + devicetypes = 3; + + /* Create HDC for default, hal and hel driver */ + This->lpLcl->hDC = (ULONG_PTR) CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); + + /* cObsolete is undoc in msdn it being use in CreateDCA */ + RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); + RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7); + + dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV; + } + else + { + /* FIXME : need getting driver from the GUID that have been pass in from + * the register. we do not support that yet + */ + devicetypes = 4; + This->lpLcl->hDC = (ULONG_PTR) NULL ; + } + + if ( (HDC)This->lpLcl->hDC == NULL) + { + DX_STUB_str("DDERR_OUTOFMEMORY"); + return DDERR_OUTOFMEMORY ; + } + } hbmp = CreateCompatibleBitmap((HDC) This->lpLcl->hDC, 1, 1); if (hbmp==NULL) { DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); DeleteDC((HDC) This->lpLcl->hDC); - DX_STUB_str("DDERR_OUTOFMEMORY"); + DX_STUB_str("DDERR_OUTOFMEMORY"); return DDERR_OUTOFMEMORY; } @@ -159,7 +154,7 @@ DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); DeleteDC((HDC) This->lpLcl->hDC); DeleteObject(hbmp); - DX_STUB_str("DDERR_OUTOFMEMORY"); + DX_STUB_str("DDERR_OUTOFMEMORY"); return DDERR_OUTOFMEMORY; } @@ -178,491 +173,438 @@ This->lpLcl->lpGbl->lpModeInfo[0].dwBBitMask = pMasks[2]; This->lpLcl->lpGbl->lpModeInfo[0].dwAlphaBitMask = pMasks[3]; - DxHeapMemFree(pbmiData); + DxHeapMemFree(pbmiData); /* Startup HEL and HAL */ // RtlZeroMemory(&ddgbl, sizeof(DDRAWI_DIRECTDRAW_GBL)); - - This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; - This->lpLcl->dwProcessId = GetCurrentProcessId(); + + This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; + This->lpLcl->dwProcessId = GetCurrentProcessId(); - switch (devicetypes) - { - case 2: - hal_ret = StartDirectDrawHal(iface, reenable); - This->lpLcl->lpDDCB->HELDD.dwFlags = 0; - break; - - case 3: - hel_ret = StartDirectDrawHel(iface, reenable); - This->lpLcl->lpDDCB->HALDD.dwFlags = 0; - break; - - default: - hal_ret = StartDirectDrawHal(iface, reenable); - hel_ret = StartDirectDrawHel(iface, reenable); - - } - - if (hal_ret!=DD_OK) - { - if (hel_ret!=DD_OK) - { - DX_STUB_str("DDERR_NODIRECTDRAWSUPPORT"); - return DDERR_NODIRECTDRAWSUPPORT; - } - dwFlags |= DDRAWI_NOHARDWARE; - } - - if (hel_ret!=DD_OK) - { - dwFlags |= DDRAWI_NOEMULATION; - - } - else - { - dwFlags |= DDRAWI_EMULATIONINITIALIZED; - } - - This->lpLcl->lpGbl->dwFlags = dwFlags | DDRAWI_ATTACHEDTODESKTOP; - - This->lpLcl->hDD = This->lpLcl->lpGbl->hDD; - - /* Mix the DDCALLBACKS */ - This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; - - This->lpLcl->lpDDCB->cbDDCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDCallbacks); - - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CANCREATESURFACE; - This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface = This->lpLcl->lpDDCB->HALDD.CanCreateSurface; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CANCREATESURFACE; - This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface = This->lpLcl->lpDDCB->HELDD.CanCreateSurface; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CREATESURFACE) && (devicetypes !=3)) - { + switch (devicetypes) + { + case 2: + hal_ret = StartDirectDrawHal(iface, reenable); + This->lpLcl->lpDDCB->HELDD.dwFlags = 0; + break; + + case 3: + hel_ret = StartDirectDrawHel(iface, reenable); + This->lpLcl->lpDDCB->HALDD.dwFlags = 0; + break; + + default: + hal_ret = StartDirectDrawHal(iface, reenable); + hel_ret = StartDirectDrawHel(iface, reenable); + } + + if (hal_ret!=DD_OK) + { + if (hel_ret!=DD_OK) + { + DX_STUB_str("DDERR_NODIRECTDRAWSUPPORT"); + return DDERR_NODIRECTDRAWSUPPORT; + } + dwFlags |= DDRAWI_NOHARDWARE; + } + + if (hel_ret!=DD_OK) + { + dwFlags |= DDRAWI_NOEMULATION; + + } + else + { + dwFlags |= DDRAWI_EMULATIONINITIALIZED; + } + + This->lpLcl->lpGbl->dwFlags = dwFlags | DDRAWI_ATTACHEDTODESKTOP; + + This->lpLcl->hDD = This->lpLcl->lpGbl->hDD; + + /* Mix the DDCALLBACKS */ + This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; + + This->lpLcl->lpDDCB->cbDDCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDCallbacks); + + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CANCREATESURFACE; + This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface = This->lpLcl->lpDDCB->HALDD.CanCreateSurface; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CANCREATESURFACE; + This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface = This->lpLcl->lpDDCB->HELDD.CanCreateSurface; + } + + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CREATESURFACE) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CREATESURFACE; - This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface = This->lpLcl->lpDDCB->HALDD.CreateSurface; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CREATESURFACE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CREATESURFACE; - This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface = This->lpLcl->lpDDCB->HELDD.CreateSurface; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CREATEPALETTE) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface = This->lpLcl->lpDDCB->HALDD.CreateSurface; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CREATESURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CREATESURFACE; + This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface = This->lpLcl->lpDDCB->HELDD.CreateSurface; + } + + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CREATEPALETTE) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CREATEPALETTE; - This->lpLcl->lpDDCB->cbDDCallbacks.CreatePalette = This->lpLcl->lpDDCB->HALDD.CreatePalette; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CREATEPALETTE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CREATEPALETTE; - This->lpLcl->lpDDCB->cbDDCallbacks.CreatePalette = This->lpLcl->lpDDCB->HELDD.CreatePalette; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_DESTROYDRIVER) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.CreatePalette = This->lpLcl->lpDDCB->HALDD.CreatePalette; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CREATEPALETTE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_CREATEPALETTE; + This->lpLcl->lpDDCB->cbDDCallbacks.CreatePalette = This->lpLcl->lpDDCB->HELDD.CreatePalette; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_DESTROYDRIVER) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_DESTROYDRIVER; - This->lpLcl->lpDDCB->cbDDCallbacks.DestroyDriver = This->lpLcl->lpDDCB->HALDD.DestroyDriver; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_DESTROYDRIVER) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_DESTROYDRIVER; - This->lpLcl->lpDDCB->cbDDCallbacks.DestroyDriver = This->lpLcl->lpDDCB->HELDD.DestroyDriver; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.DestroyDriver = This->lpLcl->lpDDCB->HALDD.DestroyDriver; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_DESTROYDRIVER) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_DESTROYDRIVER; + This->lpLcl->lpDDCB->cbDDCallbacks.DestroyDriver = This->lpLcl->lpDDCB->HELDD.DestroyDriver; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_FLIPTOGDISURFACE; - This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface = This->lpLcl->lpDDCB->HALDD.FlipToGDISurface; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_FLIPTOGDISURFACE; - This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface = This->lpLcl->lpDDCB->HELDD.FlipToGDISurface; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface = This->lpLcl->lpDDCB->HALDD.FlipToGDISurface; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_FLIPTOGDISURFACE; + This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface = This->lpLcl->lpDDCB->HELDD.FlipToGDISurface; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_GETSCANLINE; - This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine = This->lpLcl->lpDDCB->HALDD.GetScanLine; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_GETSCANLINE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_GETSCANLINE; - This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine = This->lpLcl->lpDDCB->HELDD.GetScanLine; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETCOLORKEY) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine = This->lpLcl->lpDDCB->HALDD.GetScanLine; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_GETSCANLINE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_GETSCANLINE; + This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine = This->lpLcl->lpDDCB->HELDD.GetScanLine; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETCOLORKEY) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETCOLORKEY; - This->lpLcl->lpDDCB->cbDDCallbacks.SetColorKey = This->lpLcl->lpDDCB->HALDD.SetColorKey; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETCOLORKEY) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETCOLORKEY; - This->lpLcl->lpDDCB->cbDDCallbacks.SetColorKey = This->lpLcl->lpDDCB->HELDD.SetColorKey; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.SetColorKey = This->lpLcl->lpDDCB->HALDD.SetColorKey; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETCOLORKEY) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETCOLORKEY; + This->lpLcl->lpDDCB->cbDDCallbacks.SetColorKey = This->lpLcl->lpDDCB->HELDD.SetColorKey; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETEXCLUSIVEMODE; - This->lpLcl->lpDDCB->cbDDCallbacks.SetExclusiveMode = This->lpLcl->lpDDCB->HALDD.SetExclusiveMode; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETEXCLUSIVEMODE; - This->lpLcl->lpDDCB->cbDDCallbacks.SetExclusiveMode = This->lpLcl->lpDDCB->HELDD.SetExclusiveMode; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETMODE) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.SetExclusiveMode = This->lpLcl->lpDDCB->HALDD.SetExclusiveMode; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETEXCLUSIVEMODE; + This->lpLcl->lpDDCB->cbDDCallbacks.SetExclusiveMode = This->lpLcl->lpDDCB->HELDD.SetExclusiveMode; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETMODE) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETMODE; - This->lpLcl->lpDDCB->cbDDCallbacks.SetMode = This->lpLcl->lpDDCB->HALDD.SetMode; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETMODE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETMODE; - This->lpLcl->lpDDCB->cbDDCallbacks.SetMode = This->lpLcl->lpDDCB->HELDD.SetMode; - } - if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK) && (devicetypes !=3)) - { + This->lpLcl->lpDDCB->cbDDCallbacks.SetMode = This->lpLcl->lpDDCB->HALDD.SetMode; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETMODE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_SETMODE; + This->lpLcl->lpDDCB->cbDDCallbacks.SetMode = This->lpLcl->lpDDCB->HELDD.SetMode; + } + if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK) && (devicetypes !=3)) + { This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_WAITFORVERTICALBLANK; - This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank = - This->lpLcl->lpDDCB->HALDD.WaitForVerticalBlank; - } - else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_WAITFORVERTICALBLANK; - This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank = - This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank; - } - - /* Mix the DDSURFACE CALLBACKS */ - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDSurfaceCallbacks); - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_ADDATTACHEDSURFACE; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.AddAttachedSurface = - This->lpLcl->lpDDCB->HALDDSurface.AddAttachedSurface; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_ADDATTACHEDSURFACE; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.AddAttachedSurface = - This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_BLT) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_BLT; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Blt = - This->lpLcl->lpDDCB->HALDDSurface.Blt; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_BLT) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_BLT; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Blt = - This->lpLcl->lpDDCB->HELDDSurface.Blt; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_DESTROYSURFACE; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.DestroySurface = - This->lpLcl->lpDDCB->HALDDSurface.DestroySurface; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_DESTROYSURFACE; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.DestroySurface = - This->lpLcl->lpDDCB->HELDDSurface.DestroySurface; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_FLIP) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_FLIP; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Flip = - This->lpLcl->lpDDCB->HALDDSurface.Flip; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_FLIP) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_FLIP; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Flip = - This->lpLcl->lpDDCB->HELDDSurface.Flip; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETBLTSTATUS; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetBltStatus = - This->lpLcl->lpDDCB->HALDDSurface.GetBltStatus; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETBLTSTATUS; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetBltStatus = - This->lpLcl->lpDDCB->HELDDSurface.GetBltStatus; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETFLIPSTATUS; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetFlipStatus = - This->lpLcl->lpDDCB->HALDDSurface.GetFlipStatus; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETFLIPSTATUS; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetFlipStatus = - This->lpLcl->lpDDCB->HELDDSurface.GetFlipStatus; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_LOCK) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_LOCK; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Lock = - This->lpLcl->lpDDCB->HALDDSurface.Lock; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_LOCK) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_LOCK; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Lock = - This->lpLcl->lpDDCB->HELDDSurface.Lock; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_RESERVED4) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_RESERVED4; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.reserved4 = - This->lpLcl->lpDDCB->HALDDSurface.reserved4; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_RESERVED4) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_RESERVED4; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.reserved4 = - This->lpLcl->lpDDCB->HELDDSurface.reserved4; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCLIPLIST) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCLIPLIST; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetClipList = - This->lpLcl->lpDDCB->HALDDSurface.SetClipList; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETCLIPLIST) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCLIPLIST; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetClipList = - This->lpLcl->lpDDCB->HELDDSurface.SetClipList; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCOLORKEY; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetColorKey = - This->lpLcl->lpDDCB->HALDDSurface.SetColorKey; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCOLORKEY; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetColorKey = - This->lpLcl->lpDDCB->HELDDSurface.SetColorKey; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETOVERLAYPOSITION; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetOverlayPosition = - This->lpLcl->lpDDCB->HALDDSurface.SetOverlayPosition; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETOVERLAYPOSITION; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetOverlayPosition = - This->lpLcl->lpDDCB->HELDDSurface.SetOverlayPosition; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETPALETTE) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETPALETTE; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetPalette = - This->lpLcl->lpDDCB->HALDDSurface.SetPalette; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETPALETTE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETPALETTE; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetPalette = - This->lpLcl->lpDDCB->HELDDSurface.SetPalette; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_UNLOCK) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UNLOCK; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Unlock = - This->lpLcl->lpDDCB->HALDDSurface.Unlock; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_UNLOCK) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UNLOCK; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Unlock = - This->lpLcl->lpDDCB->HELDDSurface.Unlock; - } - - if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UPDATEOVERLAY; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.UpdateOverlay = - This->lpLcl->lpDDCB->HALDDSurface.UpdateOverlay; - } - else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UPDATEOVERLAY; - - This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.UpdateOverlay = - This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay; - } - - /* Mix the DDPALETTE CALLBACKS */ - This->lpLcl->lpDDCB->HALDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HALDDPalette); - - if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; - - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette = - This->lpLcl->lpDDCB->HALDDPalette.DestroyPalette; - } - else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_DESTROYPALETTE; - - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette = - This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette; - } - - if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; - - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries = - This->lpLcl->lpDDCB->HALDDPalette.SetEntries; - } - else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; - - This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries = - This->lpLcl->lpDDCB->HELDDPalette.SetEntries; - } - - /* Mix the DDExeBuf CALLBACKS */ - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDExeBufCallbacks); - - if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.CanCreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; - } + This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank = + This->lpLcl->lpDDCB->HALDD.WaitForVerticalBlank; + } + else if ((This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags |= DDHAL_CB32_WAITFORVERTICALBLANK; + This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank = + This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank; + } + + /* Mix the DDSURFACE CALLBACKS */ + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDSurfaceCallbacks); + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_ADDATTACHEDSURFACE; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.AddAttachedSurface = + This->lpLcl->lpDDCB->HALDDSurface.AddAttachedSurface; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_ADDATTACHEDSURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_ADDATTACHEDSURFACE; + + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.AddAttachedSurface = + This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_BLT) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_BLT; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Blt = This->lpLcl->lpDDCB->HALDDSurface.Blt; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_BLT) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_BLT; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Blt = This->lpLcl->lpDDCB->HELDDSurface.Blt; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_DESTROYSURFACE; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.DestroySurface = This->lpLcl->lpDDCB->HALDDSurface.DestroySurface; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_DESTROYSURFACE; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.DestroySurface = This->lpLcl->lpDDCB->HELDDSurface.DestroySurface; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_FLIP) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_FLIP; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Flip = This->lpLcl->lpDDCB->HALDDSurface.Flip; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_FLIP) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_FLIP; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Flip = This->lpLcl->lpDDCB->HELDDSurface.Flip; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETBLTSTATUS; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetBltStatus = + This->lpLcl->lpDDCB->HALDDSurface.GetBltStatus; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_GETBLTSTATUS) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETBLTSTATUS; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetBltStatus = This->lpLcl->lpDDCB->HELDDSurface.GetBltStatus; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETFLIPSTATUS; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetFlipStatus = This->lpLcl->lpDDCB->HALDDSurface.GetFlipStatus; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_GETFLIPSTATUS) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_GETFLIPSTATUS; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.GetFlipStatus = This->lpLcl->lpDDCB->HELDDSurface.GetFlipStatus; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_LOCK) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_LOCK; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Lock = This->lpLcl->lpDDCB->HALDDSurface.Lock; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_LOCK) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_LOCK; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Lock = This->lpLcl->lpDDCB->HELDDSurface.Lock; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_RESERVED4) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_RESERVED4; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.reserved4 = This->lpLcl->lpDDCB->HALDDSurface.reserved4; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_RESERVED4) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_RESERVED4; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.reserved4 = This->lpLcl->lpDDCB->HELDDSurface.reserved4; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCLIPLIST) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCLIPLIST; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetClipList = This->lpLcl->lpDDCB->HALDDSurface.SetClipList; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETCLIPLIST) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCLIPLIST; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetClipList = This->lpLcl->lpDDCB->HELDDSurface.SetClipList; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCOLORKEY; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetColorKey = This->lpLcl->lpDDCB->HALDDSurface.SetColorKey; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETCOLORKEY; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetColorKey = This->lpLcl->lpDDCB->HELDDSurface.SetColorKey; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETOVERLAYPOSITION; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetOverlayPosition = + This->lpLcl->lpDDCB->HALDDSurface.SetOverlayPosition; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETOVERLAYPOSITION) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETOVERLAYPOSITION; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetOverlayPosition = + This->lpLcl->lpDDCB->HELDDSurface.SetOverlayPosition; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_SETPALETTE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETPALETTE; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetPalette = This->lpLcl->lpDDCB->HALDDSurface.SetPalette; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_SETPALETTE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_SETPALETTE; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.SetPalette = This->lpLcl->lpDDCB->HELDDSurface.SetPalette; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_UNLOCK) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UNLOCK; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Unlock = This->lpLcl->lpDDCB->HALDDSurface.Unlock; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_UNLOCK) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UNLOCK; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.Unlock = This->lpLcl->lpDDCB->HELDDSurface.Unlock; + } + + if ((This->lpLcl->lpDDCB->HALDDSurface.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UPDATEOVERLAY; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.UpdateOverlay = This->lpLcl->lpDDCB->HALDDSurface.UpdateOverlay; + } + else if ((This->lpLcl->lpDDCB->HELDDSurface.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.dwFlags |= DDHAL_SURFCB32_UPDATEOVERLAY; + This->lpLcl->lpDDCB->cbDDSurfaceCallbacks.UpdateOverlay = This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay; + } + + /* Mix the DDPALETTE CALLBACKS */ + This->lpLcl->lpDDCB->HALDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HALDDPalette); + + if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette = + This->lpLcl->lpDDCB->HALDDPalette.DestroyPalette; + } + else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_DESTROYPALETTE; + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette = + This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette; + } + + if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries = + This->lpLcl->lpDDCB->HALDDPalette.SetEntries; + } + else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES; + This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries = + This->lpLcl->lpDDCB->HELDDPalette.SetEntries; + } + + /* Mix the DDExeBuf CALLBACKS */ + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDExeBufCallbacks); + + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.CanCreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; + } else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; - } - - if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.CreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; - } - else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; - } - - if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.DestroyExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; - } - else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; - } - - if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.LockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; - } - else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; - } - - if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) && (devicetypes !=3)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = - This->lpLcl->lpDDCB->HALDDExeBuf.UnlockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; - } - else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) && (devicetypes !=2)) - { - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = - This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer; - This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; - } - - /* Fill some basic info for Surface */ - ddSurfGbl.lpDD = &ddgbl; - - /* FIXME - We need setup this also - This->lpLcl->lpDDCB->cbDDColorControlCallbacks - This->lpLcl->lpDDCB->cbDDKernelCallbacks - This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks - This->lpLcl->lpDDCB->cbDDMotionCompCallbacks - This->lpLcl->lpDDCB->cbDDVideoPortCallbacks - */ - - This->lpLcl->hDD = ddgbl.hDD; + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CanCreateExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CANCREATEEXEBUF; + } + + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.CreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; + } + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CREATEEXEBUF) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.CreateExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_CREATEEXEBUF; + } + + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.DestroyExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; + } + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_DESTROYEXEBUF) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.DestroyExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_DESTROYEXEBUF; + } + + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.LockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; + } + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_LOCKEXEBUF) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.LockExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_LOCKEXEBUF; + } + + if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) && (devicetypes !=3)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = + This->lpLcl->lpDDCB->HALDDExeBuf.UnlockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; + } + else if ((This->lpLcl->lpDDCB->HELDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_UNLOCKEXEBUF) && (devicetypes !=2)) + { + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.UnlockExecuteBuffer = + This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer; + This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwFlags |= DDHAL_EXEBUFCB32_UNLOCKEXEBUF; + } + + /* Fill some basic info for Surface */ + ddSurfGbl.lpDD = &ddgbl; + + /* FIXME + We need setup this also + This->lpLcl->lpDDCB->cbDDColorControlCallbacks + This->lpLcl->lpDDCB->cbDDKernelCallbacks + This->lpLcl->lpDDCB->cbDDMiscellaneousCallbacks + This->lpLcl->lpDDCB->cbDDMotionCompCallbacks + This->lpLcl->lpDDCB->cbDDVideoPortCallbacks + */ + + This->lpLcl->hDD = ddgbl.hDD; return DD_OK; } @@ -672,7 +614,7 @@ StartDirectDrawHal(LPDIRECTDRAW* iface, BOOL reenable) { LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - DDHAL_GETDRIVERINFODATA DriverInfo; + DDHAL_GETDRIVERINFODATA DriverInfo; DDHALINFO mHALInfo; DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks; @@ -683,37 +625,36 @@ UINT mcFourCC; DWORD *mpFourCC; - UINT mcTextures; + UINT mcTextures; DDSURFACEDESC *mpTextures; - /* HAL Startup process */ + /* HAL Startup process */ BOOL newmode = FALSE; - RtlZeroMemory(&mHALInfo, sizeof(DDHALINFO)); - - if (reenable == FALSE) - { - ddgbl.lpDDCBtmp = DxHeapMemAlloc(sizeof(DDHAL_CALLBACKS)); - if ( ddgbl.lpDDCBtmp == NULL) - { - return DD_FALSE; - } - } - else - { - RtlZeroMemory(ddgbl.lpDDCBtmp,sizeof(DDHAL_CALLBACKS)); - } + + if (reenable == FALSE) + { + ddgbl.lpDDCBtmp = DxHeapMemAlloc(sizeof(DDHAL_CALLBACKS)); + if ( ddgbl.lpDDCBtmp == NULL) + { + return DD_FALSE; + } + } + else + { + RtlZeroMemory(ddgbl.lpDDCBtmp,sizeof(DDHAL_CALLBACKS)); + } /* Startup DX HAL step one of three */ - if (!DdCreateDirectDrawObject(This->lpLcl->lpGbl, (HDC)This->lpLcl->hDC)) + if (!DdCreateDirectDrawObject(This->lpLcl->lpGbl, (HDC)This->lpLcl->hDC)) { DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); DeleteDC((HDC)This->lpLcl->hDC); return DD_FALSE; } - + // Do not relase HDC it have been map in kernel mode // DeleteDC(hdc); @@ -724,14 +665,14 @@ return DD_FALSE; } - + /* Startup DX HAL step two of three */ if (!DdQueryDirectDrawObject(This->lpLcl->lpGbl, &mHALInfo, - &ddgbl.lpDDCBtmp->HALDD, + &ddgbl.lpDDCBtmp->HALDD, &ddgbl.lpDDCBtmp->HALDDSurface, &ddgbl.lpDDCBtmp->HALDDPalette, &mD3dCallbacks, @@ -803,11 +744,11 @@ DxHeapMemFree(mpvmList); DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); DeleteDC((HDC)This->lpLcl->hDC); - // FIXME Close DX fristcall and second call + // FIXME Close DX fristcall and second call return DD_FALSE; } - + /* Copy over from HalInfo to DirectDrawGlobal */ @@ -843,18 +784,18 @@ /* FIXME - The 3d and private data are not save at moment - - we need lest the private data being setup - for some driver are puting kmode memory there - the memory often contain the private struct + - surface, see MS DDK how MS example driver using - it - - the 3d interface are not so improten if u do not - want the 3d, and we are not writing 3d code yet - so we be okay for now. - */ + The 3d and private data are not save at moment + + we need lest the private data being setup + for some driver are puting kmode memory there + the memory often contain the private struct + + surface, see MS DDK how MS example driver using + it + + the 3d interface are not so improten if u do not + want the 3d, and we are not writing 3d code yet + so we be okay for now. + */ return DD_OK; @@ -863,190 +804,186 @@ HRESULT WINAPI StartDirectDrawHel(LPDIRECTDRAW* iface, BOOL reenable) { - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CanCreateSurface = HelDdCanCreateSurface; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreateSurface = HelDdCreateSurface; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreatePalette = HelDdCreatePalette; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.DestroyDriver = HelDdDestroyDriver; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.FlipToGDISurface = HelDdFlipToGDISurface; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.GetScanLine = HelDdGetScanLine; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetColorKey = HelDdSetColorKey; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetExclusiveMode = HelDdSetExclusiveMode; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetMode = HelDdSetMode; - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank; - - - - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.dwFlags = DDHAL_CB32_CANCREATESURFACE | - DDHAL_CB32_CREATESURFACE | - DDHAL_CB32_CREATEPALETTE | - DDHAL_CB32_DESTROYDRIVER | - DDHAL_CB32_FLIPTOGDISURFACE | - DDHAL_CB32_GETSCANLINE | - DDHAL_CB32_SETCOLORKEY | - DDHAL_CB32_SETEXCLUSIVEMODE | - DDHAL_CB32_SETMODE | - DDHAL_CB32_WAITFORVERTICALBLANK ; - - This->lpLcl->lpGbl->lpDDCBtmp->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD); - - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Blt = HelDdSurfBlt; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.DestroySurface = HelDdSurfDestroySurface; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Flip = HelDdSurfFlip; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.GetBltStatus = HelDdSurfGetBltStatus; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.GetFlipStatus = HelDdSurfGetFlipStatus; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Lock = HelDdSurfLock; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.reserved4 = HelDdSurfreserved4; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetClipList = HelDdSurfSetClipList; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetColorKey = HelDdSurfSetColorKey; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetOverlayPosition = HelDdSurfSetOverlayPosition; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetPalette = HelDdSurfSetPalette; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Unlock = HelDdSurfUnlock; - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.UpdateOverlay = HelDdSurfUpdateOverlay; - - This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.dwFlags = DDHAL_SURFCB32_ADDATTACHEDSURFACE | - DDHAL_SURFCB32_BLT | - DDHAL_SURFCB32_DESTROYSURFACE | - DDHAL_SURFCB32_FLIP | - DDHAL_SURFCB32_GETBLTSTATUS | - DDHAL_SURFCB32_GETFLIPSTATUS | - DDHAL_SURFCB32_LOCK | - DDHAL_SURFCB32_RESERVED4 | - DDHAL_SURFCB32_SETCLIPLIST | - DDHAL_SURFCB32_SETCOLORKEY | - DDHAL_SURFCB32_SETOVERLAYPOSITION | - DDHAL_SURFCB32_SETPALETTE | - DDHAL_SURFCB32_UNLOCK | - DDHAL_SURFCB32_UPDATEOVERLAY; + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CanCreateSurface = HelDdCanCreateSurface; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreateSurface = HelDdCreateSurface; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreatePalette = HelDdCreatePalette; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.DestroyDriver = HelDdDestroyDriver; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.FlipToGDISurface = HelDdFlipToGDISurface; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.GetScanLine = HelDdGetScanLine; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetColorKey = HelDdSetColorKey; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetExclusiveMode = HelDdSetExclusiveMode; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetMode = HelDdSetMode; + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank; + + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.dwFlags = DDHAL_CB32_CANCREATESURFACE | + DDHAL_CB32_CREATESURFACE | + DDHAL_CB32_CREATEPALETTE | + DDHAL_CB32_DESTROYDRIVER | + DDHAL_CB32_FLIPTOGDISURFACE | + DDHAL_CB32_GETSCANLINE | + DDHAL_CB32_SETCOLORKEY | + DDHAL_CB32_SETEXCLUSIVEMODE | + DDHAL_CB32_SETMODE | + DDHAL_CB32_WAITFORVERTICALBLANK ; + + This->lpLcl->lpGbl->lpDDCBtmp->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD); + + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Blt = HelDdSurfBlt; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.DestroySurface = HelDdSurfDestroySurface; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Flip = HelDdSurfFlip; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.GetBltStatus = HelDdSurfGetBltStatus; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.GetFlipStatus = HelDdSurfGetFlipStatus; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Lock = HelDdSurfLock; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.reserved4 = HelDdSurfreserved4; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetClipList = HelDdSurfSetClipList; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetColorKey = HelDdSurfSetColorKey; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetOverlayPosition = HelDdSurfSetOverlayPosition; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetPalette = HelDdSurfSetPalette; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Unlock = HelDdSurfUnlock; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.UpdateOverlay = HelDdSurfUpdateOverlay; + This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.dwFlags = DDHAL_SURFCB32_ADDATTACHEDSURFACE | + DDHAL_SURFCB32_BLT | + DDHAL_SURFCB32_DESTROYSURFACE | + DDHAL_SURFCB32_FLIP | + DDHAL_SURFCB32_GETBLTSTATUS | + DDHAL_SURFCB32_GETFLIPSTATUS | + DDHAL_SURFCB32_LOCK | + DDHAL_SURFCB32_RESERVED4 | + DDHAL_SURFCB32_SETCLIPLIST | + DDHAL_SURFCB32_SETCOLORKEY | + DDHAL_SURFCB32_SETOVERLAYPOSITION | + DDHAL_SURFCB32_SETPALETTE | + DDHAL_SURFCB32_UNLOCK | + DDHAL_SURFCB32_UPDATEOVERLAY; This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDSurface); - - /* - This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette; - This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries; - This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette); - */ - - /* - This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer = HelDdExeCanCreateExecuteBuffer; - This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer = HelDdExeCreateExecuteBuffer; - This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer = HelDdExeDestroyExecuteBuffer; - This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer = HelDdExeLockExecuteBuffer; - This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer = HelDdExeUnlockExecuteBuffer; - */ - - return DD_OK; + + /* + This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette; + This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries; + This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette); + */ + + /* + This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer = HelDdExeCanCreateExecuteBuffer; + This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer = HelDdExeCreateExecuteBuffer; + This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer = HelDdExeDestroyExecuteBuffer; + This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer = HelDdExeLockExecuteBuffer; + This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer = HelDdExeUnlockExecuteBuffer; + */ + + return DD_OK; } HRESULT WINAPI Create_DirectDraw (LPGUID pGUID, - LPDIRECTDRAW* pIface, - REFIID id, - BOOL ex) + LPDIRECTDRAW* pIface, + REFIID id, + BOOL ex) { - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)*pIface; + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)*pIface; - DX_WINDBG_trace(); - - if (!IsEqualGUID(&IID_IDirectDraw7, id)) - { - return DDERR_INVALIDDIRECTDRAWGUID; - } - - if (This == NULL) - { - /* We do not have any DirectDraw interface alloc */ - This = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); - if (This == NULL) - { - return DDERR_OUTOFMEMORY; - } - } - else - { - /* We got the DirectDraw interface alloc and we need create the link */ - - LPDDRAWI_DIRECTDRAW_INT newThis; - newThis = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); - if (newThis == NULL) - { - return DDERR_OUTOFMEMORY; - } + DX_WINDBG_trace(); + + if (!IsEqualGUID(&IID_IDirectDraw7, id)) + { + return DDERR_INVALIDDIRECTDRAWGUID; + } + + if (This == NULL) + { + /* We do not have any DirectDraw interface alloc */ + This = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); + if (This == NULL) + { + return DDERR_OUTOFMEMORY; + } + } + else + { + /* We got the DirectDraw interface alloc and we need create the link */ + + LPDDRAWI_DIRECTDRAW_INT newThis; + newThis = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); + if (newThis == NULL) + { + return DDERR_OUTOFMEMORY; + } - /* we need check the GUID lpGUID what type it is */ - if (pGUID != DDCREATE_HARDWAREONLY) - { - if (pGUID !=NULL) - { - This = newThis; - return DDERR_INVALIDDIRECTDRAWGUID; - } - } - - newThis->lpLink = This; - This = newThis; - } - - This->lpLcl = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); - - if (This->lpLcl == NULL) - { - /* FIXME cleanup */ - return DDERR_OUTOFMEMORY; - } - - /* - FIXME - read dwAppHackFlags flag from the system register instead for hard code it - */ - This->lpLcl->dwAppHackFlags = 0; - This->lpLcl->dwHotTracking = 0; - This->lpLcl->dwIMEState = 0; - This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7; - This->lpLcl->dwLocalRefCnt = 0; - /* + /* we need check the GUID lpGUID what type it is */ + if (pGUID != DDCREATE_HARDWAREONLY) + { + if (pGUID !=NULL) + { + This = newThis; + return DDERR_INVALIDDIRECTDRAWGUID; + } + } + + newThis->lpLink = This; + This = newThis; + } + + This->lpLcl = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); + + if (This->lpLcl == NULL) + { + /* FIXME cleanup */ + return DDERR_OUTOFMEMORY; + } + + /* + FIXME + read dwAppHackFlags flag from the system register instead for hard code it + */ + This->lpLcl->dwAppHackFlags = 0; + This->lpLcl->dwHotTracking = 0; + This->lpLcl->dwIMEState = 0; + This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7; + This->lpLcl->dwLocalRefCnt = 0; + /* do not rest this flag to NULL it need be unistae for some reason other wise somet thing will crash dwObsolete1 seam being use for something this was a supriese for me */ //This->lpLcl->dwObsolete1 = 0; - This->lpLcl->dwProcessId = 0; - This->lpLcl->dwUnused0 = 0; - This->lpLcl->hD3DInstance = NULL; - This->lpLcl->hDC = 0; - This->lpLcl->hDDVxd = 0; - This->lpLcl->hFocusWnd = 0; - This->lpLcl->hGammaCalibrator = 0; - /* Do mot inistate this value if we do we can not open the HAL interface */ - //This->lpLcl->hWnd = 0; - This->lpLcl->hWndPopup = 0; - This->lpLcl->lpCB = NULL; - This->lpLcl->lpDDCB = NULL; - This->lpLcl->lpDDMore = 0; - This->lpLcl->lpGammaCalibrator = 0; - This->lpLcl->lpGbl = &ddgbl; - - /* Do mot inistate this value if we do we can not open the HAL interface */ - //This->lpLcl->lpPrimary = NULL; - This->lpLcl->pD3DIUnknown = NULL; - This->lpLcl->pUnkOuter = NULL; - - *pIface = (LPDIRECTDRAW)This; - - if(Main_DirectDraw_QueryInterface((LPDIRECTDRAW7)This, id, (void**)&pIface) != S_OK) - { - return DDERR_INVALIDPARAMS; - } - - if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID, FALSE) == DD_OK); + This->lpLcl->dwProcessId = 0; + This->lpLcl->dwUnused0 = 0; + This->lpLcl->hD3DInstance = NULL; + This->lpLcl->hDC = 0; + This->lpLcl->hDDVxd = 0; + This->lpLcl->hFocusWnd = 0; + This->lpLcl->hGammaCalibrator = 0; + /* Do mot inistate this value if we do we can not open the HAL interface */ + //This->lpLcl->hWnd = 0; + This->lpLcl->hWndPopup = 0; + This->lpLcl->lpCB = NULL; + This->lpLcl->lpDDCB = NULL; + This->lpLcl->lpDDMore = 0; + This->lpLcl->lpGammaCalibrator = 0; + This->lpLcl->lpGbl = &ddgbl; + + /* Do mot inistate this value if we do we can not open the HAL interface */ + //This->lpLcl->lpPrimary = NULL; + This->lpLcl->pD3DIUnknown = NULL; + This->lpLcl->pUnkOuter = NULL; + + *pIface = (LPDIRECTDRAW)This; + + if(Main_DirectDraw_QueryInterface((LPDIRECTDRAW7)This, id, (void**)&pIface) != S_OK) + { + return DDERR_INVALIDPARAMS; + } + + if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID, FALSE) == DD_OK); { - return DD_OK; - } - - return DDERR_INVALIDPARAMS; + return DD_OK; + } + return DDERR_INVALIDPARAMS; } @@ -1054,27 +991,27 @@ HRESULT WINAPI ReCreateDirectDraw(LPDIRECTDRAW* iface) { - LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; - - DdDeleteDirectDrawObject(This->lpLcl->lpGbl); - - if ((This->lpLcl->lpGbl->dwFlags & DDRAWI_NOHARDWARE) != DDRAWI_NOHARDWARE) - { + LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; + + DdDeleteDirectDrawObject(This->lpLcl->lpGbl); + + if ((This->lpLcl->lpGbl->dwFlags & DDRAWI_NOHARDWARE) != DDRAWI_NOHARDWARE) + { if (This->lpLcl->lpGbl->dwFlags & DDRAWI_EMULATIONINITIALIZED) - { - return StartDirectDraw(iface,NULL, TRUE); - } - else - { - return StartDirectDraw(iface,(LPGUID)DDCREATE_HARDWAREONLY, TRUE); - } - } - else - { - return StartDirectDraw(iface,(LPGUID)DDCREATE_EMULATIONONLY, TRUE); - } - - return DD_FALSE; + { + return StartDirectDraw(iface,NULL, TRUE); + } + else + { + return StartDirectDraw(iface,(LPGUID)DDCREATE_HARDWAREONLY, TRUE); + } + } + else + { + return StartDirectDraw(iface,(LPGUID)DDCREATE_EMULATIONONLY, TRUE); + } + + return DD_FALSE; }
18 years
1
0
0
0
[fireball] 25146: - Improve a debug print to provide more info.
by fireball@svn.reactos.org
Author: fireball Date: Wed Dec 13 19:04:17 2006 New Revision: 25146 URL:
http://svn.reactos.org/svn/reactos?rev=25146&view=rev
Log: - Improve a debug print to provide more info. Modified: trunk/reactos/dll/ntdll/ldr/utils.c Modified: trunk/reactos/dll/ntdll/ldr/utils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/utils.c (original) +++ trunk/reactos/dll/ntdll/ldr/utils.c Wed Dec 13 19:04:17 2006 @@ -1099,7 +1099,8 @@ &ExportDirSize); if (ExportDir == NULL) { - DPRINT1("LdrGetExportByName(): no export directory!\n"); + DPRINT1("LdrGetExportByName(): no export directory, " + "can't lookup %s/%hu!\n", SymbolName, Hint); return NULL; }
18 years
1
0
0
0
[hpoussin] 25145: Try to read shell name from HKCU registry key. If HKCU registry key or file not found, fall back to HKLM registry key If HKLM registry key or file not found, fall back to names "explorer.exe" and "cmd.exe"
by hpoussin@svn.reactos.org
Author: hpoussin Date: Wed Dec 13 17:58:10 2006 New Revision: 25145 URL:
http://svn.reactos.org/svn/reactos?rev=25145&view=rev
Log: Try to read shell name from HKCU registry key. If HKCU registry key or file not found, fall back to HKLM registry key If HKLM registry key or file not found, fall back to names "explorer.exe" and "cmd.exe" Modified: trunk/reactos/base/system/userinit/userinit.c Modified: trunk/reactos/base/system/userinit/userinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/userinit/useri…
============================================================================== --- trunk/reactos/base/system/userinit/userinit.c (original) +++ trunk/reactos/base/system/userinit/userinit.c Wed Dec 13 17:58:10 2006 @@ -25,6 +25,7 @@ */ #include <windows.h> #include <cfgmgr32.h> +#include <regstr.h> #include <shlobj.h> #include "resource.h" @@ -77,7 +78,7 @@ rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE, - L"SYSTEM\\CurrentControlSet\\Control", + REGSTR_PATH_CURRENT_CONTROL_SET, 0, KEY_QUERY_VALUE, &ControlKey); @@ -109,7 +110,7 @@ } static -BOOL GetShell(WCHAR *CommandLine) +BOOL GetShell(WCHAR *CommandLine, HKEY hRootKey) { HKEY hKey; DWORD Type, Size; @@ -117,8 +118,8 @@ BOOL Ret = FALSE; BOOL ConsoleShell = IsConsoleShell(); - if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, - L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", + if(RegOpenKeyEx(hRootKey, + L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon", /* FIXME: should be REGSTR_PATH_WINLOGON */ 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { Size = MAX_PATH * sizeof(WCHAR); @@ -136,24 +137,6 @@ } } RegCloseKey(hKey); - } - - if(!Ret) - { - if (ConsoleShell) - { - if(GetSystemDirectory(CommandLine, MAX_PATH - 8)) - wcscat(CommandLine, L"\\cmd.exe"); - else - wcscpy(CommandLine, L"cmd.exe"); - } - else - { - if(GetWindowsDirectory(CommandLine, MAX_PATH - 13)) - wcscat(CommandLine, L"\\explorer.exe"); - else - wcscpy(CommandLine, L"explorer.exe"); - } } return Ret; @@ -200,17 +183,12 @@ } - -static -void StartShell(void) +static BOOL +TryToStartShell(LPCWSTR Shell) { STARTUPINFO si; PROCESS_INFORMATION pi; - WCHAR Shell[MAX_PATH]; WCHAR ExpandedShell[MAX_PATH]; - TCHAR szMsg[RC_STRING_MAX_SIZE]; - - GetShell(Shell); ZeroMemory(&si, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO); @@ -218,7 +196,7 @@ ExpandEnvironmentStrings(Shell, ExpandedShell, MAX_PATH); - if(CreateProcess(NULL, + if(!CreateProcess(NULL, ExpandedShell, NULL, NULL, @@ -228,14 +206,46 @@ NULL, &si, &pi)) - { - StartAutoApplications(CSIDL_STARTUP); - StartAutoApplications(CSIDL_COMMON_STARTUP); - WaitForSingleObject(pi.hProcess, INFINITE); - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - } - else + return FALSE; + + StartAutoApplications(CSIDL_STARTUP); + StartAutoApplications(CSIDL_COMMON_STARTUP); + WaitForSingleObject(pi.hProcess, INFINITE); + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return TRUE; +} + +static +void StartShell(void) +{ + WCHAR Shell[MAX_PATH]; + TCHAR szMsg[RC_STRING_MAX_SIZE]; + + /* Try to run shell in user key */ + if (GetShell(Shell, HKEY_CURRENT_USER) && TryToStartShell(Shell)) + return; + + /* Try to run shell in local machine key */ + if (GetShell(Shell, HKEY_LOCAL_MACHINE) && TryToStartShell(Shell)) + return; + + /* Try default shell */ + if (IsConsoleShell()) + { + if(GetSystemDirectory(Shell, MAX_PATH - 8)) + wcscat(Shell, L"\\cmd.exe"); + else + wcscpy(Shell, L"cmd.exe"); + } + else + { + if(GetWindowsDirectory(Shell, MAX_PATH - 13)) + wcscat(Shell, L"\\explorer.exe"); + else + wcscpy(Shell, L"explorer.exe"); + } + if (!TryToStartShell(Shell)) { LoadString( GetModuleHandle(NULL), STRING_USERINIT_FAIL, szMsg, sizeof(szMsg) / sizeof(szMsg[0])); MessageBox(0, szMsg, NULL, 0); @@ -250,7 +260,7 @@ WCHAR szWallpaper[MAX_PATH + 1]; if(RegOpenKeyEx(HKEY_CURRENT_USER, - L"Control Panel\\Desktop", + REGSTR_PATH_DESKTOP, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { Size = sizeof(szWallpaper);
18 years
1
0
0
0
[janderwald] 25144: - msvc compability fixes - fix build breakage introduced by me
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Dec 13 17:45:23 2006 New Revision: 25144 URL:
http://svn.reactos.org/svn/reactos?rev=25144&view=rev
Log: - msvc compability fixes - fix build breakage introduced by me Modified: trunk/reactos/dll/win32/kernel32/file/rw.c trunk/reactos/dll/win32/kernel32/misc/actctx.c Modified: trunk/reactos/dll/win32/kernel32/file/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/rw…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/rw.c (original) +++ trunk/reactos/dll/win32/kernel32/file/rw.c Wed Dec 13 17:45:23 2006 @@ -149,7 +149,7 @@ lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, - lpOverlapped); + NULL); } if (lpOverlapped != NULL) Modified: trunk/reactos/dll/win32/kernel32/misc/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ac…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/actctx.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/actctx.c Wed Dec 13 17:45:23 2006 @@ -185,7 +185,7 @@ PACTCTX_SECTION_KEYED_DATA ReturnedData ) { - DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__) + DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__); return FALSE; } @@ -202,7 +202,7 @@ PACTCTX_SECTION_KEYED_DATA ReturnedData ) { - DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__) + DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__); return FALSE; } @@ -234,7 +234,7 @@ SIZE_T *pcbWrittenOrRequired OPTIONAL ) { - DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__) + DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__); /* this makes Adobe Photoshop 7.0 happy */ SetLastError( ERROR_CALL_NOT_IMPLEMENTED); return FALSE;
18 years
1
0
0
0
[greatlrd] 25143: fixed setcorative level set now the DDRAWILCL_ISFULLSCREEN flags, remove some code from blt for it does not work in fullscreen. our bltblt working now in fullscreen and windows mode.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Dec 13 12:36:39 2006 New Revision: 25143 URL:
http://svn.reactos.org/svn/reactos?rev=25143&view=rev
Log: fixed setcorative level set now the DDRAWILCL_ISFULLSCREEN flags, remove some code from blt for it does not work in fullscreen. our bltblt working now in fullscreen and windows mode. Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c trunk/reactos/dll/directx/ddraw/main/surface_main.c Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddr…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Wed Dec 13 12:36:39 2006 @@ -822,6 +822,11 @@ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface; DX_WINDBG_trace(); + + if (cooplevel & DDSCL_FULLSCREEN) + { + This->lpLcl->dwLocalFlags |= DDRAWILCL_ISFULLSCREEN; + } /* This code should be a callback */ This->lpLcl->hWnd = hwnd; Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/sur…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Wed Dec 13 12:36:39 2006 @@ -112,25 +112,11 @@ } else { - if ( ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->dwLocalFlags & - DDRAWILCL_ISFULLSCREEN) - { - mDdBlt.rSrc.top = 0; - mDdBlt.rSrc.left = 0; - mDdBlt.rSrc.right = ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->lpGbl-> - vmiData.dwDisplayWidth; - - mDdBlt.rSrc.bottom = ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->lpGbl-> - vmiData.lDisplayPitch; - } - else - { - if(!GetWindowRect((HWND)ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->hWnd, + if(!GetWindowRect((HWND)ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->hWnd, (RECT *)&mDdBlt.rSrc)) - { - DX_STUB_str("GetWindowRect failed"); - } - } + { + DX_STUB_str("GetWindowRect failed"); + } } /* FIXME @@ -149,26 +135,12 @@ } else { - if ( ThisDest->lpLcl->lpSurfMore->lpDD_lcl->dwLocalFlags & - DDRAWILCL_ISFULLSCREEN) - { - mDdBlt.rDest.top = 0; - mDdBlt.rDest.left = 0; - mDdBlt.rDest.right = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl-> - vmiData.dwDisplayWidth; - - mDdBlt.rDest.bottom = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl-> - vmiData.lDisplayPitch; - } - else - { - - if(!GetWindowRect((HWND)ThisDest->lpLcl->lpSurfMore->lpDD_lcl->hWnd, + if(!GetWindowRect((HWND)ThisDest->lpLcl->lpSurfMore->lpDD_lcl->hWnd, (RECT *)&mDdBlt.rDest)) - { - DX_STUB_str("GetWindowRect failed"); - } - } + { + DX_STUB_str("GetWindowRect failed"); + } + } /* FIXME
18 years
1
0
0
0
[greatlrd] 25142: small cleanup for unlock
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Dec 13 11:31:02 2006 New Revision: 25142 URL:
http://svn.reactos.org/svn/reactos?rev=25142&view=rev
Log: small cleanup for unlock Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/sur…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Wed Dec 13 11:31:02 2006 @@ -290,7 +290,7 @@ HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7 iface, LPRECT pRect) { LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface; - DDHAL_UNLOCKDATA unLock; + DDHAL_UNLOCKDATA mdUnLock; DX_WINDBG_trace(); @@ -300,32 +300,24 @@ return DDERR_UNSUPPORTED; } - unLock.ddRVal = DDERR_NOTPALETTIZED; - unLock.lpDD = This->lpLcl->lpSurfMore->lpDD_lcl->lpGbl; - unLock.lpDDSurface = This->lpLcl->lpSurfMore->slist[0]; - unLock.Unlock = This->lpLcl->lpSurfMore->lpDD_lcl->lpDDCB->cbDDSurfaceCallbacks.Unlock; - - - - if (!DdResetVisrgn( unLock.lpDDSurface, NULL)) + mdUnLock.ddRVal = DDERR_NOTPALETTIZED; + mdUnLock.lpDD = This->lpLcl->lpSurfMore->lpDD_lcl->lpGbl; + mdUnLock.lpDDSurface = This->lpLcl->lpSurfMore->slist[0]; + mdUnLock.Unlock = This->lpLcl->lpSurfMore->lpDD_lcl->lpDDCB->cbDDSurfaceCallbacks.Unlock; + + if (!DdResetVisrgn( mdUnLock.lpDDSurface, NULL)) { DX_STUB_str("DDERR_UNSUPPORTED"); return DDERR_UNSUPPORTED; } - if (unLock.Unlock(&unLock)!= DDHAL_DRIVER_HANDLED) + if (mdUnLock.Unlock(&mdUnLock)!= DDHAL_DRIVER_HANDLED) { DX_STUB_str("unLock fail"); return DDERR_UNSUPPORTED; } - if (unLock.ddRVal!= DD_OK) - { - DX_STUB_str("ddRVal errror"); - return unLock.ddRVal; - } - - return DD_OK; + return mdUnLock.ddRVal; } HRESULT WINAPI
18 years
1
0
0
0
[greatlrd] 25141: Fixed, yeah our second test apps works ms dx sdk font.exe works equal good as it use to now. We are getting Ddlock and Ddunlock working again.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Dec 13 10:54:45 2006 New Revision: 25141 URL:
http://svn.reactos.org/svn/reactos?rev=25141&view=rev
Log: Fixed, yeah our second test apps works ms dx sdk font.exe works equal good as it use to now. We are getting Ddlock and Ddunlock working again. Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/sur…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original) +++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Wed Dec 13 10:54:45 2006 @@ -228,9 +228,11 @@ } else { - mdLock.bHasRect = FALSE; - } - + mdLock.bHasRect = FALSE; + } + + This->lpLcl->lpSurfMore->slist[0]->hDC = This->lpLcl->lpSurfMore->lpDD_lcl->hDC; + mdLock.ddRVal = DDERR_NOTPALETTIZED; mdLock.Lock = This->lpLcl->lpSurfMore->lpDD_lcl->lpDDCB->cbDDSurfaceCallbacks.Lock; mdLock.dwFlags = flags; @@ -248,13 +250,7 @@ { DX_STUB_str("Here DDHAL_DRIVER_HANDLED lock"); return DDERR_UNSUPPORTED; - } - - if (mdLock.ddRVal!= DD_OK) - { - DX_STUB_str("Here ddRVal lock"); - return mdLock.ddRVal; - } + } // FIXME ??? is this right ?? if (pDDSD != NULL) @@ -277,9 +273,17 @@ //} pDDSD->lpSurface = (LPVOID) mdLock.lpSurfData; + + pDDSD->dwHeight =This->lpLcl->lpGbl->wHeight; + pDDSD->dwWidth = This->lpLcl->lpGbl->wWidth; + pDDSD->ddpfPixelFormat.dwRGBBitCount = This->lpLcl->lpSurfMore->lpDD_lcl->lpGbl-> + lpModeInfo->dwBPP; + pDDSD->lPitch = This->lpLcl->lpGbl->lPitch; + pDDSD->dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH; + } - return DD_OK; + return mdLock.ddRVal; }
18 years
1
0
0
0
[peterw] 25140: - Compilation fix.
by peterw@svn.reactos.org
Author: peterw Date: Wed Dec 13 08:37:55 2006 New Revision: 25140 URL:
http://svn.reactos.org/svn/reactos?rev=25140&view=rev
Log: - Compilation fix. Modified: trunk/reactos/include/psdk/winbase.h Modified: trunk/reactos/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winbase.h (original) +++ trunk/reactos/include/psdk/winbase.h Wed Dec 13 08:37:55 2006 @@ -2079,7 +2079,7 @@ typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO; typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*LPWIN32_FIND_DATA; #if (_WIN32_WINNT >= 0x0501) -typedef WIN32_FIND_STREAM_DATAW WIN32_FIND_STREAM_DATA,*LPWIN32_FIND_STREAM_DATA; +typedef WIN32_FIND_STREAM_DATA WIN32_FIND_STREAM_DATA,*LPWIN32_FIND_STREAM_DATA; #endif typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO; typedef ENUMRESLANGPROCW ENUMRESLANGPROC;
18 years
1
0
0
0
[janderwald] 25139: Part 2/2 of WDK compability fixes - reflect previous header changes - fix prototype for GetConsoleAliasA/W CreateSymbolicLinkA/W
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Dec 13 02:57:24 2006 New Revision: 25139 URL:
http://svn.reactos.org/svn/reactos?rev=25139&view=rev
Log: Part 2/2 of WDK compability fixes - reflect previous header changes - fix prototype for GetConsoleAliasA/W CreateSymbolicLinkA/W Modified: trunk/reactos/dll/win32/kernel32/file/create.c trunk/reactos/dll/win32/kernel32/file/find.c trunk/reactos/dll/win32/kernel32/kernel32.def trunk/reactos/dll/win32/kernel32/misc/console.c trunk/reactos/dll/win32/kernel32/misc/recovery.c trunk/reactos/dll/win32/kernel32/misc/stubs.c trunk/reactos/dll/win32/kernel32/misc/time.c Modified: trunk/reactos/dll/win32/kernel32/file/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/cr…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/create.c (original) +++ trunk/reactos/dll/win32/kernel32/file/create.c Wed Dec 13 02:57:24 2006 @@ -370,7 +370,8 @@ /* * @implemented */ -BOOL STDCALL +BOOLEAN +STDCALL CreateSymbolicLinkW(IN LPCWSTR lpSymlinkFileName, IN LPCWSTR lpTargetFileName, IN DWORD dwFlags) @@ -572,7 +573,8 @@ /* * @implemented */ -BOOL STDCALL +BOOLEAN +STDCALL CreateSymbolicLinkA(IN LPCSTR lpSymlinkFileName, IN LPCSTR lpTargetFileName, IN DWORD dwFlags) Modified: trunk/reactos/dll/win32/kernel32/file/find.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/find.c (original) +++ trunk/reactos/dll/win32/kernel32/file/find.c Wed Dec 13 02:57:24 2006 @@ -705,7 +705,7 @@ case FindStreamInfoStandard: { ULONG StreamNameLen; - WIN32_FIND_STREAM_DATAW *StreamData = (WIN32_FIND_STREAM_DATAW*)lpFindStreamData; + WIN32_FIND_STREAM_DATA *StreamData = (WIN32_FIND_STREAM_DATA*)lpFindStreamData; StreamNameLen = IData->pCurrent->StreamNameLength; if (StreamNameLen > sizeof(StreamData->cStreamName) - sizeof(WCHAR)) Modified: trunk/reactos/dll/win32/kernel32/kernel32.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.def (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.def Wed Dec 13 02:57:24 2006 @@ -294,7 +294,7 @@ FreeVirtualBuffer@4 GenerateConsoleCtrlEvent@8 GetACP@0 -GetApplicationRecoveryCallback@12 +GetApplicationRecoveryCallback@20 GetApplicationRestart@16 GetAtomNameA@12 GetAtomNameW@12 @@ -741,7 +741,7 @@ ReadProcessMemory@20 RecoveryFinished@4 RecoveryInProgress@4 -RegisterApplicationRecoveryCallback@8 +RegisterApplicationRecoveryCallback@16 RegisterApplicationRestart@8 ;RegisterConsoleIME ;RegisterConsoleOS2 Modified: trunk/reactos/dll/win32/kernel32/misc/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/console.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/console.c Wed Dec 13 02:57:24 2006 @@ -357,14 +357,14 @@ * @unimplemented */ DWORD STDCALL -GetConsoleAliasesW (DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2) +GetConsoleAliasesW (LPWSTR AliasBuffer, + DWORD AliasBufferLength, + LPWSTR ExeName) /* * Undocumented */ { - DPRINT1("GetConsoleAliasesW(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1, Unknown2); + DPRINT1("GetConsoleAliasesW(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", AliasBuffer, AliasBufferLength, ExeName); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } @@ -374,14 +374,14 @@ * @unimplemented */ DWORD STDCALL -GetConsoleAliasesA (DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2) +GetConsoleAliasesA (LPSTR AliasBuffer, + DWORD AliasBufferLength, + LPSTR ExeName) /* * Undocumented */ { - DPRINT1("GetConsoleAliasesA(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1, Unknown2); + DPRINT1("GetConsoleAliasesA(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", AliasBuffer, AliasBufferLength, ExeName); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } @@ -726,7 +726,7 @@ BOOL STDCALL SetConsoleDisplayMode (HANDLE hOut, DWORD dwNewMode, - LPDWORD lpdwOldMode) + PCOORD lpdwOldMode) /* * FUNCTION: Set the console display mode. * ARGUMENTS: @@ -735,7 +735,7 @@ * lpdwOldMode - Address of a variable that receives the old mode. */ { - DPRINT1("SetConsoleDisplayMode(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", hOut, dwNewMode, lpdwOldMode); + DPRINT1("SetConsoleDisplayMode(0x%x, 0x%x, 0x%p) UNIMPLEMENTED!\n", hOut, dwNewMode, lpdwOldMode); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } @@ -1209,7 +1209,7 @@ PVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, - LPVOID lpReserved, + PCONSOLE_READCONSOLE_CONTROL lpReserved, BOOL bUnicode) { PCSR_API_MESSAGE Request; @@ -1300,13 +1300,13 @@ LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, - LPVOID lpReserved) + PCONSOLE_READCONSOLE_CONTROL pInputControl) { return IntReadConsole(hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, - lpReserved, + pInputControl, FALSE); } @@ -1321,13 +1321,13 @@ LPVOID lpBuffer, DWORD nNumberOfCharsToRead, LPDWORD lpNumberOfCharsRead, - LPVOID lpReserved) + PCONSOLE_READCONSOLE_CONTROL pInputControl) { return IntReadConsole(hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, - lpReserved, + pInputControl, TRUE); } Modified: trunk/reactos/dll/win32/kernel32/misc/recovery.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/re…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/recovery.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/recovery.c Wed Dec 13 02:57:24 2006 @@ -28,7 +28,9 @@ WINAPI GetApplicationRecoveryCallback(IN HANDLE hProcess, OUT APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback, - OUT PVOID* ppvParameter) + OUT PVOID* ppvParameter, + PDWORD dwPingInterval, + PDWORD dwFlags) { UNIMPLEMENTED; return E_FAIL; @@ -79,7 +81,9 @@ HRESULT WINAPI RegisterApplicationRecoveryCallback(IN APPLICATION_RECOVERY_CALLBACK pRecoveyCallback, - IN PVOID pvParameter OPTIONAL) + IN PVOID pvParameter OPTIONAL, + DWORD dwPingInterval, + DWORD dwFlags) { UNIMPLEMENTED; return E_FAIL; Modified: trunk/reactos/dll/win32/kernel32/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/st…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/stubs.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/stubs.c Wed Dec 13 02:57:24 2006 @@ -770,8 +770,8 @@ BOOL STDCALL TzSpecificLocalTimeToSystemTime( - LPTIME_ZONE_INFORMATION lpTimeZoneInformation, - LPSYSTEMTIME lpLocalTime, + CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, + CONST SYSTEMTIME *lpLocalTime, LPSYSTEMTIME lpUniversalTime ) { @@ -857,7 +857,7 @@ HANDLE STDCALL FindFirstVolumeW( - LPCWSTR lpszVolumeName, + LPWSTR lpszVolumeName, DWORD cchBufferLength ) { @@ -871,7 +871,7 @@ HANDLE STDCALL FindFirstVolumeMountPointW( - LPWSTR lpszRootPathName, + LPCWSTR lpszRootPathName, LPWSTR lpszVolumeMountPoint, DWORD cchBufferLength ) @@ -1039,7 +1039,7 @@ HANDLE STDCALL FindFirstVolumeA( - LPCSTR lpszVolumeName, + LPSTR lpszVolumeName, DWORD cchBufferLength ) { @@ -1053,7 +1053,7 @@ HANDLE STDCALL FindFirstVolumeMountPointA( - LPSTR lpszRootPathName, + LPCSTR lpszRootPathName, LPSTR lpszVolumeMountPoint, DWORD cchBufferLength ) @@ -1069,7 +1069,7 @@ STDCALL FindNextVolumeA( HANDLE hFindVolume, - LPCSTR lpszVolumeName, + LPSTR lpszVolumeName, DWORD cchBufferLength ) { Modified: trunk/reactos/dll/win32/kernel32/misc/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ti…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/time.c (original) +++ trunk/reactos/dll/win32/kernel32/misc/time.c Wed Dec 13 02:57:24 2006 @@ -413,8 +413,8 @@ */ BOOL STDCALL SystemTimeToTzSpecificLocalTime( - LPTIME_ZONE_INFORMATION lpTimeZoneInformation, - LPSYSTEMTIME lpUniversalTime, + CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, + CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime ) { @@ -428,7 +428,7 @@ lpTzInfo = &TimeZoneInformation; } else - lpTzInfo = lpTimeZoneInformation; + lpTzInfo = (LPTIME_ZONE_INFORMATION)lpTimeZoneInformation; if (!lpUniversalTime) return FALSE;
18 years
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200