mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-26 04:47:34 +02:00
- made unit testing easier by (mostly) removing the event queue singleton.
- fixed code style in many places (mostly indentation).
This commit is contained in:
parent
13b2649fa0
commit
608074c041
143 changed files with 2220 additions and 2163 deletions
|
@ -30,13 +30,15 @@
|
|||
#include "CArgsBase.h"
|
||||
#include "IEventQueue.h"
|
||||
#include "CEvent.h"
|
||||
#include "CEventQueue.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <conio.h>
|
||||
|
||||
CAppUtilWindows::CAppUtilWindows() :
|
||||
m_exitMode(kExitModeNormal)
|
||||
CAppUtilWindows::CAppUtilWindows(IEventQueue* events) :
|
||||
m_events(events),
|
||||
m_exitMode(kExitModeNormal)
|
||||
{
|
||||
if (SetConsoleCtrlHandler((PHANDLER_ROUTINE)consoleHandler, TRUE) == FALSE)
|
||||
{
|
||||
|
@ -51,7 +53,8 @@ CAppUtilWindows::~CAppUtilWindows()
|
|||
BOOL WINAPI CAppUtilWindows::consoleHandler(DWORD)
|
||||
{
|
||||
LOG((CLOG_INFO "got shutdown signal"));
|
||||
EVENTQUEUE->addEvent(CEvent(CEvent::kQuit));
|
||||
IEventQueue* events = CAppUtil::instance().app().events();
|
||||
events->addEvent(CEvent(CEvent::kQuit));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue