mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 03:40:40 +00:00
Merge branch 'no_more_ttf_spam_in_stats' into 'master'
puts an end of error spam when OSG is compiled without Freetype support See merge request OpenMW/openmw!188
This commit is contained in:
commit
9ab6657d8f
@ -8,6 +8,8 @@
|
||||
|
||||
#include <osgText/Text>
|
||||
|
||||
#include <osgDB/Registry>
|
||||
|
||||
#include <osgViewer/Viewer>
|
||||
#include <osgViewer/Renderer>
|
||||
|
||||
@ -32,12 +34,16 @@ StatsHandler::StatsHandler():
|
||||
|
||||
_resourceStatsChildNum = 0;
|
||||
|
||||
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
||||
if (osgDB::Registry::instance()->getReaderWriterForExtension("ttf"))
|
||||
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
||||
}
|
||||
|
||||
Profiler::Profiler()
|
||||
{
|
||||
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
||||
if (osgDB::Registry::instance()->getReaderWriterForExtension("ttf"))
|
||||
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
||||
else
|
||||
_font = "";
|
||||
|
||||
setKeyEventTogglesOnScreenStats(osgGA::GUIEventAdapter::KEY_F3);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user