diff options
Diffstat (limited to 'src/blitter')
-rw-r--r-- | src/blitter/factory.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp index beb35cba5..3e7fc954a 100644 --- a/src/blitter/factory.hpp +++ b/src/blitter/factory.hpp @@ -4,6 +4,7 @@ #define BLITTER_FACTORY_HPP #include "base.hpp" +#include "../string.h" #include <string> #include <map> @@ -61,12 +62,15 @@ public: */ static Blitter *SelectBlitter(const char *name) { + const char *default_blitter = "8bpp-optimized"; + if (GetBlitters().size() == 0) return NULL; + const char *bname = (StrEmpty(name)) ? default_blitter : name; Blitters::iterator it = GetBlitters().begin(); for (; it != GetBlitters().end(); it++) { BlitterFactoryBase *b = (*it).second; - if (strcasecmp(name, b->name) == 0) { + if (strcasecmp(bname, b->name) == 0) { Blitter *newb = b->CreateInstance(); delete *GetActiveBlitter(); *GetActiveBlitter() = newb; |