[colobot] 292/377: Add logging in font loading
Didier Raboud
odyx at moszumanska.debian.org
Wed Mar 30 13:34:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 0256b1aa391deaed77e0a6edd7a3e2c788bc0b43
Author: krzys-h <krzys_h at interia.pl>
Date: Thu Feb 18 18:07:29 2016 +0100
Add logging in font loading
---
src/common/resources/sdl_memory_wrapper.cpp | 2 ++
src/graphics/engine/text.cpp | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/common/resources/sdl_memory_wrapper.cpp b/src/common/resources/sdl_memory_wrapper.cpp
index 8d8a857..914d1a0 100644
--- a/src/common/resources/sdl_memory_wrapper.cpp
+++ b/src/common/resources/sdl_memory_wrapper.cpp
@@ -29,6 +29,8 @@
CSDLMemoryWrapper::CSDLMemoryWrapper(const std::string& filename)
: m_rwops(nullptr)
{
+ GetLogger()->Trace("Opening SDL memory wrapper for file '%s'\n", filename.c_str());
+
if (!PHYSFS_isInit())
{
GetLogger()->Error("PHYSFS not initialized!\n");
diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp
index 441e220..4e44fbc 100644
--- a/src/graphics/engine/text.cpp
+++ b/src/graphics/engine/text.cpp
@@ -983,9 +983,10 @@ CachedFont* CText::GetOrOpenFont(FontType font, float size)
auto file = CResourceManager::GetSDLMemoryHandler(mf->fileName);
if (!file->IsOpen())
{
- m_error = std::string("Unable to open file");
+ m_error = std::string("Unable to open file '") + mf->fileName + "' (font size = " + StrUtils::ToString<float>(size) + ")";
return nullptr;
}
+ GetLogger()->Debug("Loaded font file %s (font size = %.1f)\n", mf->fileName.c_str(), size);
auto newFont = MakeUnique<CachedFont>(std::move(file), pointSize);
if (newFont->font == nullptr)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list