mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04: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 <osgText/Text>
|
||||||
|
|
||||||
|
#include <osgDB/Registry>
|
||||||
|
|
||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
#include <osgViewer/Renderer>
|
#include <osgViewer/Renderer>
|
||||||
|
|
||||||
@ -32,12 +34,16 @@ StatsHandler::StatsHandler():
|
|||||||
|
|
||||||
_resourceStatsChildNum = 0;
|
_resourceStatsChildNum = 0;
|
||||||
|
|
||||||
|
if (osgDB::Registry::instance()->getReaderWriterForExtension("ttf"))
|
||||||
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
||||||
}
|
}
|
||||||
|
|
||||||
Profiler::Profiler()
|
Profiler::Profiler()
|
||||||
{
|
{
|
||||||
|
if (osgDB::Registry::instance()->getReaderWriterForExtension("ttf"))
|
||||||
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
_font = osgMyGUI::DataManager::getInstance().getDataPath("DejaVuLGCSansMono.ttf");
|
||||||
|
else
|
||||||
|
_font = "";
|
||||||
|
|
||||||
setKeyEventTogglesOnScreenStats(osgGA::GUIEventAdapter::KEY_F3);
|
setKeyEventTogglesOnScreenStats(osgGA::GUIEventAdapter::KEY_F3);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user