<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.emulators.wine.patches">
    <title>gmane.comp.emulators.wine.patches</title>
    <link>http://blog.gmane.org/gmane.comp.emulators.wine.patches</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105995"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105994"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105993"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105992"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105991"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105990"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105989"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105988"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105987"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105986"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105985"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105984"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105983"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105982"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105981"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105980"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105979"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105978"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105977"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105976"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105995">
    <title>[website] Spanish translation for release 1.5.5</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105995</link>
    <description>&lt;pre&gt;With regards.

Eduardo




&lt;/pre&gt;</description>
    <dc:creator>Eduardo García</dc:creator>
    <dc:date>2012-05-26T08:31:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105994">
    <title>[website] French translation for release 1.5.5</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105994</link>
    <description>&lt;pre&gt;---
 news/fr/2012052501.xml |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 news/fr/2012052501.xml

diff --git a/news/fr/2012052501.xml b/news/fr/2012052501.xml
new file mode 100644
index 0000000..154ec92
--- /dev/null
+++ b/news/fr/2012052501.xml
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+&amp;lt;news&amp;gt;
+&amp;lt;date&amp;gt;25 mai 2012&amp;lt;/date&amp;gt;
+&amp;lt;title&amp;gt;Sortie de Wine 1.5.5&amp;lt;/title&amp;gt;
+&amp;lt;body&amp;gt;
+&amp;lt;p&amp;gt; La version de développement 1.5.5 de Wine est disponible.&amp;lt;/p&amp;gt;
+&amp;lt;p&amp;gt; &amp;lt;a href="{$root}/announce/1.5.5"&amp;gt;Nouveautés&amp;lt;/a&amp;gt; de cette version :
+&amp;lt;ul&amp;gt;
+  &amp;lt;li&amp;gt;Prise en charge de l'installation de Mono comme module externe à Wine.&amp;lt;/li&amp;gt;
+  &amp;lt;li&amp;gt;Tramage des brosses modèles dans le moteur DIB.&amp;lt;/li&amp;gt;
+  &amp;lt;li&amp;gt;Prise en charge de l'installation du moteur d'exécution .NET 4.0.&amp;lt;/li&amp;gt;
+  &amp;lt;li&amp;gt;Fichiers DDS pris en charge dans D3DX9.&amp;lt;/li&amp;gt;
+  &amp;lt;li&amp;gt;Diverses corrections de bogues.&amp;lt;/li&amp;gt;
+&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;
+&amp;lt;p&amp;gt;&amp;lt;p&amp;gt;Le &amp;lt;a href="http://prdownloads.sourceforge.net/wine/wine-1.5.5.tar.bz2"&amp;gt;code source&amp;lt;/a&amp;gt; est disponible dès à présent. Les paquets binaires sont en cours de construction, et apparaîtront sous peu sur leurs &amp;lt;a href="{$root}/download"&amp;gt;sites de téléchargement&amp;lt;/a&amp;gt; respectifs.
+&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/news&amp;gt;
&lt;/pre&gt;</description>
    <dc:creator>Frédéric Delanoy</dc:creator>
    <dc:date>2012-05-25T20:59:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105993">
    <title>[PATCH 4/4] ws2_32: Use STATUS_MORE_PROCESSING_REQUIRED to indicatethat the AcceptEx async is incomplete (try 3, resend).</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105993</link>
    <description>&lt;pre&gt;Real Name:
    Erich Hoover

Description:
    This patch changes the way AcceptEx handles completions so that
