Re: additional dxdiagn functions

Rob Crittenden <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <[email protected]>
Ok, both unified diffs attached. 

rob

On Wed, 31 Dec 2003, David Hammerton wrote:
> Hi Rob,
> 
> Thanks for that!
> 
> However - perhaps you could send the diff again as a unified diff (as 
> well as your previous email).
> 
> Unified diffs, created with 'cvs diff -u blah' instead of 'cvs diff 
> blah' give more context to the changes.
> 
> I'll review this on monday and commit it.
> 
> Thanks again, and good work.
> 
> David
> 
> --
> David Hammerton
> WineX developer
> TransGaming Technologies
> Bus: +1 416 979 9900 x329
> Fax: +1 416 979 9908
> [email protected]
> http://www.transgaming.com
> *Let the Games Begin*
> 
> On 31-Dec-03, at 11:18 AM, Rob Crittenden wrote:
> 
> > <container.diff>
>

_______________________________________________
winex-devel mailing list
[email protected]
http://lists.transgaming.org/cgi-bin/mailman/listinfo/winex-devel
container.diff (text/plain, 3.4 KB)
Index: container.c
===================================================================
RCS file: /cvsroot/winex/dlls/dxdiagn/container.c,v
retrieving revision 1.4
diff -u -r1.4 container.c
--- container.c	22 Sep 2003 16:53:35 -0000	1.4
+++ container.c	31 Dec 2003 17:56:51 -0000
@@ -88,6 +88,45 @@
     return S_OK;
 }
 
+HRESULT WINAPI DxDiagContainer_GetNumberOfChildContainers(
+                                                 PDXDIAGCONTAINER iface,
+                                                 DWORD *pdwCount)
+{
+    ICOM_THIS(IDxDiagContainerImpl, iface);
+    Container_SubContainer *childContainer;
+    int i;
+
+    i = 0;
+    do
+    {
+        childContainer = &This->scContainers[i];
+        i++;
+    } while (childContainer->pwszContainerName);
+
+    *pdwCount = i - 1;
+
+    TRACE("(%p)->(%ld)\n", iface, *pdwCount);
+
+    return S_OK;
+}
+
+HRESULT WINAPI DxDiagContainer_EnumChildContainerNames(PDXDIAGCONTAINER iface,
+                                                       DWORD dwIndex,
+                                                       LPWSTR pwszContainer,
+                                                       DWORD cchContainer)
+{
+    ICOM_THIS(IDxDiagContainerImpl, iface);
+    Container_SubContainer *childContainer;
+
+    childContainer = &This->scContainers[dwIndex];
+   
+    lstrcpynW(pwszContainer, childContainer->pwszContainerName, cchContainer);
+
+    TRACE("(%p)->(%s)\n", iface, debugstr_w(childContainer->pwszContainerName));
+
+    return S_OK;
+}
+
 /*
  * There are 4 VARIANT property types.
  * The property name contains a hungarian notation prefix.
@@ -147,17 +186,55 @@
     return S_OK;
 }
 
+HRESULT WINAPI DxDiagContainer_GetNumberOfProps(PDXDIAGCONTAINER iface,
+                                                DWORD *pdwCount)
+{
+    ICOM_THIS(IDxDiagContainerImpl, iface);
+    Container_Property *property;
+    int i;
+
+    i = 0;
+    do
+    {
+        property = &This->pProperties[i];
+        i++;
+    } while (property->pwszPropName);
+
+    *pdwCount = i - 1;
+
+    TRACE("(%p)->(%ld)\n", iface, *pdwCount);
+
+    return S_OK;
+}
+
+HRESULT WINAPI DxDiagContainer_EnumPropNames(PDXDIAGCONTAINER iface,
+                                             DWORD dwIndex,
+                                             LPWSTR pwszPropName,
+                                             DWORD cchPropName)
+{
+    ICOM_THIS(IDxDiagContainerImpl, iface);
+    Container_Property *property;
+
+    property = &This->pProperties[dwIndex];
+   
+    lstrcpynW(pwszPropName, property->pwszPropName, cchPropName);
+
+    TRACE("(%p)->(%s)\n", iface, debugstr_w(property->pwszPropName));
+
+    return S_OK;
+}
+
 ICOM_VTABLE(IDxDiagContainer) dxDiagContainerVT =
 {
     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     DxDiagContainer_QueryInterface,
     DxDiagContainer_AddRef,
     DxDiagContainer_Release,
-    (void*)0xdead0004, /* GetNumberOfChildContainers */
-    (void*)0xdead0005, /* EnumChildContainerNames */
+    DxDiagContainer_GetNumberOfChildContainers,
+    DxDiagContainer_EnumChildContainerNames,
     DxDiagContainer_GetChildContainer,
-    (void*)0xdead0007, /* GetNumberOfProps */
-    (void*)0xdead0008, /* EnumProps */
+    DxDiagContainer_GetNumberOfProps,
+    DxDiagContainer_EnumPropNames,
     DxDiagContainer_GetProp
 };
state.diff (text/plain, 721 B)
Index: state.c
===================================================================
RCS file: /cvsroot/winex/dlls/d3dgl/state.c,v
retrieving revision 1.39
diff -u -r1.39 state.c
--- state.c	23 Dec 2003 00:21:34 -0000	1.39
+++ state.c	31 Dec 2003 17:57:37 -0000
@@ -362,9 +362,10 @@
 static void D3D_GL_clip_plane_enable(GL_D3D_priv* priv, DWORD RenderState)
 {
     unsigned u;
+    DWORD enabled, enable;
     _DWRS(CLIPPLANEENABLE);
-    DWORD enabled = priv->isClipPlaneEnabled;
-    DWORD enable = state ^ enabled;
+    enabled = priv->isClipPlaneEnabled;
+    enable = state ^ enabled;
     for (u=0; u<priv->lpCaps->wMaxUserClipPlanes; u++)
 	if (enable & (1 << u)) {
 	    if (state & (1 << u))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.