Showing the changes to interface/src/scripting/PlatformInfoScriptingInterface.cpp (1 of 8 files). Show all
Unified · Split
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | // |
| 2 | 2 | // Created by Nissim Hadar on 2018/12/28 |
| 3 | 3 | // Copyright 2013-2016 High Fidelity, Inc. |
| 4 | +// Copyright 2022 Overte e.V. | |
| 4 | 5 | // |
| 5 | 6 | // Distributed under the Apache License, Version 2.0. |
| 6 | 7 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| @@ -12,6 +13,7 @@ · 5 unmodified lines | ||
| 12 | 13 | |
| 13 | 14 | #include <platform/Platform.h> |
| 14 | 15 | #include <platform/Profiler.h> |
| 16 | +#include <ScriptEngineCast.h> | |
| 15 | 17 | |
| 16 | 18 | #ifdef Q_OS_WIN |
| 17 | 19 | #include <Windows.h> |
| @@ -19,6 +21,12 @@ · 1 unmodified line | ||
| 19 | 21 | #include <sstream> |
| 20 | 22 | #endif |
| 21 | 23 | |
| 24 | +STATIC_SCRIPT_INITIALIZER(+[](ScriptManager* manager){ | |
| 25 | + auto scriptEngine = manager->engine().get(); | |
| 26 | + | |
| 27 | + scriptRegisterMetaType(scriptEngine, scriptValueFromEnumClass<PlatformInfoScriptingInterface::PlatformTier>, scriptValueToEnumClass<PlatformInfoScriptingInterface::PlatformTier>, "PlatformTier"); | |
| 28 | +}); | |
| 29 | + | |
| 22 | 30 | PlatformInfoScriptingInterface* PlatformInfoScriptingInterface::getInstance() { |
| 23 | 31 | static PlatformInfoScriptingInterface sharedInstance; |
| 24 | 32 | return &sharedInstance; |