0ad/source/tools/atlas/GameInterface/MessagePasserImpl.cpp
Ykkrosh cf37e9cbe6 Atlas: Added a button. Reorganised game<->UI communication system.
main.cpp: Allowed correct operation when not calling Init/Shutdown.
Game.cpp: Stopped complaint when starting game with no GUI.

This was SVN commit r2446.
2005-06-27 23:04:34 +00:00

40 lines
553 B
C++

#include "precompiled.h"
#include "MessagePasserImpl.h"
using namespace AtlasMessage;
void MessagePasserImpl::Add(IMessage* msg)
{
m_Mutex.Lock();
m_Queue.push(msg);
m_Mutex.Unlock();
}
IMessage* MessagePasserImpl::Retrieve()
{
m_Mutex.Lock();
IMessage* msg = NULL;
if (! m_Queue.empty())
{
msg = m_Queue.front();
m_Queue.pop();
}
m_Mutex.Unlock();
return msg;
}
void MessagePasserImpl::Query(IMessage&)
{
}
void MessagePasserImpl::QueryDone()
{
}
MessagePasser* g_MessagePasser = NULL;