From d93dc23e77b84b2e4a4cb31e7479b28c2bae1f88 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sun, 6 Feb 2011 15:02:26 +0000 Subject: [PATCH] Modal dialogs must be closed with EndModal() or all kinds of weird corruption can happen with wx 2.9. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7092 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp | 3 +-- Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h | 6 +++--- .../Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.cpp | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp index 275e88e77e..a5427df995 100644 --- a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp +++ b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp @@ -1,4 +1,3 @@ - #include "VideoConfigDiag.h" #include "FileUtil.h" @@ -51,7 +50,7 @@ void SettingChoice::UpdateValue(wxCommandEvent& ev) void VideoConfigDiag::Event_ClickClose(wxCommandEvent&) { - Close(); + EndModal(wxID_OK); } void VideoConfigDiag::Event_Close(wxCloseEvent& ev) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp index bc7893cd33..5eae3626bd 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp @@ -93,7 +93,7 @@ bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int he TextureCache::TCacheEntry::~TCacheEntry() { - if (texture) + if (texture) { glDeleteTextures(1, &texture); texture = 0; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h index a842d1f1ec..a835da798c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h @@ -36,8 +36,8 @@ public: private: struct TCacheEntry : TCacheEntryBase - { - GLuint texture; + { + GLuint texture; PC_TexFormat pcfmt; @@ -65,7 +65,7 @@ private: private: void SetTextureParameters(const TexMode0 &newmode, const TexMode1 &newmode1); - }; + }; ~TextureCache(); diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.cpp index 3e12af96c9..6bdea7c288 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/VideoConfigDialog.cpp @@ -132,7 +132,7 @@ VideoConfigDialog::VideoConfigDialog(wxWindow* parent, const std::string& title, void VideoConfigDialog::Event_ClickClose(wxCommandEvent&) { - Close(); + EndModal(wxID_OK); } void VideoConfigDialog::Event_Close(wxCloseEvent& ev)