Merge pull request #259 from tomaz82/FreeImage

Support FreeImage as a static library
This commit is contained in:
Jools Wills 2017-10-18 17:41:17 +01:00 committed by GitHub
commit 3f515041df

View file

@ -21,6 +21,7 @@
#include "ScraperCmdLine.h"
#include <sstream>
#include <boost/locale.hpp>
#include <FreeImage.h>
#ifdef WIN32
#include <Windows.h>
@ -222,6 +223,11 @@ int main(int argc, char* argv[])
}
#endif
// call this ONLY when linking with FreeImage as a static library
#ifdef FREEIMAGE_LIB
FreeImage_Initialise();
#endif
//if ~/.emulationstation doesn't exist and cannot be created, bail
if(!verifyHomeFolderExists())
return 1;
@ -384,6 +390,11 @@ int main(int argc, char* argv[])
CollectionSystemManager::deinit();
SystemData::deleteSystems();
// call this ONLY when linking with FreeImage as a static library
#ifdef FREEIMAGE_LIB
FreeImage_DeInitialise();
#endif
LOG(LogInfo) << "EmulationStation cleanly shutting down.";
return 0;