diff --git a/src/filters/filter_factory.cpp b/src/filters/filter_factory.cpp index 84fc8fc2..bca4fbef 100644 --- a/src/filters/filter_factory.cpp +++ b/src/filters/filter_factory.cpp @@ -71,11 +71,17 @@ static int GetFilterScale(std::string filterName) filter_base * filter_factory::createFilter(std::string filterName,unsigned int width,unsigned int height) { - // Initialize the filters - // This is the best place to do this, even if they aren't ever used + // Initialize the two special filters // \HACK: Shouldn't have to initialize anything - hq2x_init(32); - Init_2xSaI(32); + // \WARNING: These functions may cause the program to hang on exit + if("HQ 2x" == filterName) + { + hq2x_init(32); + } + if("2xSaI" == filterName) + { + Init_2xSaI(32); + } //Search the raw filters first std::map::const_iterator found = filterMap.find(filterName); diff --git a/src/filters/multifilter.cpp b/src/filters/multifilter.cpp index d970725b..92a7fa38 100644 --- a/src/filters/multifilter.cpp +++ b/src/filters/multifilter.cpp @@ -51,12 +51,12 @@ multifilter::~multifilter() unsigned int multifilter::getOutX() { - filterPtrs.back()->getOutWidth(); + return filterPtrs.back()->getOutWidth(); } unsigned int multifilter::getOutY() { - filterPtrs.back()->getOutHeight(); + return filterPtrs.back()->getOutHeight(); } void multifilter::setInImage(u32 *image)