Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorvald Natvig <slicer@users.sourceforge.net>2010-03-10 20:03:04 +0300
committerThorvald Natvig <slicer@users.sourceforge.net>2010-03-10 20:03:04 +0300
commit2b6bad6a239069500432ac269d49340ace5eb1f4 (patch)
tree292db30a0380aa74053f92fc64375a115ed759ba /overlay
parentbe5fe492ee9d7ee46e59619c897537ff367480fd (diff)
Flash in browser workaround
Diffstat (limited to 'overlay')
-rw-r--r--overlay/d3d9.cpp5
-rw-r--r--overlay/lib.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/overlay/d3d9.cpp b/overlay/d3d9.cpp
index 3e9768206..85249b582 100644
--- a/overlay/d3d9.cpp
+++ b/overlay/d3d9.cpp
@@ -42,7 +42,7 @@ struct D3DTLVERTEX {
};
static const DWORD D3DFVF_TLVERTEX = D3DFVF_XYZRHW | D3DFVF_TEX1;
-class DevState : protected Pipe {
+class DevState : public Pipe {
public:
IDirect3DDevice9 *dev;
IDirect3DStateBlock9 *pSB;
@@ -429,6 +429,9 @@ static ULONG __stdcall myRelease(IDirect3DDevice9 *idd) {
ds->refCount--;
}
+ if (ds->refCount <= 1)
+ ds->disconnect();
+
if (ds->refCount >= 0)
return ds->refCount + ds->initRefCount;
diff --git a/overlay/lib.h b/overlay/lib.h
index f06b32957..43427f04a 100644
--- a/overlay/lib.h
+++ b/overlay/lib.h
@@ -96,7 +96,6 @@ class Pipe {
HANDLE hMemory;
void release();
- void disconnect();
protected:
unsigned int uiWidth, uiHeight;
unsigned int uiLeft, uiTop, uiRight, uiBottom;
@@ -111,6 +110,8 @@ class Pipe {
virtual void newTexture(unsigned int w, unsigned int h) = 0;
Pipe();
~Pipe();
+ public:
+ void disconnect();
};
extern void checkDXGIHook(bool preonly = false);