| 379 | } |
| 380 | |
| 381 | void InlineScript::SetupInline() |
| 382 | { |
| 383 | const StringVariable &text = |
| 384 | _language == OBS_SCRIPT_LANG_PYTHON ? _textPython : _textLUA; |
| 385 | const auto scriptText = preprocessScriptText(text, _language, GetID()); |
| 386 | |
| 387 | auto path_ = getScriptTempFilePath(_language); |
| 388 | if (!path_) { |
| 389 | return; |
| 390 | } |
| 391 | |
| 392 | auto path = GetLUACompatiblePath(*path_); |
| 393 | if (!createScriptFile(path.c_str(), scriptText.c_str())) { |
| 394 | return; |
| 395 | } |
| 396 | |
| 397 | _script = std::unique_ptr<obs_script_t, ScriptDeleter>( |
| 398 | CreateOBSScript(path.c_str(), nullptr), {path}); |
| 399 | _lastResolvedText = text; |
| 400 | } |
| 401 | |
| 402 | void InlineScript::Setup() |
| 403 | { |
nothing calls this directly
no test coverage detected