canceled sockets can still send completion notifications.  The patch
fixes a significant issue with the WoW launcher and the Diablo 3
installer (Bug #28898).

Changelog:
    ws2_32: Use STATUS_MORE_PROCESSING_REQUIRED to indicate that the
AcceptEx async is incomplete.

&lt;/pre&gt;</description>
    <dc:creator>Erich E. Hoover</dc:creator>
    <dc:date>2012-05-25T20:49:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105992">
    <title>[PATCH 3/4] server: STATUS_MORE_PROCESSING_REQUIRED does not indicatethat an async operation is complete (try 3).</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105992</link>
    <description>&lt;pre&gt;Real Name:
    Erich Hoover

Description:
    Several MSDN articles indicate that kernel drivers can respond
with STATUS_MORE_PROCESSING_REQUIRED to indicate that an IRP is
incomplete and that a completion should not be processed.  Handling
the return value of our async operations in this way permits us to
handle completions for closed AcceptEx socket handles (part 3).  I
realize that my previous attempt at this (using STATUS_ALERTED) was
considered to be hackish, but I now have some evidence to support this
method and I have added a variety of tests that establish that
AcceptEx needs to work this way.  Since there isn't enough room to add
the completion port and the completion key to apc_call_t, and it would
be unacceptable to use the handle to the APC to send the completion, I
can't see any other way to solve this issue except to have the
callback return a value that means "I'm not done yet" or drastically
restructure how the APC data is passed between the client and the
server.  This version of the patch has been rebased against an updated
patch 2.

Changelog:
    server: STATUS_MORE_PROCESSING_REQUIRED does not indicate that an
async operation is complete.

&lt;/pre&gt;</description>
    <dc:creator>Erich E. Hoover</dc:creator>
    <dc:date>2012-05-25T20:48:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105991">
    <title>[PATCH 2/4] server: Update stored completion information even afteran async IO is queued (try 3).</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105991</link>
    <description>&lt;pre&gt;Real Name:
    Erich Hoover

Description:
    The completion information for a file handle can be updated after
an async IO has been queued and this information will still be valid
for the async operation (even if the handle is closed before the async
completes!).  The attached patch adds a file operation to update the
completion information for a queued async operation so that such a
change can be properly propagated to the async object.  This new
version of the patch has been updated to not requiring searching
through the list of async objects associated with a queue and adds a
test demonstrating this behavior to ntdll.

Changelog:
    server: Update stored completion information even after an async
IO is queued.

&lt;/pre&gt;</description>
    <dc:creator>Erich E. Hoover</dc:creator>
    <dc:date>2012-05-25T20:45:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105990">
    <title>[PATCH 1/4] server: Move completion from async object to async queue.</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105990</link>
    <description>&lt;pre&gt;Real Name:
    Erich Hoover

Description:
    It seems that the completion information should be associated with
the async queue, rather than the async object, since the completion
information for a file handle can be updated after an async IO has
been queued.  So, the attached patch moves the completion information
from the async object into the async queue so that we can properly
handle associating a completion with a file descriptor after an async
IO is queued (part 2).

Changelog:
    server: Move completion from async object to async queue.

&lt;/pre&gt;</description>
    <dc:creator>Erich E. Hoover</dc:creator>
    <dc:date>2012-05-25T20:43:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105989">
    <title>[website] Wine 1.5.5 freigegeben</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105989</link>
    <description>&lt;pre&gt;---
 news/de/2012052501.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 news/de/2012052501.xml



&lt;/pre&gt;</description>
    <dc:creator>André Hentschel</dc:creator>
    <dc:date>2012-05-25T19:55:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105988">
    <title>[PATCH 2/2] msvcrt: Improve handling of try..catch blocks inside catch</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105988</link>
    <description>&lt;pre&gt;---
  dlls/msvcrt/except_i386.c |   55 
+++++++++++++++++++++++++++-----------------
  1 files changed, 34 insertions(+), 21 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Piotr Caban</dc:creator>
    <dc:date>2012-05-25T17:43:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105987">
    <title>[PATCH 1/2] msvcrt: Handle rethrown exception in cxx_frame_handler</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105987</link>
    <description>&lt;pre&gt;
Handles exceptions rethrown in a function called from catch block.
---
  dlls/msvcrt/except_i386.c |   20 +++++++++++++++++++-
  1 files changed, 19 insertions(+), 1 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Piotr Caban</dc:creator>
    <dc:date>2012-05-25T17:42:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105986">
    <title>[PATCH 7/8 try2] wininet: Store certificate error information insecurity flags</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105986</link>
    <description>&lt;pre&gt;Please use this version instead.

---
 dlls/wininet/http.c          |   18 +----
 dlls/wininet/internet.h      |   11 ++-
 dlls/wininet/netconnection.c |  188
++++++++++++++++++++++++-----------------
 3 files changed, 123 insertions(+), 94 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:51:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105985">
    <title>[PATCH 8/8] wininet: Added INTERNET_OPTION_SECURITY_FLAGS tests</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105985</link>
    <description>&lt;pre&gt;---
 dlls/wininet/tests/http.c |  215
+++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 215 insertions(+), 0 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:36:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105984">
    <title>[PATCH 7/8] wininet: Store certificate error information in securityflags</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105984</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c          |   18 +----
 dlls/wininet/internet.h      |   11 +++-
 dlls/wininet/netconnection.c |  170
++++++++++++++++++++++++------------------
 3 files changed, 111 insertions(+), 88 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:36:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105983">
    <title>[PATCH 6/8] wininet: Added INTERNET_OPTION_SETTINGS_CHANGED semi-stubimplementation</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105983</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c     |    8 ++++----
 dlls/wininet/internet.c |    7 ++++++-
 dlls/wininet/internet.h |    8 +++++++-
 3 files changed, 17 insertions(+), 6 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:35:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105982">
    <title>[PATCH 5/8] wininet: Store server_t on the list until clean up</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105982</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c     |   21 +++++++++------------
 dlls/wininet/internet.h |    1 -
 2 files changed, 9 insertions(+), 13 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:35:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105981">
    <title>[PATCH 4/8] wininet: Set SECURITY_FLAG_STRENGTH_* flags inNETCONN_secure_connect</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105981</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c          |   11 ++---------
 dlls/wininet/netconnection.c |    9 +++++++++
 2 files changed, 11 insertions(+), 9 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:35:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105980">
    <title>[PATCH 3/8] wininet: Set SECURITY_FLAG_SECURRE inNETCON_secure_connect</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105980</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c          |    2 --
 dlls/wininet/netconnection.c |    2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:34:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105979">
    <title>[PATCH 2/8] wininet: Store security flags in server_t</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105979</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c          |    4 ++--
 dlls/wininet/internet.h      |    2 ++
 dlls/wininet/netconnection.c |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:34:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105978">
    <title>[PATCH 1/8] wininet: Store server_t in http_request_t</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105978</link>
    <description>&lt;pre&gt;---
 dlls/wininet/http.c     |   77
+++++++++++++++++++++++++----------------------
 dlls/wininet/internet.h |    1 +
 2 files changed, 42 insertions(+), 36 deletions(-)



&lt;/pre&gt;</description>
    <dc:creator>Jacek Caban</dc:creator>
    <dc:date>2012-05-25T14:34:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105977">
    <title>[PATCH 5/5] d3d9: Get rid of IDirect3D9Impl.</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105977</link>
    <description>&lt;pre&gt;---
 dlls/d3d9/d3d9_main.c    |    4 +-
 dlls/d3d9/d3d9_private.h |   28 ++---
 dlls/d3d9/device.c       |    2 +-
 dlls/d3d9/directx.c      |  335 ++++++++++++++++++++++------------------------
 4 files changed, 176 insertions(+), 193 deletions(-)

diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
index e3bb9f8..065a37e 100644
--- a/dlls/d3d9/d3d9_main.c
+++ b/dlls/d3d9/d3d9_main.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,7 +35,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void WINAPI DebugSetMute(void) {
 
 IDirect3D9 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT sdk_version)
 {
-    IDirect3D9Impl *object;
+    struct d3d9 *object;
 
     TRACE("sdk_version %#x.\n", sdk_version);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -59,7 +59,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; IDirect3D9 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT sdk_version)
 
 HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9Ex **d3d9ex)
 {
-    IDirect3D9Impl *object;
+    struct d3d9 *object;
 
     TRACE("sdk_version %#x, d3d9ex %p.\n", sdk_version, d3d9ex);
 
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index 793c948..25d5bf1 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -127,22 +127,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_H
     _pD3D9Caps-&amp;gt;MaxVertexShader30InstructionSlots = _pWineCaps-&amp;gt;MaxVertexShader30InstructionSlots; \
     _pD3D9Caps-&amp;gt;MaxPixelShader30InstructionSlots  = _pWineCaps-&amp;gt;MaxPixelShader30InstructionSlots;
 
-/*****************************************************************************
- * IDirect3D implementation structure
- */
-typedef struct IDirect3D9Impl
+struct d3d9
 {
-    /* IUnknown fields */
-    IDirect3D9Ex            IDirect3D9Ex_iface;
-    LONG                    ref;
-
-    struct wined3d *WineD3D;
-
-    /* Created via Direct3DCreate9Ex? Can QI extended interfaces */
-    BOOL                    extended;
-} IDirect3D9Impl;
+    IDirect3D9Ex IDirect3D9Ex_iface;
+    LONG refcount;
+    struct wined3d *wined3d;
+    BOOL extended;
+};
 
