fully implement lua

This commit is contained in:
Lion Kortlepel
2021-02-16 12:03:23 +01:00
committed by Anonymous275
parent 459814a6ec
commit 4cda6e8bc3
12 changed files with 252 additions and 234 deletions

View File

@@ -1,18 +1,18 @@
#include "Common.h"
#include "TConsole.h"
std::unique_ptr<TConsole> Application::_Console = std::make_unique<TConsole>();
std::unique_ptr<TConsole> Application::mConsole = std::make_unique<TConsole>();
void Application::RegisterShutdownHandler(const TShutdownHandler& Handler) {
std::unique_lock Lock(_ShutdownHandlersMutex);
std::unique_lock Lock(mShutdownHandlersMutex);
if (Handler) {
_ShutdownHandlers.push_back(Handler);
mShutdownHandlers.push_back(Handler);
}
}
void Application::GracefullyShutdown() {
std::unique_lock Lock(_ShutdownHandlersMutex);
for (auto& Handler : _ShutdownHandlers) {
std::unique_lock Lock(mShutdownHandlersMutex);
for (auto& Handler : mShutdownHandlers) {
Handler();
}
}