mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-19 23:03:56 -07:00
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.
40 lines
553 B
C++
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;
|