-BOOL d3d9_init(IDirect3D9Impl *d3d9, BOOL extended) DECLSPEC_HIDDEN;
+BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended) DECLSPEC_HIDDEN;
 void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN;
 
 struct fvf_declaration
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -160,7 +153,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct IDirect3DDevice9Impl
     struct wined3d_device_parent device_parent;
     LONG ref;
     struct wined3d_device *wined3d_device;
-    struct IDirect3D9Impl *d3d_parent;
+    struct d3d9 *d3d_parent;
     /* Avoids recursion with nested ReleaseRef to 0 */
     BOOL                          inDestruction;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -171,8 +164,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct IDirect3DDevice9Impl
     BOOL                          in_scene;
 } IDirect3DDevice9Impl;
 
-HRESULT device_init(IDirect3DDevice9Impl *device, IDirect3D9Impl *parent, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type,
-        HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode) DECLSPEC_HIDDEN;
+HRESULT device_init(IDirect3DDevice9Impl *device, struct d3d9 *parent, struct wined3d *wined3d,
+        UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags,
+        D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode) DECLSPEC_HIDDEN;
 
 /*****************************************************************************
  * IDirect3DVolume9 implementation structure
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index fecb316..1795fa4 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3380,7 +3380,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void setup_fpu(void)
 #endif
 }
 
-HRESULT device_init(IDirect3DDevice9Impl *device, IDirect3D9Impl *parent, struct wined3d *wined3d,
+HRESULT device_init(IDirect3DDevice9Impl *device, struct d3d9 *parent, struct wined3d *wined3d,
         UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags,
         D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode)
 {
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 80b862d..e870936 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,22 +24,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
 
-static inline IDirect3D9Impl *impl_from_IDirect3D9Ex(IDirect3D9Ex *iface)
+static inline struct d3d9 *impl_from_IDirect3D9Ex(IDirect3D9Ex *iface)
 {
-    return CONTAINING_RECORD(iface, IDirect3D9Impl, IDirect3D9Ex_iface);
+    return CONTAINING_RECORD(iface, struct d3d9, IDirect3D9Ex_iface);
 }
 
-static HRESULT WINAPI IDirect3D9Impl_QueryInterface(IDirect3D9Ex *iface, REFIID riid, void **object)
+static HRESULT WINAPI d3d9_QueryInterface(IDirect3D9Ex *iface, REFIID riid, void **out)
 {
-    IDirect3D9Impl *d3d9 = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
 
-    TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
+    TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
 
     if (IsEqualGUID(riid, &amp;amp;IID_IDirect3D9)
             || IsEqualGUID(riid, &amp;amp;IID_IUnknown))
     {
         IDirect3D9Ex_AddRef(&amp;amp;d3d9-&amp;gt;IDirect3D9Ex_iface);
-        *object = &amp;amp;d3d9-&amp;gt;IDirect3D9Ex_iface;
+        *out = &amp;amp;d3d9-&amp;gt;IDirect3D9Ex_iface;
         return S_OK;
     }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,268 +48,262 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI IDirect3D9Impl_QueryInterface(IDirect3D9Ex *iface, REFIID
         if (!d3d9-&amp;gt;extended)
         {
             WARN("Application asks for IDirect3D9Ex, but this instance wasn't created with Direct3DCreate9Ex.\n");
-            *object = NULL;
+            *out = NULL;
             return E_NOINTERFACE;
         }
 
         IDirect3D9Ex_AddRef(&amp;amp;d3d9-&amp;gt;IDirect3D9Ex_iface);
-        *object = &amp;amp;d3d9-&amp;gt;IDirect3D9Ex_iface;
+        *out = &amp;amp;d3d9-&amp;gt;IDirect3D9Ex_iface;
         return S_OK;
     }
 
     WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
 
-    *object = NULL;
+    *out = NULL;
     return E_NOINTERFACE;
 }
 
-static ULONG WINAPI IDirect3D9Impl_AddRef(IDirect3D9Ex *iface)
+static ULONG WINAPI d3d9_AddRef(IDirect3D9Ex *iface)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
-    ULONG ref = InterlockedIncrement(&amp;amp;This-&amp;gt;ref);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
+    ULONG refcount = InterlockedIncrement(&amp;amp;d3d9-&amp;gt;refcount);
 
-    TRACE("%p increasing refcount to %u.\n", iface, ref);
+    TRACE("%p increasing refcount to %u.\n", iface, refcount);
 
-    return ref;
+    return refcount;
 }
 
-static ULONG WINAPI IDirect3D9Impl_Release(IDirect3D9Ex *iface)
+static ULONG WINAPI d3d9_Release(IDirect3D9Ex *iface)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
-    ULONG ref = InterlockedDecrement(&amp;amp;This-&amp;gt;ref);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
+    ULONG refcount = InterlockedDecrement(&amp;amp;d3d9-&amp;gt;refcount);
 
-    TRACE("%p decreasing refcount to %u.\n", iface, ref);
+    TRACE("%p decreasing refcount to %u.\n", iface, refcount);
 
-    if (ref == 0) {
+    if (!refcount)
+    {
         wined3d_mutex_lock();
-        wined3d_decref(This-&amp;gt;WineD3D);
+        wined3d_decref(d3d9-&amp;gt;wined3d);
         wined3d_mutex_unlock();
 
-        HeapFree(GetProcessHeap(), 0, This);
+        HeapFree(GetProcessHeap(), 0, d3d9);
     }
 
-    return ref;
+    return refcount;
 }
 
-/* IDirect3D9 Interface follow: */
-static HRESULT  WINAPI  IDirect3D9Impl_RegisterSoftwareDevice(IDirect3D9Ex *iface,
-        void *pInitializeFunction)
+static HRESULT WINAPI d3d9_RegisterSoftwareDevice(IDirect3D9Ex *iface, void *init_function)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
-    TRACE("iface %p, init_function %p.\n", iface, pInitializeFunction);
+    TRACE("iface %p, init_function %p.\n", iface, init_function);
 
     wined3d_mutex_lock();
-    hr = wined3d_register_software_device(This-&amp;gt;WineD3D, pInitializeFunction);
+    hr = wined3d_register_software_device(d3d9-&amp;gt;wined3d, init_function);
     wined3d_mutex_unlock();
 
     return hr;
 }
 
