Author: greatlrd
Date: Thu Dec 27 21:51:27 2007
New Revision: 31465
URL:
http://svn.reactos.org/svn/reactos?rev=31465&view=rev
Log:
implement DxEngGetDeviceGammaRamp
implement DxEngSetDeviceGammaRamp
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
trunk/reactos/include/reactos/drivers/directx/dxeng.h
trunk/reactos/subsystems/win32/win32k/include/intddraw.h
trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c Thu Dec 27 21:51:27 2007
@@ -441,7 +441,7 @@
DX_WINDBG_trace();
- // EnterCriticalSection(&ddcs);
+ EnterCriticalSection(&ddcs);
*ppSurf = NULL;
_SEH_TRY
@@ -464,8 +464,8 @@
ret = DDERR_INVALIDPARAMS;
}
_SEH_END;
- // LeaveCriticalSection(&ddcs);
- return ret;
+ LeaveCriticalSection(&ddcs);
+ return ret;
}
@@ -476,7 +476,8 @@
{
HRESULT ret;
DX_WINDBG_trace();
- // EnterCriticalSection(&ddcs);
+
+ EnterCriticalSection(&ddcs);
*ppSurf = NULL;
_SEH_TRY
@@ -489,7 +490,7 @@
}
_SEH_END;
- // LeaveCriticalSection(&ddcs);
+ LeaveCriticalSection(&ddcs);
return ret;
}
Modified: trunk/reactos/include/reactos/drivers/directx/dxeng.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/di…
==============================================================================
--- trunk/reactos/include/reactos/drivers/directx/dxeng.h (original)
+++ trunk/reactos/include/reactos/drivers/directx/dxeng.h Thu Dec 27 21:51:27 2007
@@ -67,7 +67,7 @@
/* Notes : same protypes NtGdiEngGetDeviceGammaRamp, diffent is we skipp the user mode
checks and seh */
BOOL
-DxEngGetDeviceGammaRamp(HDC hDC, LPVOID lpRamp);
+DxEngGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp);
/* Notes : Lock the hDC */
PDC DxEngLockDC(HDC hDC);
@@ -75,7 +75,8 @@
/* Notes : Unlock the hDC */
BOOL DxEngUnlockDC(PDC pDC);
-
+/* Notes : Set Gamma ramp */
+BOOL DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse);
/* prototypes are not done yet, I need gather all my notes
* to make them correct
@@ -89,7 +90,6 @@
DWORD DxEngReferenceHdev(DWORD x1);
DWORD DxEngIsHdevLockedByCurrentThread(DWORD x1);
DWORD DxEngUnreferenceHdev(DWORD x1);
-DWORD DxEngSetDeviceGammaRamp(DWORD x1, DWORD x2, DWORD x3);
DWORD DxEngSpTearDownSprites(DWORD x1, DWORD x2, DWORD x3);
DWORD DxEngSpUnTearDownSprites(DWORD x1, DWORD x2, DWORD x3);
DWORD DxEngSpSpritesVisible(DWORD x1);
Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/intddraw.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/intddraw.h Thu Dec 27 21:51:27 2007
@@ -121,5 +121,8 @@
} \
}
+/* Gammaramp internal prototype */
+BOOL FASTCALL IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp);
+BOOL FASTCALL IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp);
#endif /* _INT_W32k_DDRAW */
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Thu Dec 27 21:51:27 2007
@@ -123,16 +123,29 @@
return FALSE;
}
-/************************************************************************/
-/* DxEngGetDeviceGammaRamp */
-/************************************************************************/
-/* same protypes NtGdiEngGetDeviceGammaRamp, diffent is we skipp the user mode checks and
seh */
+/*++
+* @name DxEngGetDeviceGammaRamp
+* @implemented
+*
+* The function DxEngSetDeviceGammaRamp Set Gamma ramp from from dxg.sys
+
+* @param HDEV hPDev
+* The hdev
+*
+* @param PGAMMARAMP Ramp
+* to fill in our gama ramp
+*
+* @return
+* This return FALSE or TRUE, FALSE for fail, TRUE for success
+*
+* @remarks.
+* ReactOS does not loop it, only set the gamma once.
+*
+*--*/
BOOL
-DxEngGetDeviceGammaRamp(HDC hDC, LPVOID lpRamp)
-{
- /* FIXME redirect it to NtGdiEngGetDeviceGammaRamp internal call */
- UNIMPLEMENTED;
- return FALSE;
+DxEngGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
+{
+ return IntGetDeviceGammaRamp(hPDev, Ramp);
}
@@ -140,12 +153,12 @@
* @name DxEngLockDC
* @implemented
*
-* The function DxEngLockDC lock a hdc from dxg.sys
+* The function DxEngLockDC lock a hdc from dxg.sys
*
* @param HDC hDC
* The handle we need want lock
*
-* @return
+* @return
* This api return PDC or NULL depns if it sussess lock the hdc or not
*
* @remarks.
@@ -163,13 +176,13 @@
* @name DxEngUnlockDC
* @implemented
*
-* The function DxEngUnlockDC Unlock a pDC (hdc) from dxg.sys
+* The function DxEngUnlockDC Unlock a pDC (hdc) from dxg.sys
* @param PDC pDC
* The handle we need unlock
*
-* @return
-* This api always return TRUE if it sussess or not
+* @return
+* This api always return TRUE if it sussess or not
*
* @remarks.
* none
@@ -265,13 +278,34 @@
return FALSE;
}
-/************************************************************************/
-/* DxEngSetDeviceGammaRamp */
-/************************************************************************/
-DWORD DxEngSetDeviceGammaRamp(DWORD x1, DWORD x2, DWORD x3)
-{
- UNIMPLEMENTED;
- return FALSE;
+
+/*++
+* @name DxEngSetDeviceGammaRamp
+* @implemented
+*
+* The function DxEngSetDeviceGammaRamp Set Gamma ramp from from dxg.sys
+
+* @param HDEV hPDev
+* The hdev
+*
+* @param PGAMMARAMP Ramp
+* to set in our gama ramp
+*
+* @param BOOL Unuse
+* Info on this are avail at request. at moment ReactOS does not
+* does not use it. and problare never need it.
+*
+* @return
+* This return FALSE or TRUE, FALSE for fail, TRUE for success
+*
+* @remarks.
+* ReactOS does not loop it, only set the gamma once.
+*
+*--*/
+BOOL
+DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Unuse)
+{
+ return IntSetDeviceGammaRamp(hPDev, Ramp);
}
/************************************************************************/