mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-18 18:30:59 +00:00
BASE: Free TTFLibrary singleton on shutdown.
This uses a helper function because TTFLibrary is internal.
This commit is contained in:
parent
6d3927cd7a
commit
b470c9af28
@ -57,6 +57,9 @@
|
||||
|
||||
#include "graphics/cursorman.h"
|
||||
#include "graphics/fontman.h"
|
||||
#ifdef USE_FREETYPE2
|
||||
#include "graphics/fonts/ttf.h"
|
||||
#endif
|
||||
|
||||
#include "backends/keymapper/keymapper.h"
|
||||
|
||||
@ -505,6 +508,9 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
|
||||
MusicManager::destroy();
|
||||
Graphics::CursorManager::destroy();
|
||||
Graphics::FontManager::destroy();
|
||||
#ifdef USE_FREETYPE2
|
||||
Graphics::shutdownTTF();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -70,6 +70,10 @@ private:
|
||||
bool _initialized;
|
||||
};
|
||||
|
||||
void shutdownTTF() {
|
||||
TTFLibrary::destroy();
|
||||
}
|
||||
|
||||
#define g_ttf ::Graphics::TTFLibrary::instance()
|
||||
|
||||
TTFLibrary::TTFLibrary() : _library(), _initialized(false) {
|
||||
|
@ -34,6 +34,8 @@ namespace Graphics {
|
||||
class Font;
|
||||
Font *loadTTFFont(Common::SeekableReadStream &stream, int size, bool monochrome = false, const uint32 *mapping = 0);
|
||||
|
||||
void shutdownTTF();
|
||||
|
||||
} // End of namespace Graphics
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user