mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-14 15:06:53 +02:00
Removed debug code for font cache and text component.
This commit is contained in:
@@ -84,12 +84,6 @@ void Text::Draw()
|
|||||||
rect.h = static_cast<int>(h);
|
rect.h = static_cast<int>(h);
|
||||||
rect.w = static_cast<int>(w);
|
rect.w = static_cast<int>(w);
|
||||||
rect.y = static_cast<int>(yOrigin);
|
rect.y = static_cast<int>(yOrigin);
|
||||||
/*
|
|
||||||
std::stringstream ss;
|
|
||||||
ss << " cx:" << charRect.x << " cy:" << charRect.y << " cw:" << charRect.w << " ch:" << charRect.h;
|
|
||||||
ss << " x:" << rect.x << " y:" << rect.y << " w:" << rect.w << " h:" << rect.h;
|
|
||||||
Logger::Write(Logger::ZONE_DEBUG, "Text", ss.str());
|
|
||||||
*/
|
|
||||||
|
|
||||||
SDL_LockMutex(SDL::GetMutex());
|
SDL_LockMutex(SDL::GetMutex());
|
||||||
SDL_SetTextureColorMod(t, FontColor.r, FontColor.g, FontColor.b);
|
SDL_SetTextureColorMod(t, FontColor.r, FontColor.g, FontColor.b);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
//todo: memory leak when launching games
|
//todo: memory leak when launching games
|
||||||
FontCache::FontCache()
|
FontCache::FontCache()
|
||||||
: IsInitialized(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +20,6 @@ FontCache::~FontCache()
|
|||||||
|
|
||||||
void FontCache::DeInitialize()
|
void FontCache::DeInitialize()
|
||||||
{
|
{
|
||||||
IsInitialized = false;
|
|
||||||
std::map<std::string, Font *>::iterator it = FontFaceMap.begin();
|
std::map<std::string, Font *>::iterator it = FontFaceMap.begin();
|
||||||
while(it != FontFaceMap.end())
|
while(it != FontFaceMap.end())
|
||||||
{
|
{
|
||||||
@@ -40,7 +38,6 @@ void FontCache::Initialize()
|
|||||||
{
|
{
|
||||||
//todo: make bool
|
//todo: make bool
|
||||||
TTF_Init();
|
TTF_Init();
|
||||||
IsInitialized = true;
|
|
||||||
}
|
}
|
||||||
Font *FontCache::GetFont(std::string fontPath)
|
Font *FontCache::GetFont(std::string fontPath)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ public:
|
|||||||
|
|
||||||
virtual ~FontCache();
|
virtual ~FontCache();
|
||||||
private:
|
private:
|
||||||
bool IsInitialized;
|
|
||||||
|
|
||||||
std::map<std::string, Font *> FontFaceMap;
|
std::map<std::string, Font *> FontFaceMap;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user