From 2ed180d7c010f5aa12e9ca2214170bba32cf909c Mon Sep 17 00:00:00 2001 From: gabest11 Date: Sat, 4 Jul 2009 23:52:58 +0000 Subject: [PATCH] GSdx: last commit broke the sw renderer, the compiler seems to misalign the "this" pointer for member callbacks when two base classes have virtual destructors at the same time (or just virtual members, didn't test it). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1467 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSAlignedClass.h | 3 ++- plugins/GSdx/GSTextureFX.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSAlignedClass.h b/plugins/GSdx/GSAlignedClass.h index ec33030892..e17e36159e 100644 --- a/plugins/GSdx/GSAlignedClass.h +++ b/plugins/GSdx/GSAlignedClass.h @@ -25,7 +25,8 @@ template class GSAlignedClass { public: GSAlignedClass() {} - virtual ~GSAlignedClass() {} + + // never put a destructor here, breaks the member callbacks of GSDrawScanline which also inherits IDrawScanline void* operator new (size_t size) { diff --git a/plugins/GSdx/GSTextureFX.h b/plugins/GSdx/GSTextureFX.h index b3b3dcf692..dd7c23773d 100644 --- a/plugins/GSdx/GSTextureFX.h +++ b/plugins/GSdx/GSTextureFX.h @@ -248,6 +248,7 @@ protected: public: GSTextureFX(); + virtual ~GSTextureFX() {} virtual bool Create(GSDevice* dev);