Skip to content

Commit

Permalink
Remove unnecessary error message when headless rendering is enabled (#…
Browse files Browse the repository at this point in the history
…569)

Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Feb 28, 2022
1 parent 4d4e3db commit a6170b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ogre2/src/Ogre2RenderEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,11 @@ void Ogre2RenderEngine::CreateLogger()
void Ogre2RenderEngine::CreateContext()
{
#if not (__APPLE__ || _WIN32)
if (this->Headless())
{
// Nothing to do
return;
}
// create X11 display
this->dummyDisplay = XOpenDisplay(0);
Display *x11Display = static_cast<Display*>(this->dummyDisplay);
Expand All @@ -391,7 +396,8 @@ void Ogre2RenderEngine::CreateContext()
{
// Not able to create a Xwindow, try to run in headless mode
this->SetHeadless(true);
ignerr << "Unable to open display: " << XDisplayName(0) << std::endl;
ignwarn << "Unable to open display: " << XDisplayName(0)
<< ". Trying to run in headless mode." << std::endl;
return;
}

Expand Down

0 comments on commit a6170b1

Please sign in to comment.