Index: ddraw/glDirect3D.cpp |
— | — | @@ -147,6 +147,12 @@ |
148 | 148 | {
|
149 | 149 | if(!this) return DDERR_INVALIDPARAMS;
|
150 | 150 | if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 151 | + if(riid == IID_IUnknown)
|
| 152 | + {
|
| 153 | + this->AddRef();
|
| 154 | + *ppvObj = this;
|
| 155 | + return D3D_OK;
|
| 156 | + }
|
151 | 157 | FIXME("glDirect3D7::QueryInterface: stub");
|
152 | 158 | return E_NOINTERFACE;
|
153 | 159 | }
|
Index: ddraw/glDirect3DDevice.cpp |
— | — | @@ -263,6 +263,12 @@ |
264 | 264 | {
|
265 | 265 | if(!this) return DDERR_INVALIDPARAMS;
|
266 | 266 | if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 267 | + if(riid == IID_IUnknown)
|
| 268 | + {
|
| 269 | + this->AddRef();
|
| 270 | + *ppvObj = this;
|
| 271 | + return D3D_OK;
|
| 272 | + }
|
267 | 273 | ERR(E_NOINTERFACE);
|
268 | 274 | }
|
269 | 275 |
|
Index: ddraw/glDirect3DLight.cpp |
— | — | @@ -66,6 +66,12 @@ |
67 | 67 | {
|
68 | 68 | if(!this) return DDERR_INVALIDPARAMS;
|
69 | 69 | if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 70 | + if(riid == IID_IUnknown)
|
| 71 | + {
|
| 72 | + this->AddRef();
|
| 73 | + *ppvObj = this;
|
| 74 | + return D3D_OK;
|
| 75 | + }
|
70 | 76 | return E_NOINTERFACE;
|
71 | 77 | }
|
72 | 78 |
|
Index: ddraw/glDirectDraw.cpp |
— | — | @@ -602,6 +602,12 @@ |
603 | 603 | {
|
604 | 604 | if(!this) return DDERR_INVALIDPARAMS;
|
605 | 605 | if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 606 | + if(riid == IID_IUnknown)
|
| 607 | + {
|
| 608 | + this->AddRef();
|
| 609 | + *ppvObj = this;
|
| 610 | + return DD_OK;
|
| 611 | + }
|
606 | 612 | if(riid == IID_IDirectDraw)
|
607 | 613 | {
|
608 | 614 | // Create an IDirectDraw1 interface
|
— | — | @@ -1426,6 +1432,12 @@ |
1427 | 1433 | HRESULT WINAPI glDirectDraw1::QueryInterface(REFIID riid, void** ppvObj)
|
1428 | 1434 | {
|
1429 | 1435 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1436 | + if(riid == IID_IUnknown)
|
| 1437 | + {
|
| 1438 | + this->AddRef();
|
| 1439 | + *ppvObj = this;
|
| 1440 | + return DD_OK;
|
| 1441 | + }
|
1430 | 1442 | return glDD7->QueryInterface(riid,ppvObj);
|
1431 | 1443 | }
|
1432 | 1444 | ULONG WINAPI glDirectDraw1::AddRef()
|
— | — | @@ -1568,6 +1580,12 @@ |
1569 | 1581 | HRESULT WINAPI glDirectDraw2::QueryInterface(REFIID riid, void** ppvObj)
|
1570 | 1582 | {
|
1571 | 1583 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1584 | + if(riid == IID_IUnknown)
|
| 1585 | + {
|
| 1586 | + this->AddRef();
|
| 1587 | + *ppvObj = this;
|
| 1588 | + return DD_OK;
|
| 1589 | + }
|
1572 | 1590 | return glDD7->QueryInterface(riid,ppvObj);
|
1573 | 1591 | }
|
1574 | 1592 | ULONG WINAPI glDirectDraw2::AddRef()
|
— | — | @@ -1720,6 +1738,12 @@ |
1721 | 1739 | HRESULT WINAPI glDirectDraw4::QueryInterface(REFIID riid, void** ppvObj)
|
1722 | 1740 | {
|
1723 | 1741 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1742 | + if(riid == IID_IUnknown)
|
| 1743 | + {
|
| 1744 | + this->AddRef();
|
| 1745 | + *ppvObj = this;
|
| 1746 | + return DD_OK;
|
| 1747 | + }
|
1724 | 1748 | return glDD7->QueryInterface(riid,ppvObj);
|
1725 | 1749 | }
|
1726 | 1750 | ULONG WINAPI glDirectDraw4::AddRef()
|
Index: ddraw/glDirectDrawClipper.cpp |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | // DXGL
|
3 | | -// Copyright (C) 2011 William Feely
|
| 3 | +// Copyright (C) 2011-2012 William Feely
|
4 | 4 |
|
5 | 5 | // This library is free software; you can redistribute it and/or
|
6 | 6 | // modify it under the terms of the GNU Lesser General Public
|
— | — | @@ -39,6 +39,12 @@ |
40 | 40 | {
|
41 | 41 | if(!this) return DDERR_INVALIDPARAMS;
|
42 | 42 | if(!obp) return DDERR_INVALIDPARAMS;
|
| 43 | + if(riid == IID_IUnknown)
|
| 44 | + {
|
| 45 | + this->AddRef();
|
| 46 | + *obp = this;
|
| 47 | + return DD_OK;
|
| 48 | + }
|
43 | 49 | if(riid == IID_IDirectDrawClipper)
|
44 | 50 | {
|
45 | 51 | *obp = this;
|
Index: ddraw/glDirectDrawPalette.cpp |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | // DXGL
|
3 | | -// Copyright (C) 2011 William Feely
|
| 3 | +// Copyright (C) 2011-2012 William Feely
|
4 | 4 |
|
5 | 5 | // This library is free software; you can redistribute it and/or
|
6 | 6 | // modify it under the terms of the GNU Lesser General Public
|
— | — | @@ -117,6 +117,12 @@ |
118 | 118 | {
|
119 | 119 | if(!this) return DDERR_INVALIDPARAMS;
|
120 | 120 | if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 121 | + if(riid == IID_IUnknown)
|
| 122 | + {
|
| 123 | + this->AddRef();
|
| 124 | + *ppvObj = this;
|
| 125 | + return DD_OK;
|
| 126 | + }
|
121 | 127 | ERR(E_NOINTERFACE);
|
122 | 128 | }
|
123 | 129 |
|
Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -444,6 +444,12 @@ |
445 | 445 | {
|
446 | 446 | if(!this) return DDERR_INVALIDPARAMS;
|
447 | 447 | if(!ppvObj) return DDERR_INVALIDPARAMS;
|
| 448 | + if(riid == IID_IUnknown)
|
| 449 | + {
|
| 450 | + this->AddRef();
|
| 451 | + *ppvObj = this;
|
| 452 | + return DD_OK;
|
| 453 | + }
|
448 | 454 | if(riid == IID_IDirectDrawSurface7)
|
449 | 455 | {
|
450 | 456 | this->AddRef();
|
— | — | @@ -1247,6 +1253,12 @@ |
1248 | 1254 | HRESULT WINAPI glDirectDrawSurface1::QueryInterface(REFIID riid, void** ppvObj)
|
1249 | 1255 | {
|
1250 | 1256 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1257 | + if(riid == IID_IUnknown)
|
| 1258 | + {
|
| 1259 | + this->AddRef();
|
| 1260 | + *ppvObj = this;
|
| 1261 | + return DD_OK;
|
| 1262 | + }
|
1251 | 1263 | return glDDS7->QueryInterface(riid,ppvObj);
|
1252 | 1264 | }
|
1253 | 1265 | ULONG WINAPI glDirectDrawSurface1::AddRef()
|
— | — | @@ -1467,6 +1479,12 @@ |
1468 | 1480 | HRESULT WINAPI glDirectDrawSurface2::QueryInterface(REFIID riid, void** ppvObj)
|
1469 | 1481 | {
|
1470 | 1482 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1483 | + if(riid == IID_IUnknown)
|
| 1484 | + {
|
| 1485 | + this->AddRef();
|
| 1486 | + *ppvObj = this;
|
| 1487 | + return DD_OK;
|
| 1488 | + }
|
1471 | 1489 | return glDDS7->QueryInterface(riid,ppvObj);
|
1472 | 1490 | }
|
1473 | 1491 | ULONG WINAPI glDirectDrawSurface2::AddRef()
|
— | — | @@ -1701,6 +1719,12 @@ |
1702 | 1720 | HRESULT WINAPI glDirectDrawSurface3::QueryInterface(REFIID riid, void** ppvObj)
|
1703 | 1721 | {
|
1704 | 1722 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1723 | + if(riid == IID_IUnknown)
|
| 1724 | + {
|
| 1725 | + this->AddRef();
|
| 1726 | + *ppvObj = this;
|
| 1727 | + return DD_OK;
|
| 1728 | + }
|
1705 | 1729 | return glDDS7->QueryInterface(riid,ppvObj);
|
1706 | 1730 | }
|
1707 | 1731 | ULONG WINAPI glDirectDrawSurface3::AddRef()
|
— | — | @@ -1940,6 +1964,12 @@ |
1941 | 1965 | HRESULT WINAPI glDirectDrawSurface4::QueryInterface(REFIID riid, void** ppvObj)
|
1942 | 1966 | {
|
1943 | 1967 | if(!this) return DDERR_INVALIDPARAMS;
|
| 1968 | + if(riid == IID_IUnknown)
|
| 1969 | + {
|
| 1970 | + this->AddRef();
|
| 1971 | + *ppvObj = this;
|
| 1972 | + return DD_OK;
|
| 1973 | + }
|
1944 | 1974 | return glDDS7->QueryInterface(riid,ppvObj);
|
1945 | 1975 | }
|
1946 | 1976 | ULONG WINAPI glDirectDrawSurface4::AddRef()
|