-static UINT WINAPI IDirect3D9Impl_GetAdapterCount(IDirect3D9Ex *iface)
+static UINT WINAPI d3d9_GetAdapterCount(IDirect3D9Ex *iface)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     UINT ret;
 
     TRACE("iface %p.\n", iface);
 
     wined3d_mutex_lock();
-    ret = wined3d_get_adapter_count(This-&amp;gt;WineD3D);
+    ret = wined3d_get_adapter_count(d3d9-&amp;gt;wined3d);
     wined3d_mutex_unlock();
 
     return ret;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(IDirect3D9Ex *iface, UINT Adapter,
-        DWORD Flags, D3DADAPTER_IDENTIFIER9 *pIdentifier)
+static HRESULT WINAPI d3d9_GetAdapterIdentifier(IDirect3D9Ex *iface, UINT adapter,
+        DWORD flags, D3DADAPTER_IDENTIFIER9 *identifier)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     struct wined3d_adapter_identifier adapter_id;
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, flags %#x, identifier %p.\n",
-            iface, Adapter, Flags, pIdentifier);
+            iface, adapter, flags, identifier);
 
-    adapter_id.driver = pIdentifier-&amp;gt;Driver;
-    adapter_id.driver_size = sizeof(pIdentifier-&amp;gt;Driver);
-    adapter_id.description = pIdentifier-&amp;gt;Description;
-    adapter_id.description_size = sizeof(pIdentifier-&amp;gt;Description);
-    adapter_id.device_name = pIdentifier-&amp;gt;DeviceName;
-    adapter_id.device_name_size = sizeof(pIdentifier-&amp;gt;DeviceName);
+    adapter_id.driver = identifier-&amp;gt;Driver;
+    adapter_id.driver_size = sizeof(identifier-&amp;gt;Driver);
+    adapter_id.description = identifier-&amp;gt;Description;
+    adapter_id.description_size = sizeof(identifier-&amp;gt;Description);
+    adapter_id.device_name = identifier-&amp;gt;DeviceName;
+    adapter_id.device_name_size = sizeof(identifier-&amp;gt;DeviceName);
 
     wined3d_mutex_lock();
-    hr = wined3d_get_adapter_identifier(This-&amp;gt;WineD3D, Adapter, Flags, &amp;amp;adapter_id);
+    hr = wined3d_get_adapter_identifier(d3d9-&amp;gt;wined3d, adapter, flags, &amp;amp;adapter_id);
     wined3d_mutex_unlock();
 
-    pIdentifier-&amp;gt;DriverVersion = adapter_id.driver_version;
-    pIdentifier-&amp;gt;VendorId = adapter_id.vendor_id;
-    pIdentifier-&amp;gt;DeviceId = adapter_id.device_id;
-    pIdentifier-&amp;gt;SubSysId = adapter_id.subsystem_id;
-    pIdentifier-&amp;gt;Revision = adapter_id.revision;
-    memcpy(&amp;amp;pIdentifier-&amp;gt;DeviceIdentifier, &amp;amp;adapter_id.device_identifier, sizeof(pIdentifier-&amp;gt;DeviceIdentifier));
-    pIdentifier-&amp;gt;WHQLLevel = adapter_id.whql_level;
+    identifier-&amp;gt;DriverVersion = adapter_id.driver_version;
+    identifier-&amp;gt;VendorId = adapter_id.vendor_id;
+    identifier-&amp;gt;DeviceId = adapter_id.device_id;
+    identifier-&amp;gt;SubSysId = adapter_id.subsystem_id;
+    identifier-&amp;gt;Revision = adapter_id.revision;
+    memcpy(&amp;amp;identifier-&amp;gt;DeviceIdentifier, &amp;amp;adapter_id.device_identifier, sizeof(identifier-&amp;gt;DeviceIdentifier));
+    identifier-&amp;gt;WHQLLevel = adapter_id.whql_level;
 
     return hr;
 }
 
-static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(IDirect3D9Ex *iface, UINT Adapter,
-        D3DFORMAT Format)
+static UINT WINAPI d3d9_GetAdapterModeCount(IDirect3D9Ex *iface, UINT adapter, D3DFORMAT format)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     UINT ret;
 
-    TRACE("iface %p, adapter %u, format %#x.\n", iface, Adapter, Format);
+    TRACE("iface %p, adapter %u, format %#x.\n", iface, adapter, format);
 
-    /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out */
-    if(Format != D3DFMT_X8R8G8B8 &amp;amp;&amp;amp; Format != D3DFMT_R5G6B5) {
+    /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out. */
+    if (format != D3DFMT_X8R8G8B8 &amp;amp;&amp;amp; format != D3DFMT_R5G6B5)
         return 0;
-    }
 
     wined3d_mutex_lock();
-    ret = wined3d_get_adapter_mode_count(This-&amp;gt;WineD3D, Adapter, wined3dformat_from_d3dformat(Format));
+    ret = wined3d_get_adapter_mode_count(d3d9-&amp;gt;wined3d, adapter, wined3dformat_from_d3dformat(format));
     wined3d_mutex_unlock();
 
     return ret;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(IDirect3D9Ex *iface, UINT Adapter,
-        D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE *pMode)
+static HRESULT WINAPI d3d9_EnumAdapterModes(IDirect3D9Ex *iface, UINT adapter,
+        D3DFORMAT format, UINT mode_idx, D3DDISPLAYMODE *mode)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, format %#x, mode_idx %u, mode %p.\n",
-            iface, Adapter, Format, Mode, pMode);
+            iface, adapter, format, mode_idx, mode);
 
-    /* We can't pass this to WineD3D, otherwise it'll think it came from D3D8 or DDraw.
-       It's supposed to fail anyway, so no harm returning failure. */
-    if(Format != D3DFMT_X8R8G8B8 &amp;amp;&amp;amp; Format != D3DFMT_R5G6B5)
+    if (format != D3DFMT_X8R8G8B8 &amp;amp;&amp;amp; format != D3DFMT_R5G6B5)
         return D3DERR_INVALIDCALL;
 
     wined3d_mutex_lock();
-    hr = wined3d_enum_adapter_modes(This-&amp;gt;WineD3D, Adapter, wined3dformat_from_d3dformat(Format),
-            Mode, (struct wined3d_display_mode *)pMode);
+    hr = wined3d_enum_adapter_modes(d3d9-&amp;gt;wined3d, adapter, wined3dformat_from_d3dformat(format),
+            mode_idx, (struct wined3d_display_mode *)mode);
     wined3d_mutex_unlock();
 
