src/blitter/factory.hpp
changeset 8064 d850cf8f90de
parent 8063 0e907a0b5add
child 8547 41d5e08fff3b
equal deleted inserted replaced
8063:0e907a0b5add 8064:d850cf8f90de
     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 	}