mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-24 22:09:10 -06:00
Code cleanup branch (#618)
* Make height map fallback layer work again * Add documentation to joystick button bindings * Removed grouped property headers * Add new version number constant generated by CMake * Make Joystick deadzone work properly * Change the startup date on Earth to today * Fix key modifier handling * Add debugging indices for TreeNodeDebugging * Fix script schedule for OsirisRex * Do not open Mission schedule automatically * Upload default projection texture automatically * General code cleanup * Fix check_style_guide warnings * Remove .clang-format * MacOS compile fixes * Clang analyzer fixes
This commit is contained in:
@@ -28,17 +28,17 @@
|
||||
#include <modules/sync/syncs/torrentsynchronization.h>
|
||||
#include <modules/sync/syncs/urlsynchronization.h>
|
||||
#include <modules/sync/tasks/syncassettask.h>
|
||||
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/rendering/screenspacerenderable.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
#include <openspace/util/resourcesynchronization.h>
|
||||
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/misc/assert.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <ghoul/misc/templatefactory.h>
|
||||
|
||||
namespace {
|
||||
constexpr const char* KeyHttpSynchronizationRepositories =
|
||||
@@ -53,7 +53,8 @@ SyncModule::SyncModule() : OpenSpaceModule(Name) {}
|
||||
void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) {
|
||||
if (configuration.hasKey(KeyHttpSynchronizationRepositories)) {
|
||||
ghoul::Dictionary dictionary = configuration.value<ghoul::Dictionary>(
|
||||
KeyHttpSynchronizationRepositories);
|
||||
KeyHttpSynchronizationRepositories
|
||||
);
|
||||
|
||||
for (const std::string& key : dictionary.keys()) {
|
||||
_synchronizationRepositories.push_back(dictionary.value<std::string>(key));
|
||||
@@ -100,32 +101,30 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) {
|
||||
fSynchronization->registerClass(
|
||||
"UrlSynchronization",
|
||||
[this](bool, const ghoul::Dictionary& dictionary) {
|
||||
return new UrlSynchronization(
|
||||
dictionary,
|
||||
_synchronizationRoot
|
||||
);
|
||||
}
|
||||
return new UrlSynchronization(
|
||||
dictionary,
|
||||
_synchronizationRoot
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
auto fTask = FactoryManager::ref().factory<Task>();
|
||||
ghoul_assert(fTask, "No task factory existed");
|
||||
fTask->registerClass<SyncAssetTask>("SyncAssetTask");
|
||||
|
||||
|
||||
|
||||
_torrentClient.initialize();
|
||||
|
||||
// Deinitialize
|
||||
OsEng.registerModuleCallback(OpenSpaceEngine::CallbackOption::Deinitialize, [&] {
|
||||
_torrentClient.deinitialize();
|
||||
});
|
||||
OsEng.registerModuleCallback(
|
||||
OpenSpaceEngine::CallbackOption::Deinitialize,
|
||||
[&]() { _torrentClient.deinitialize(); }
|
||||
);
|
||||
}
|
||||
|
||||
void SyncModule::internalDeinitialize() {
|
||||
_torrentClient.deinitialize();
|
||||
}
|
||||
|
||||
|
||||
std::string SyncModule::synchronizationRoot() const {
|
||||
return _synchronizationRoot;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user