Spectre/Game: Set default log writer.
This commit is contained in:
parent
faed79c653
commit
ba504c7efc
2 changed files with 11 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ class PlatformApplication;
|
|||
|
||||
namespace sp {
|
||||
|
||||
namespace log { class Writer; }
|
||||
|
||||
class Game
|
||||
{
|
||||
public :
|
||||
|
|
@ -54,8 +56,11 @@ private :
|
|||
|
||||
MessageHandler* m_messageHandler;
|
||||
|
||||
log::Writer* m_log_writer;
|
||||
|
||||
FPSCounter m_fpsCounter;
|
||||
|
||||
|
||||
bool m_running;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include <Spectre/Game/GameTime.h>
|
||||
#include <Spectre/Game/FPSCounter.h>
|
||||
#include <Spectre/Input/InputModule.h>
|
||||
#include <Spectre/System/Log.h>
|
||||
#include <Spectre/System/Log/FileWriter.h>
|
||||
#include <Spectre/System/MessageHandler.h>
|
||||
#include <Spectre/System/MessageQueue.h>
|
||||
#include <Spectre/Game.h>
|
||||
|
|
@ -19,6 +21,10 @@ m_running(false)
|
|||
m_graphics = new Graphics(m_platform);
|
||||
m_input = new InputModule(&m_platform->getInput());
|
||||
m_messageHandler = new MessageHandler();
|
||||
|
||||
// Setup log
|
||||
m_log_writer = new log::FileWriter("stdout");
|
||||
Log::setWriter(m_log_writer);
|
||||
}
|
||||
|
||||
Game::~Game()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue