equal
deleted
inserted
replaced
3 #ifndef BLITTER_FACTORY_HPP |
3 #ifndef BLITTER_FACTORY_HPP |
4 #define BLITTER_FACTORY_HPP |
4 #define BLITTER_FACTORY_HPP |
5 |
5 |
6 #include "base.hpp" |
6 #include "base.hpp" |
7 #include "../string.h" |
7 #include "../string.h" |
|
8 #include "../debug.h" |
8 #include <string> |
9 #include <string> |
9 #include <map> |
10 #include <map> |
10 |
11 |
11 /** |
12 /** |
12 * The base factory, keeping track of all blitters. |
13 * The base factory, keeping track of all blitters. |
72 BlitterFactoryBase *b = (*it).second; |
73 BlitterFactoryBase *b = (*it).second; |
73 if (strcasecmp(bname, b->name) == 0) { |
74 if (strcasecmp(bname, b->name) == 0) { |
74 Blitter *newb = b->CreateInstance(); |
75 Blitter *newb = b->CreateInstance(); |
75 delete *GetActiveBlitter(); |
76 delete *GetActiveBlitter(); |
76 *GetActiveBlitter() = newb; |
77 *GetActiveBlitter() = newb; |
|
78 |
|
79 DEBUG(driver, 1, "Successfully %s blitter '%s'",StrEmpty(name) ? "probed" : "loaded", bname); |
77 return newb; |
80 return newb; |
78 } |
81 } |
79 } |
82 } |
80 return NULL; |
83 return NULL; |
81 } |
84 } |