Load GUI from XML
This commit is contained in:
11
common.hh
11
common.hh
@@ -141,14 +141,21 @@ enum class VAFormats {
|
||||
// Some helpers to C++11-ify SDL
|
||||
|
||||
struct SDLSurfaceDeleter {
|
||||
void operator()(SDL_Surface* ptr) const
|
||||
{
|
||||
void operator()(SDL_Surface* ptr) const {
|
||||
SDL_FreeSurface(ptr);
|
||||
}
|
||||
};
|
||||
|
||||
using SDLSurfaceUPtr = std::unique_ptr<SDL_Surface, SDLSurfaceDeleter>;
|
||||
|
||||
struct TTFFontDeleter {
|
||||
void operator()(TTF_Font* font) const {
|
||||
TTF_CloseFont(font);
|
||||
}
|
||||
};
|
||||
|
||||
using TTFFontUPtr = std::unique_ptr<TTF_Font, TTFFontDeleter>;
|
||||
|
||||
class SDLSurfaceScopedLock {
|
||||
public:
|
||||
SDLSurfaceScopedLock(SDL_Surface *surf) : surf_(surf) {
|
||||
|
||||
Reference in New Issue
Block a user