gsdx: really close the windows when closing/shutdown emulation

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4422 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2011-03-12 22:38:07 +00:00
parent b2254a7937
commit 0f2e588ba2
2 changed files with 13 additions and 1 deletions

View File

@ -321,6 +321,18 @@ GSWnd::~GSWnd()
if(m_window != NULL) if(m_window != NULL)
{ {
SDL_DestroyWindow(m_window); SDL_DestroyWindow(m_window);
m_window = NULL;
}
}
// Actually the destructor is not called when there is a GSclose or GSshutdown
// The window still need to be closed
void GSWnd::Detach()
{
if(m_window != NULL)
{
SDL_DestroyWindow(m_window);
m_window = NULL;
} }
} }

View File

@ -101,7 +101,7 @@ public:
bool Create(const string& title, int w, int h); bool Create(const string& title, int w, int h);
bool Attach(void* handle, bool managed = true) {return false;} bool Attach(void* handle, bool managed = true) {return false;}
void Detach() {} void Detach();
bool IsManaged() const {return true;} bool IsManaged() const {return true;}
Display* GetDisplay(); Display* GetDisplay();