Author: greatlrd Date: Wed Jan 7 08:22:38 2009 New Revision: 38630
URL: http://svn.reactos.org/svn/reactos?rev=38630&view=rev Log: Implement DCIEndAccess not tested in all case yet
Modified: branches/reactx/reactos/dll/win32/dciman32/dciman32.def branches/reactx/reactos/dll/win32/dciman32/dciman_main.c
Modified: branches/reactx/reactos/dll/win32/dciman32/dciman32.def URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/win32/dciman3... ============================================================================== --- branches/reactx/reactos/dll/win32/dciman32/dciman32.def [iso-8859-1] (original) +++ branches/reactx/reactos/dll/win32/dciman32/dciman32.def [iso-8859-1] Wed Jan 7 08:22:38 2009 @@ -7,7 +7,7 @@ DCICreatePrimary@8 DCIDestroy@4 DCIDraw@4 -; DCIEndAccess + DCIEndAccess@4 DCIEnum@20 DCIOpenProvider@0 DCISetClipList@8
Modified: branches/reactx/reactos/dll/win32/dciman32/dciman_main.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/win32/dciman3... ============================================================================== --- branches/reactx/reactos/dll/win32/dciman32/dciman_main.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/win32/dciman32/dciman_main.c [iso-8859-1] Wed Jan 7 08:22:38 2009 @@ -613,7 +613,7 @@
/* Note DCIBeginAccess never return DCI_OK MSDN say it does, but it dose not return it */
-int +DCIRVAL WINAPI DCIBeginAccess(LPDCISURFACEINFO pdci, int x, int y, int dx, int dy) { @@ -628,8 +628,6 @@ DDHAL_CREATESURFACEDATA DdCreateSurfaceData; DDHAL_DESTROYSURFACEDATA DdDestorySurfaceData; - - pDciSurface_int = (LPDCISURFACE_INT) (((DWORD) pdci) - sizeof(DCISURFACE_LCL)) ;
/* Check see if we have lost surface or not */ @@ -656,9 +654,7 @@ ReStart:
DdLockData.ddRVal = DDERR_GENERIC; - - - + EnterCriticalSection(&gcsWinWatchLock); /* Try lock our surface here @@ -788,6 +784,7 @@ } } } + /* Get HalInfo from DirectX hardware accalation fail or something else so we lost the surface */ pDciSurface_int->DciSurface_lcl.LostSurface = TRUE; @@ -824,6 +821,31 @@ return retValue; }
+void +WINAPI +DCIEndAccess(LPDCISURFACEINFO pdci) +{ + DDHAL_UNLOCKDATA DdUnlockData; + LPDCISURFACE_INT pDciSurface_int; + + pDciSurface_int = (LPDCISURFACE_INT) (((DWORD) pdci) - sizeof(DCISURFACE_LCL)) ; + + if ( pDciSurface_int->DciSurface_lcl.LostSurface == 0 ) + { + DdUnlockData.lpDD = &pDciSurface_int->DciSurface_lcl.DirectDrawGlobal; + DdUnlockData.lpDDSurface = &pDciSurface_int->DciSurface_lcl.SurfaceLocal; + + EnterCriticalSection(&gcsWinWatchLock); + + pDciSurface_int->DciSurface_lcl.DDSurfaceCallbacks.Unlock(&DdUnlockData); + + LeaveCriticalSection(&gcsWinWatchLock); + } + + pDciSurface_int->DciSurfaceInfo.wSelSurface = 0; + pDciSurface_int->DciSurfaceInfo.dwOffSurface = 0; +} +
/***********************************************************************************************************/ /***********************************************************************************************************/