-    if (SUCCEEDED(hr)) pMode-&amp;gt;Format = d3dformat_from_wined3dformat(pMode-&amp;gt;Format);
+    if (SUCCEEDED(hr))
+        mode-&amp;gt;Format = d3dformat_from_wined3dformat(mode-&amp;gt;Format);
 
     return hr;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDISPLAYMODE *pMode)
+static HRESULT WINAPI d3d9_GetAdapterDisplayMode(IDirect3D9Ex *iface, UINT adapter, D3DDISPLAYMODE *mode)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
-    TRACE("iface %p, adapter %u, mode %p.\n", iface, Adapter, pMode);
+    TRACE("iface %p, adapter %u, mode %p.\n", iface, adapter, mode);
 
     wined3d_mutex_lock();
-    hr = wined3d_get_adapter_display_mode(This-&amp;gt;WineD3D, Adapter, (struct wined3d_display_mode *)pMode);
+    hr = wined3d_get_adapter_display_mode(d3d9-&amp;gt;wined3d, adapter, (struct wined3d_display_mode *)mode);
     wined3d_mutex_unlock();
 
-    if (SUCCEEDED(hr)) pMode-&amp;gt;Format = d3dformat_from_wined3dformat(pMode-&amp;gt;Format);
+    if (SUCCEEDED(hr))
+        mode-&amp;gt;Format = d3dformat_from_wined3dformat(mode-&amp;gt;Format);
 
     return hr;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, BOOL Windowed)
+static HRESULT WINAPI d3d9_CheckDeviceType(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
+        D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n",
-            iface, Adapter, CheckType, DisplayFormat, BackBufferFormat, Windowed);
+            iface, adapter, device_type, display_format, backbuffer_format, windowed);
 
     wined3d_mutex_lock();
-    hr = wined3d_check_device_type(This-&amp;gt;WineD3D, Adapter, CheckType, wined3dformat_from_d3dformat(DisplayFormat),
-            wined3dformat_from_d3dformat(BackBufferFormat), Windowed);
+    hr = wined3d_check_device_type(d3d9-&amp;gt;wined3d, adapter, device_type, wined3dformat_from_d3dformat(display_format),
+            wined3dformat_from_d3dformat(backbuffer_format), windowed);
     wined3d_mutex_unlock();
 
     return hr;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType,
-        D3DFORMAT CheckFormat)
+static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
+        D3DFORMAT adapter_format, DWORD usage, D3DRESOURCETYPE resource_type, D3DFORMAT format)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     enum wined3d_resource_type wined3d_rtype;
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
-            iface, Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
+            iface, adapter, device_type, adapter_format, usage, resource_type, format);
 
-    switch(RType) {
+    switch (resource_type)
+    {
         case D3DRTYPE_VERTEXBUFFER:
         case D3DRTYPE_INDEXBUFFER:
             wined3d_rtype = WINED3D_RTYPE_BUFFER;
             break;
 
         default:
-            wined3d_rtype = RType;
+            wined3d_rtype = resource_type;
             break;
     }
 
     wined3d_mutex_lock();
-    hr = wined3d_check_device_format(This-&amp;gt;WineD3D, Adapter, DeviceType, wined3dformat_from_d3dformat(AdapterFormat),
-            Usage, wined3d_rtype, wined3dformat_from_d3dformat(CheckFormat), WINED3D_SURFACE_TYPE_OPENGL);
+    hr = wined3d_check_device_format(d3d9-&amp;gt;wined3d, adapter, device_type, wined3dformat_from_d3dformat(adapter_format),
+            usage, wined3d_rtype, wined3dformat_from_d3dformat(format), WINED3D_SURFACE_TYPE_OPENGL);
     wined3d_mutex_unlock();
 
     return hr;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed,
-        D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels)
+static HRESULT WINAPI d3d9_CheckDeviceMultiSampleType(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
+        D3DFORMAT format, BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type, DWORD *levels)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x, levels %p.\n",
-            iface, Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels);
+            iface, adapter, device_type, format, windowed, multisample_type, levels);
 
     wined3d_mutex_lock();
-    hr = wined3d_check_device_multisample_type(This-&amp;gt;WineD3D, Adapter, DeviceType,
-            wined3dformat_from_d3dformat(SurfaceFormat), Windowed, MultiSampleType, pQualityLevels);
+    hr = wined3d_check_device_multisample_type(d3d9-&amp;gt;wined3d, adapter, device_type,
+            wined3dformat_from_d3dformat(format), windowed, multisample_type, levels);
     wined3d_mutex_unlock();
 
     return hr;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat,
-        D3DFORMAT DepthStencilFormat)
+static HRESULT WINAPI d3d9_CheckDepthStencilMatch(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type,
+        D3DFORMAT adapter_format, D3DFORMAT rt_format, D3DFORMAT ds_format)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, rt_format %#x, ds_format %#x.\n",
-            iface, Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat);
+            iface, adapter, device_type, adapter_format, rt_format, ds_format);
 
     wined3d_mutex_lock();
-    hr = wined3d_check_depth_stencil_match(This-&amp;gt;WineD3D, Adapter, DeviceType,
-            wined3dformat_from_d3dformat(AdapterFormat), wined3dformat_from_d3dformat(RenderTargetFormat),
-            wined3dformat_from_d3dformat(DepthStencilFormat));
+    hr = wined3d_check_depth_stencil_match(d3d9-&amp;gt;wined3d, adapter, device_type,
+            wined3dformat_from_d3dformat(adapter_format), wined3dformat_from_d3dformat(rt_format),
+            wined3dformat_from_d3dformat(ds_format));
     wined3d_mutex_unlock();
 
     return hr;
 }
 
-static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat)
+static HRESULT WINAPI d3d9_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT adapter,
+        D3DDEVTYPE device_type, D3DFORMAT src_format, D3DFORMAT dst_format)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HRESULT hr;
 
     TRACE("iface %p, adapter %u, device_type %#x, src_format %#x, dst_format %#x.\n",
-            iface, Adapter, DeviceType, SourceFormat, TargetFormat);
+            iface, adapter, device_type, src_format, dst_format);
 
     wined3d_mutex_lock();
