From 2a5100e8d24f1e2f7568846147bb34083204289a Mon Sep 17 00:00:00 2001 From: Dave Vasilevsky Date: Mon, 22 Apr 2013 05:28:22 -0400 Subject: [PATCH] SDL: Move destruction into base --- BasiliskII/src/SDL/video_sdl.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index c6323afd..e17597e3 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -638,7 +638,6 @@ class driver_window : public driver_base { public: driver_window(SDL_monitor_desc &monitor); virtual void init(); - ~driver_window(); void toggle_mouse_grab(void); @@ -650,7 +649,6 @@ class driver_fullscreen : public driver_base { public: driver_fullscreen(SDL_monitor_desc &monitor); virtual void init(); - ~driver_fullscreen(); }; static driver_base *drv = NULL; // Pointer to currently used driver object @@ -775,6 +773,8 @@ driver_base::~driver_base() video_vosf_exit(); } #endif + + SDL_ShowCursor(1); } // Palette has changed @@ -822,13 +822,6 @@ void driver_window::init() driver_base::init(); } -// Close display -driver_window::~driver_window() -{ - if (s) - SDL_FreeSurface(s); -} - // Toggle mouse grab void driver_window::toggle_mouse_grab(void) { @@ -889,16 +882,6 @@ void driver_fullscreen::init() driver_base::init(); } -// Close display -driver_fullscreen::~driver_fullscreen() -{ - if (s) - SDL_FreeSurface(s); - - // Show cursor - SDL_ShowCursor(1); -} - /* * Initialization