Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -5419,6 +5419,15 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 5418 unmodified lines | ||
| 5419 | 5419 | return !entityServerNode || isPhysicsEnabled(); |
| 5420 | 5420 | }); |
| 5421 | 5421 | |
| 5422 | + scriptEngine->setGetTargetUpdateRateFunction([this]() { | |
| 5423 | + auto displayPlugin = _displayPlugin; | |
| 5424 | + if (displayPlugin) { | |
| 5425 | + auto targetUpdateRate = displayPlugin->getTargetFrameRate(); | |
| 5426 | + return targetUpdateRate; | |
| 5427 | + } | |
| 5428 | + return 60.0f; | |
| 5429 | + }); | |
| 5430 | + | |
| 5422 | 5431 | // setup the packet senders and jurisdiction listeners of the script engine's scripting interfaces so |
| 5423 | 5432 | // we can use the same ones from the application. |
| 5424 | 5433 | auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>(); |