summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-16 17:28:29 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-16 17:28:29 +0300
commitfbe0f1c2b139842235446c9a6c6933562ce3dfa2 (patch)
treeb6e9a90bdd706f2e8e81aa5aaf738692df382351 /src
parentba9fac97eb0afba27e7d35bef34255c8ac436295 (diff)
downloadManaVerse-fbe0f1c2b139842235446c9a6c6933562ce3dfa2.tar.gz
ManaVerse-fbe0f1c2b139842235446c9a6c6933562ce3dfa2.tar.bz2
ManaVerse-fbe0f1c2b139842235446c9a6c6933562ce3dfa2.tar.xz
ManaVerse-fbe0f1c2b139842235446c9a6c6933562ce3dfa2.zip
add init and quit code for SDL_Image and SDL_Mixer.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bec85f4c8..68d81eda0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -48,6 +48,9 @@
#include <windows.h>
#endif
+#include <SDL_image.h>
+#include <SDL_mixer.h>
+
#include "debug.h"
char *selfName = nullptr;
@@ -292,6 +295,8 @@ int main(int argc, char *argv[])
atexit((void(*)()) PHYSFS_deinit);
XML::initXML();
+ IMG_Init(IMG_INIT_PNG);
+ Mix_Init(MIX_INIT_OGG);
#ifdef WIN32
SetCurrentDirectory(PhysFs::getBaseDir());
@@ -311,6 +316,10 @@ int main(int argc, char *argv[])
}
delete client;
client = nullptr;
+
+ Mix_Quit();
+ IMG_Quit();
+
#ifdef DUMP_LEAKED_RESOURCES
reportRWops();
#endif