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