-    hr = wined3d_check_device_format_conversion(This-&amp;gt;WineD3D, Adapter, DeviceType,
-            wined3dformat_from_d3dformat(SourceFormat), wined3dformat_from_d3dformat(TargetFormat));
+    hr = wined3d_check_device_format_conversion(d3d9-&amp;gt;wined3d, adapter, device_type,
+            wined3dformat_from_d3dformat(src_format), wined3dformat_from_d3dformat(dst_format));
     wined3d_mutex_unlock();
 
     return hr;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -392,59 +386,55 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void filter_caps(D3DCAPS9* pCaps)
     }
 }
 
-static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(IDirect3D9Ex *iface, UINT Adapter,
-        D3DDEVTYPE DeviceType, D3DCAPS9 *pCaps)
+static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS9 *caps)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
-    HRESULT hrc = D3D_OK;
-    WINED3DCAPS *pWineCaps;
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
+    WINED3DCAPS *wined3d_caps;
+    HRESULT hr;
 
-    TRACE("iface %p, adapter %u, device_type %#x, caps %p.\n", iface, Adapter, DeviceType, pCaps);
+    TRACE("iface %p, adapter %u, device_type %#x, caps %p.\n", iface, adapter, device_type, caps);
 
-    if(NULL == pCaps){
+    if (!caps)
         return D3DERR_INVALIDCALL;
-    }
-    pWineCaps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINED3DCAPS));
-    if(pWineCaps == NULL){
+
+    if (!(wined3d_caps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINED3DCAPS))))
         return D3DERR_INVALIDCALL; /*well this is what MSDN says to return*/
-    }
-    memset(pCaps, 0, sizeof(*pCaps));
+    memset(caps, 0, sizeof(*caps));
 
     wined3d_mutex_lock();
-    hrc = wined3d_get_device_caps(This-&amp;gt;WineD3D, Adapter, DeviceType, pWineCaps);
+    hr = wined3d_get_device_caps(d3d9-&amp;gt;wined3d, adapter, device_type, wined3d_caps);
     wined3d_mutex_unlock();
 
-    WINECAPSTOD3D9CAPS(pCaps, pWineCaps)
-    HeapFree(GetProcessHeap(), 0, pWineCaps);
+    WINECAPSTOD3D9CAPS(caps, wined3d_caps)
+    HeapFree(GetProcessHeap(), 0, wined3d_caps);
 
     /* Some functionality is implemented in d3d9.dll, not wined3d.dll. Add the needed caps */
-    pCaps-&amp;gt;DevCaps2 |= D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES;
+    caps-&amp;gt;DevCaps2 |= D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES;
 
-    filter_caps(pCaps);
+    filter_caps(caps);
 
-    TRACE("(%p) returning %p\n", This, pCaps);
-    return hrc;
+    return hr;
 }
 
-static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(IDirect3D9Ex *iface, UINT Adapter)
+static HMONITOR WINAPI d3d9_GetAdapterMonitor(IDirect3D9Ex *iface, UINT adapter)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     HMONITOR ret;
 
-    TRACE("iface %p, adapter %u.\n", iface, Adapter);
+    TRACE("iface %p, adapter %u.\n", iface, adapter);
 
     wined3d_mutex_lock();
-    ret = wined3d_get_adapter_monitor(This-&amp;gt;WineD3D, Adapter);
+    ret = wined3d_get_adapter_monitor(d3d9-&amp;gt;wined3d, adapter);
     wined3d_mutex_unlock();
 
     return ret;
 }
 
-static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex *iface, UINT adapter,
+static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDevice(IDirect3D9Ex *iface, UINT adapter,
         D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters,
         IDirect3DDevice9 **device)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     IDirect3DDevice9Impl *object;
     HRESULT hr;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -458,7 +448,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex
         return E_OUTOFMEMORY;
     }
 
