Disable message queue in no graphics too

This commit is contained in:
Benau 2018-09-11 14:35:07 +08:00
parent 8bb2eeb629
commit ade3551c16

View File

@ -24,6 +24,7 @@
#include "guiengine/engine.hpp"
#include "guiengine/scalable_font.hpp"
#include "guiengine/skin.hpp"
#include "modes/profile_world.hpp"
#include "utils/synchronised.hpp"
#include "utils/translation.hpp"
@ -293,6 +294,8 @@ void updatePosition()
void add(MessageType mt, const irr::core::stringw &message)
{
#ifndef SERVER_ONLY
if (ProfileWorld::isNoGraphics())
return;
Message *m = new TextMessage(mt, message);
privateAdd(m);
#endif
@ -308,6 +311,9 @@ void add(MessageType mt, const irr::core::stringw &message)
void update(float dt)
{
#ifndef SERVER_ONLY
if (ProfileWorld::isNoGraphics())
return;
if (!g_container)
g_container = new SkinWidgetContainer();
@ -341,6 +347,9 @@ void update(float dt)
void showProgressBar(int progress, const wchar_t* msg)
{
#ifndef SERVER_ONLY
if (ProfileWorld::isNoGraphics())
return;
g_progress_bar_msg.setProgress(progress, msg);
#endif
} // showProgressBar