Author: gbrunmar
Date: Tue May 6 11:15:33 2008
New Revision: 33326
URL: http://svn.reactos.org/svn/reactos?rev=33326&view=rev
Log:
Implemented IDirect3DDevice9::GetDisplayMode()
Modified:
trunk/reactos/dll/directx/d3d9/d3d9_device.c
Modified: trunk/reactos/dll/directx/d3d9/d3d9_device.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_devi…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] Tue May 6 11:15:33 2008
@@ -192,10 +192,53 @@
return D3D_OK;
}
+/*++
+* @name IDirect3DDevice9::GetDisplayMode
+* @implemented
+*
+* The function IDirect3DDevice9Impl_GetDisplayMode fills the pMode argument with the
+* display mode for the specified swap chain.
+*
+* @param LPDIRECT3D iface
+* Pointer to the IDirect3D9 object returned from Direct3DCreate9()
+*
+* @param UINT iSwapChain
+* Swap chain index to get object for.
+* The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
+*
+* @param D3DDISPLAYMODE* pMode
+* Pointer to a D3DDISPLAYMODE structure to be filled with the current swap chain's display mode information.
+*
+* @return HRESULT
+* If the method successfully fills the pMode structure, the return value is D3D_OK.
+* If iSwapChain is out of range or pMode is a bad pointer, the return value will be D3DERR_INVALIDCALL.
+*
+*/
static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DDISPLAYMODE* pMode)
{
- UNIMPLEMENTED
-
+ LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface);
+ LOCK_D3DDEVICE9();
+
+ if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface))
+ {
+ DPRINT1("Invalid iSwapChain parameter specified");
+ UNLOCK_D3DDEVICE9();
+ return D3DERR_INVALIDCALL;
+ }
+
+ if (IsBadWritePtr(pMode, sizeof(D3DDISPLAYMODE*)))
+ {
+ DPRINT1("Invalid pMode parameter specified");
+ UNLOCK_D3DDEVICE9();
+ return D3DERR_INVALIDCALL;
+ }
+
+ pMode->Width = This->DeviceData[iSwapChain].DriverCaps.dwDisplayWidth;
+ pMode->Height = This->DeviceData[iSwapChain].DriverCaps.dwDisplayHeight;
+ pMode->Format = This->DeviceData[iSwapChain].DriverCaps.RawDisplayFormat;
+ pMode->RefreshRate = This->DeviceData[iSwapChain].DriverCaps.dwRefreshRate;
+
+ UNLOCK_D3DDEVICE9();
return D3D_OK;
}
Author: tkreuzer
Date: Tue May 6 19:57:10 2008
New Revision: 33338
URL: http://svn.reactos.org/svn/reactos?rev=33338&view=rev
Log:
ntifs.h: fix prototypes of PsChargePoolQuota, PsChargeProcessPoolQuota, PsReturnPoolQuota, ZwAllocateVirtualMemory and ZwFreeVirtualMemory
Modified:
trunk/reactos/include/ddk/ntifs.h
Modified: trunk/reactos/include/ddk/ntifs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=33…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Tue May 6 19:57:10 2008
@@ -3738,7 +3738,7 @@
PsChargePoolQuota (
IN PEPROCESS Process,
IN POOL_TYPE PoolType,
- IN ULONG Amount
+ IN SIZE_T Amount
);
NTKERNELAPI
@@ -3747,7 +3747,7 @@
PsChargeProcessPoolQuota (
IN PEPROCESS Process,
IN POOL_TYPE PoolType,
- IN ULONG_PTR Amount
+ IN SIZE_T Amount
);
#define PsDereferenceImpersonationToken(T) \
@@ -3856,7 +3856,7 @@
PsReturnPoolQuota (
IN PEPROCESS Process,
IN POOL_TYPE PoolType,
- IN ULONG Amount
+ IN SIZE_T Amount
);
NTKERNELAPI
@@ -4664,7 +4664,7 @@
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
IN ULONG ZeroBits,
- IN OUT PULONG RegionSize,
+ IN OUT PSIZE_T RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
);
@@ -4912,7 +4912,7 @@
ZwFreeVirtualMemory (
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
- IN OUT PULONG RegionSize,
+ IN OUT PSIZE_T RegionSize,
IN ULONG FreeType
);
Author: tkreuzer
Date: Tue May 6 16:37:10 2008
New Revision: 33336
URL: http://svn.reactos.org/svn/reactos?rev=33336&view=rev
Log:
fix MmMapViewOfSection prototype
Modified:
trunk/reactos/include/ndk/mmfuncs.h
Modified: trunk/reactos/include/ndk/mmfuncs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/mmfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/mmfuncs.h [iso-8859-1] Tue May 6 16:37:10 2008
@@ -51,7 +51,7 @@
IN ULONG ZeroBits,
IN ULONG CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
- IN OUT PULONG ViewSize,
+ IN OUT PSIZE_T ViewSize,
IN SECTION_INHERIT InheritDisposition,
IN ULONG AllocationType,
IN ULONG Protect
Author: fireball
Date: Tue May 6 15:44:35 2008
New Revision: 33333
URL: http://svn.reactos.org/svn/reactos?rev=33333&view=rev
Log:
- Fix regedit's import function. Now it works equally good in ReactOS and in a real Windows (previously was broken in both OSes).
See issue #997 for more details.
Modified:
trunk/reactos/base/applications/regedit/regproc.c
Modified: trunk/reactos/base/applications/regedit/regproc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/regproc.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/regproc.c [iso-8859-1] Tue May 6 15:44:35 2008
@@ -441,6 +441,7 @@
keyNameBeg = strchr(lpLineCopy, '\\'); /* The key name start by '\' */
if (keyNameBeg) {
+ keyNameBeg++;
if (lpLine[0] == '[') /* need to find matching ']' */
{
LPSTR keyNameEnd;