From 743e93f3eec03f5f7bdfc7e4847be2438e5f1d38 Mon Sep 17 00:00:00 2001 From: gabest11 Date: Sat, 6 Jun 2009 10:11:22 +0000 Subject: [PATCH] GSdx: should fix Issue 263, but I could not verify it git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1338 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSRenderer.cpp | 2 +- plugins/GSdx/GSTexture.h | 2 ++ plugins/GSdx/GSTexture10.h | 1 + plugins/GSdx/GSTexture7.h | 1 + plugins/GSdx/GSTexture9.h | 3 +-- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index cd2dfc679a..1391efcd21 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -243,7 +243,7 @@ bool GSRenderer::Merge(int field) int field2 = 1 - ((m_interlace - 1) & 1); int mode = (m_interlace - 1) >> 1; - m_dev->Interlace(ds, field ^ field2, mode, tex[1]->m_scale.y); + m_dev->Interlace(ds, field ^ field2, mode, tex[1] ? tex[1]->m_scale.y : tex[0]->m_scale.y); } } diff --git a/plugins/GSdx/GSTexture.h b/plugins/GSdx/GSTexture.h index 26de1ca667..a85199a8f9 100644 --- a/plugins/GSdx/GSTexture.h +++ b/plugins/GSdx/GSTexture.h @@ -35,10 +35,12 @@ public: enum {None, RenderTarget, DepthStencil, Texture, Offscreen}; virtual operator bool() = 0; + virtual int GetType() const = 0; virtual int GetWidth() const = 0; virtual int GetHeight() const = 0; virtual int GetFormat() const = 0; + virtual bool Update(const GSVector4i& r, const void* data, int pitch) = 0; virtual bool Map(uint8** bits, int& pitch, const GSVector4i* r = NULL) = 0; virtual void Unmap() = 0; diff --git a/plugins/GSdx/GSTexture10.h b/plugins/GSdx/GSTexture10.h index a74b0ee8ac..5c8418ae6a 100644 --- a/plugins/GSdx/GSTexture10.h +++ b/plugins/GSdx/GSTexture10.h @@ -41,6 +41,7 @@ public: int GetWidth() const; int GetHeight() const; int GetFormat() const; + bool Update(const GSVector4i& r, const void* data, int pitch); bool Map(uint8** bits, int& pitch, const GSVector4i* r); void Unmap(); diff --git a/plugins/GSdx/GSTexture7.h b/plugins/GSdx/GSTexture7.h index 99c1c73b65..8eb64d730c 100644 --- a/plugins/GSdx/GSTexture7.h +++ b/plugins/GSdx/GSTexture7.h @@ -41,6 +41,7 @@ public: int GetWidth() const; int GetHeight() const; int GetFormat() const; + bool Update(const GSVector4i& r, const void* data, int pitch); bool Map(uint8** bits, int& pitch, const GSVector4i* r); void Unmap(); diff --git a/plugins/GSdx/GSTexture9.h b/plugins/GSdx/GSTexture9.h index 5ee23c9370..3f42c46bb1 100644 --- a/plugins/GSdx/GSTexture9.h +++ b/plugins/GSdx/GSTexture9.h @@ -41,13 +41,12 @@ public: int GetWidth() const; int GetHeight() const; int GetFormat() const; + bool Update(const GSVector4i& r, const void* data, int pitch); bool Map(uint8** bits, int& pitch, const GSVector4i* r); void Unmap(); bool Save(const string& fn, bool dds = false); - //IDirect3DTexture9* operator->(); // TODO: remove direct access - operator IDirect3DSurface9*(); operator IDirect3DTexture9*(); };