Feature/globals handling (#1352)

* Cleaner handling of global state
* Prevent Lua memory corruption (closes #982)
* Initialize glfw first thing to prevent weird joystick loading bug during startup
This commit is contained in:
Alexander Bock
2020-10-21 22:30:05 +02:00
committed by GitHub
parent 1525a0490d
commit efffc25ce0
164 changed files with 1484 additions and 1390 deletions
+3 -3
View File
@@ -100,7 +100,7 @@ void ServerModule::internalInitialize(const ghoul::Dictionary& configuration) {
ServerInterface::createFromDictionary(interfaceDictionary);
if (global::windowDelegate.isMaster()) {
if (global::windowDelegate->isMaster()) {
serverInterface->initialize();
}
@@ -113,7 +113,7 @@ void ServerModule::internalInitialize(const ghoul::Dictionary& configuration) {
}
void ServerModule::preSync() {
if (!global::windowDelegate.isMaster()) {
if (!global::windowDelegate->isMaster()) {
return;
}
@@ -185,7 +185,7 @@ void ServerModule::disconnectAll() {
ZoneScoped
for (std::unique_ptr<ServerInterface>& serverInterface : _interfaces) {
if (global::windowDelegate.isMaster()) {
if (global::windowDelegate->isMaster()) {
serverInterface->deinitialize();
}
}