diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 2c0cc20a..da889f9c 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -1256,7 +1256,6 @@ void GameArea::OnIdle(wxIdleEvent& event) if (panel->d3dframe != NULL) { panel->d3dframe->Bind(VBAM_EVT_USER_INPUT, &GameArea::OnUserInput, this); - panel->d3dframe->Bind(wxEVT_CLOSE_WINDOW, &GameArea::OnD3DClose, this); } // set up event handlers @@ -1412,14 +1411,6 @@ static Display* GetX11Display() { } #endif // __WXGTK__ -void GameArea::OnD3DClose(wxCloseEvent& ev) -{ - (void)ev; - - delete panel->d3dframe; - panel->d3dframe = NULL; -} - void GameArea::OnUserInput(widgets::UserInputEvent& event) { bool emulated_key_pressed = false; for (const auto& event_data : event.data()) { @@ -2319,9 +2310,6 @@ SDLDrawingPanel::~SDLDrawingPanel() { if (did_init) { - if (d3dframe != NULL) - delete d3dframe; - if (sdlwindow != NULL) SDL_DestroyWindow(sdlwindow); diff --git a/src/wx/wxvbam.h b/src/wx/wxvbam.h index 76b96c4a..999219d0 100644 --- a/src/wx/wxvbam.h +++ b/src/wx/wxvbam.h @@ -546,7 +546,6 @@ protected: void EraseBackground(wxEraseEvent& ev); void OnSize(wxSizeEvent& ev); void OnKillFocus(wxFocusEvent& ev); - void OnD3DClose(wxCloseEvent& ev); #ifndef NO_FFMPEG recording::MediaRecorder snd_rec, vid_rec;