fully implement lua

This commit is contained in:
Lion Kortlepel authored and Anonymous275 committed 2021-03-18 23:44:14 +02:00
1 parent 459814a6ec
commit 4cda6e8bc3
12 files changed
+252 -234

No files matched your search

+5 -5
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();
}
}