Do SDL quit and free surfaces

This commit is contained in:
simon.kagstrom 2010-01-23 15:16:52 +00:00
parent 112154d17a
commit a98cf4ddd8
3 changed files with 23 additions and 1 deletions

20
gui.cpp
View File

@ -117,6 +117,26 @@ Gui::~Gui()
if (VirtualKeyboard::kbd) if (VirtualKeyboard::kbd)
delete VirtualKeyboard::kbd; delete VirtualKeyboard::kbd;
SDL_FreeSurface(this->bg_left);
SDL_FreeSurface(this->bg_middle);
SDL_FreeSurface(this->bg_right);
SDL_FreeSurface(this->bg_submenu_left);
SDL_FreeSurface(this->bg_submenu_middle);
SDL_FreeSurface(this->bg_submenu_right);
SDL_FreeSurface(this->background);
SDL_FreeSurface(this->main_menu_bg);
SDL_FreeSurface(this->infobox);
SDL_FreeSurface(this->dialogue_bg);
SDL_FreeSurface(this->disc_info);
SDL_FreeSurface(this->textbox);
SDL_FreeSurface(this->selected_key);
SDL_FreeSurface(this->highlighted_key);
if (this->default_font)
delete this->default_font;
if (this->small_font)
delete this->small_font;
} }
bool Gui::setTheme(const char *path) bool Gui::setTheme(const char *path)

View File

@ -63,5 +63,7 @@ int main(int argc, char *argv[])
run(); run();
fini(); fini();
SDL_Quit();
return 0; return 0;
} }

View File

@ -19,7 +19,7 @@ public:
~Font_TTF() ~Font_TTF()
{ {
free(this->font); TTF_CloseFont(this->font);
} }
int getHeight(const char *str) int getHeight(const char *str)