SDL: Move destruction into base

This commit is contained in:
Dave Vasilevsky 2013-04-22 05:28:22 -04:00
parent fed95369d1
commit 2a5100e8d2

View File

@ -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