-    hr = device_init(object, This, This-&amp;gt;WineD3D, adapter, device_type, focus_window, flags, parameters, NULL);
+    hr = device_init(object, d3d9, d3d9-&amp;gt;wined3d, adapter, device_type, focus_window, flags, parameters, NULL);
     if (FAILED(hr))
     {
         WARN("Failed to initialize device, hr %#x.\n", hr);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -472,7 +462,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9Impl_CreateDevice(IDirect3D9Ex
     return D3D_OK;
 }
 
-static UINT WINAPI IDirect3D9ExImpl_GetAdapterModeCountEx(IDirect3D9Ex *iface,
+static UINT WINAPI d3d9_GetAdapterModeCountEx(IDirect3D9Ex *iface,
         UINT adapter, const D3DDISPLAYMODEFILTER *filter)
 {
     FIXME("iface %p, adapter %u, filter %p stub!\n", iface, adapter, filter);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -480,7 +470,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static UINT WINAPI IDirect3D9ExImpl_GetAdapterModeCountEx(IDirect3D9Ex *iface,
     return 0;
 }
 
-static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface,
+static HRESULT WINAPI d3d9_EnumAdapterModesEx(IDirect3D9Ex *iface,
         UINT adapter, const D3DDISPLAYMODEFILTER *filter, UINT mode_idx, D3DDISPLAYMODEEX *mode)
 {
     FIXME("iface %p, adapter %u, filter %p, mode_idx %u, mode %p stub!\n",
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -489,7 +479,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface,
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *iface,
+static HRESULT WINAPI d3d9_GetAdapterDisplayModeEx(IDirect3D9Ex *iface,
         UINT adapter, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation)
 {
     FIXME("iface %p, adapter %u, mode %p, rotation %p stub!\n",
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -498,11 +488,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *ifa
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3D9Ex *iface,
+static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDeviceEx(IDirect3D9Ex *iface,
         UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags,
         D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode, IDirect3DDevice9Ex **device)
 {
-    IDirect3D9Impl *d3d9 = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     IDirect3DDevice9Impl *object;
     HRESULT hr;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -516,7 +506,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3
         return E_OUTOFMEMORY;
     }
 
-    hr = device_init(object, d3d9, d3d9-&amp;gt;WineD3D, adapter, device_type, focus_window, flags, parameters, mode);
+    hr = device_init(object, d3d9, d3d9-&amp;gt;wined3d, adapter, device_type, focus_window, flags, parameters, mode);
     if (FAILED(hr))
     {
         WARN("Failed to initialize device, hr %#x.\n", hr);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -530,9 +520,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3D9ExImpl_CreateDeviceEx(IDirect3
     return D3D_OK;
 }
 
-static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUID *luid)
+static HRESULT WINAPI d3d9_GetAdapterLUID(IDirect3D9Ex *iface, UINT adapter, LUID *luid)
 {
-    IDirect3D9Impl *This = impl_from_IDirect3D9Ex(iface);
+    struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface);
     struct wined3d_adapter_identifier adapter_id;
     HRESULT hr;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -543,7 +533,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT
     adapter_id.device_name_size = 0;
 
     wined3d_mutex_lock();
-    hr = wined3d_get_adapter_identifier(This-&amp;gt;WineD3D, adapter, 0, &amp;amp;adapter_id);
+    hr = wined3d_get_adapter_identifier(d3d9-&amp;gt;wined3d, adapter, 0, &amp;amp;adapter_id);
     wined3d_mutex_unlock();
 
     memcpy(luid, &amp;amp;adapter_id.adapter_luid, sizeof(*luid));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -551,45 +541,44 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT
     return hr;
 }
 
-static const struct IDirect3D9ExVtbl Direct3D9_Vtbl =
+static const struct IDirect3D9ExVtbl d3d9_vtbl =
 {
     /* IUnknown */
-    IDirect3D9Impl_QueryInterface,
-    IDirect3D9Impl_AddRef,
-    IDirect3D9Impl_Release,
+    d3d9_QueryInterface,
+    d3d9_AddRef,
+    d3d9_Release,
     /* IDirect3D9 */
-    IDirect3D9Impl_RegisterSoftwareDevice,
-    IDirect3D9Impl_GetAdapterCount,
-    IDirect3D9Impl_GetAdapterIdentifier,
-    IDirect3D9Impl_GetAdapterModeCount,
-    IDirect3D9Impl_EnumAdapterModes,
-    IDirect3D9Impl_GetAdapterDisplayMode,
-    IDirect3D9Impl_CheckDeviceType,
-    IDirect3D9Impl_CheckDeviceFormat,
-    IDirect3D9Impl_CheckDeviceMultiSampleType,
-    IDirect3D9Impl_CheckDepthStencilMatch,
-    IDirect3D9Impl_CheckDeviceFormatConversion,
-    IDirect3D9Impl_GetDeviceCaps,
-    IDirect3D9Impl_GetAdapterMonitor,
-    IDirect3D9Impl_CreateDevice,
+    d3d9_RegisterSoftwareDevice,
+    d3d9_GetAdapterCount,
+    d3d9_GetAdapterIdentifier,
+    d3d9_GetAdapterModeCount,
+    d3d9_EnumAdapterModes,
+    d3d9_GetAdapterDisplayMode,
+    d3d9_CheckDeviceType,
+    d3d9_CheckDeviceFormat,
+    d3d9_CheckDeviceMultiSampleType,
+    d3d9_CheckDepthStencilMatch,
+    d3d9_CheckDeviceFormatConversion,
+    d3d9_GetDeviceCaps,
+    d3d9_GetAdapterMonitor,
+    d3d9_CreateDevice,
     /* IDirect3D9Ex */
-    IDirect3D9ExImpl_GetAdapterModeCountEx,
-    IDirect3D9ExImpl_EnumAdapterModesEx,
-    IDirect3D9ExImpl_GetAdapterDisplayModeEx,
-    IDirect3D9ExImpl_CreateDeviceEx,
-    IDirect3D9ExImpl_GetAdapterLUID
-
+    d3d9_GetAdapterModeCountEx,
+    d3d9_EnumAdapterModesEx,
+    d3d9_GetAdapterDisplayModeEx,
+    d3d9_CreateDeviceEx,
+    d3d9_GetAdapterLUID,
 };
 
-BOOL d3d9_init(IDirect3D9Impl *d3d9, BOOL extended)
+BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
 {
-    d3d9-&amp;gt;IDirect3D9Ex_iface.lpVtbl = &amp;amp;Direct3D9_Vtbl;
-    d3d9-&amp;gt;ref = 1;
+    d3d9-&amp;gt;IDirect3D9Ex_iface.lpVtbl = &amp;amp;d3d9_vtbl;
+    d3d9-&amp;gt;refcount = 1;
 
     wined3d_mutex_lock();
-    d3d9-&amp;gt;WineD3D = wined3d_create(9, 0);
+    d3d9-&amp;gt;wined3d = wined3d_create(9, 0);
     wined3d_mutex_unlock();
-    if (!d3d9-&amp;gt;WineD3D)
+    if (!d3d9-&amp;gt;wined3d)
         return FALSE;
     d3d9-&amp;gt;extended = extended;
 
&lt;/pre&gt;</description>
    <dc:creator>Henri Verbeet</dc:creator>
    <dc:date>2012-05-25T14:10:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105976">
    <title>[PATCH 4/5] d3d9: Add a separate function for d3d9 initialization.</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105976</link>
    <description>&lt;pre&gt;---
 dlls/d3d9/d3d9_main.c    |   58 +++++++++++++++++++++++++++------------------
 dlls/d3d9/d3d9_private.h |   14 +----------
 dlls/d3d9/directx.c      |   18 ++++++++++++-
 3 files changed, 52 insertions(+), 38 deletions(-)

diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
index 6eed9b7..e3bb9f8 100644
--- a/dlls/d3d9/d3d9_main.c
+++ b/dlls/d3d9/d3d9_main.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -33,40 +33,52 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void WINAPI DebugSetMute(void) {
     /* nothing to do */
 }
 
-IDirect3D9* WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT SDKVersion) {
-    IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl));
-
-    object-&amp;gt;IDirect3D9Ex_iface.lpVtbl = &amp;amp;Direct3D9_Vtbl;
-    object-&amp;gt;ref = 1;
+IDirect3D9 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT sdk_version)
+{
+    IDirect3D9Impl *object;
 
-    wined3d_mutex_lock();
-    object-&amp;gt;WineD3D = wined3d_create(9, 0);
-    wined3d_mutex_unlock();
+    TRACE("sdk_version %#x.\n", sdk_version);
 
-    TRACE("SDKVersion = %x, Created Direct3D object &amp;lt; at &amp;gt; %p, WineObj &amp;lt; at &amp;gt; %p\n", SDKVersion, object, object-&amp;gt;WineD3D);
+    if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
+    {
+        ERR("Failed to allocate d3d9 object memory.\n");
+        return NULL;
+    }
 
-    if (!object-&amp;gt;WineD3D)
+    if (!d3d9_init(object, FALSE))
     {
-        HeapFree( GetProcessHeap(), 0, object );
-        object = NULL;
+        WARN("Failed to initialize d3d9.\n");
+        HeapFree(GetProcessHeap(), 0, object);
+        return NULL;
     }
-    return (IDirect3D9*) object;
+
+    TRACE("Created d3d9 object %p.\n", object);
+
+    return (IDirect3D9 *)&amp;amp;object-&amp;gt;IDirect3D9Ex_iface;
 }
 
-HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT SDKVersion, IDirect3D9Ex **direct3d9ex) {
-    IDirect3D9 *ret;
-    IDirect3D9Impl* object;
+HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9Ex **d3d9ex)
+{
+    IDirect3D9Impl *object;
 
-    TRACE("Calling Direct3DCreate9\n");
-    ret = Direct3DCreate9(SDKVersion);
-    if(!ret) {
-        *direct3d9ex = NULL;
+    TRACE("sdk_version %#x, d3d9ex %p.\n", sdk_version, d3d9ex);
+
+    if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
+    {
+        ERR("Failed to allocate d3d9 object memory.\n");
+        return E_OUTOFMEMORY;
+    }
+
+    if (!d3d9_init(object, TRUE))
+    {
+        WARN("Failed to initialize d3d9.\n");
+        HeapFree(GetProcessHeap(), 0, object);
         return D3DERR_NOTAVAILABLE;
     }
 
-    object = (IDirect3D9Impl *) ret;
-    object-&amp;gt;extended = TRUE; /* Enables QI for extended interfaces */
-    *direct3d9ex = &amp;amp;object-&amp;gt;IDirect3D9Ex_iface;
+    TRACE("Created d3d9 object %p.\n", object);
+    *d3d9ex = &amp;amp;object-&amp;gt;IDirect3D9Ex_iface;
+
     return D3D_OK;
 }
 
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index d814dd0..793c948 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -127,19 +127,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_H
     _pD3D9Caps-&amp;gt;MaxVertexShader30InstructionSlots = _pWineCaps-&amp;gt;MaxVertexShader30InstructionSlots; \
     _pD3D9Caps-&amp;gt;MaxPixelShader30InstructionSlots  = _pWineCaps-&amp;gt;MaxPixelShader30InstructionSlots;
 
-/* ===========================================================================
-    D3D9 interfaces
-   =========================================================================== */
-
-/* ---------- */
-/* IDirect3D9 */
-/* ---------- */
-
-/*****************************************************************************
- * Predeclare the interface implementation structures
- */
-extern const IDirect3D9ExVtbl Direct3D9_Vtbl DECLSPEC_HIDDEN;
-
 /*****************************************************************************
  * IDirect3D implementation structure
  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -155,6 +142,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct IDirect3D9Impl
     BOOL                    extended;
 } IDirect3D9Impl;
 
+BOOL d3d9_init(IDirect3D9Impl *d3d9, BOOL extended) DECLSPEC_HIDDEN;
 void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN;
 
 struct fvf_declaration
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index d8a5d78..80b862d 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -551,8 +551,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT
     return hr;
 }
 
-
-const IDirect3D9ExVtbl Direct3D9_Vtbl =
+static const struct IDirect3D9ExVtbl Direct3D9_Vtbl =
 {
     /* IUnknown */
     IDirect3D9Impl_QueryInterface,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -581,3 +580,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; const IDirect3D9ExVtbl Direct3D9_Vtbl =
     IDirect3D9ExImpl_GetAdapterLUID
 
 };
+
+BOOL d3d9_init(IDirect3D9Impl *d3d9, BOOL extended)
+{
+    d3d9-&amp;gt;IDirect3D9Ex_iface.lpVtbl = &amp;amp;Direct3D9_Vtbl;
+    d3d9-&amp;gt;ref = 1;
+
+    wined3d_mutex_lock();
+    d3d9-&amp;gt;WineD3D = wined3d_create(9, 0);
+    wined3d_mutex_unlock();
+    if (!d3d9-&amp;gt;WineD3D)
+        return FALSE;
+    d3d9-&amp;gt;extended = extended;
+
+    return TRUE;
+}
&lt;/pre&gt;</description>
    <dc:creator>Henri Verbeet</dc:creator>
    <dc:date>2012-05-25T14:10:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.emulators.wine.patches/105975">
    <title>[PATCH 2/5] d3d9: Get rid of the D3D_DECL_* macros.</title>
    <link>http://comments.gmane.org/gmane.comp.emulators.wine.patches/105975</link>
    <description>&lt;pre&gt;---
 dlls/d3d9/vertexdeclaration.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c
index 679f010..2d31dd7 100644
--- a/dlls/d3d9/vertexdeclaration.c
+++ b/dlls/d3d9/vertexdeclaration.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,8 +27,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
 static const struct
 {
     enum wined3d_format_id format;
-    int         size;
-    int         typesize;
+    unsigned int component_count;
+    unsigned int component_size;
 }
 d3d_dtype_lookup[] =
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,9 +51,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; d3d_dtype_lookup[] =
     /* D3DDECLTYPE_FLOAT16_4 */ {WINED3DFMT_R16G16B16A16_FLOAT, 4, sizeof(short int)}
 };
 
-#define D3D_DECL_SIZE(type)          d3d_dtype_lookup[type].size
-#define D3D_DECL_TYPESIZE(type)      d3d_dtype_lookup[type].typesize
-
 static inline IDirect3DVertexDeclaration9Impl *impl_from_IDirect3DVertexDeclaration9(IDirect3DVertexDeclaration9 *iface)
 {
     return CONTAINING_RECORD(iface, IDirect3DVertexDeclaration9Impl, IDirect3DVertexDeclaration9_iface);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -192,7 +189,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; HRESULT vdecl_convert_fvf(
         elements[idx].Stream = 0;
         elements[idx].Method = D3DDECLMETHOD_DEFAULT;
         elements[idx].Offset = offset;
-        offset += D3D_DECL_SIZE(elements[idx].Type) * D3D_DECL_TYPESIZE(elements[idx].Type);
+        offset += d3d_dtype_lookup[elements[idx].Type].component_count
+                * d3d_dtype_lookup[elements[idx].Type].component_size;
     }
 
     *ppVertexElements = elements;
&lt;/pre&gt;</description>
    <dc:creator>Henri Verbeet</dc:creator>
    <dc:date>2012-05-25T14:10:28</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.emulators.wine.patches">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.emulators.wine.patches</link>
  </textinput>
</rdf:RDF>

