frontend-tools: Display Python version in UI

This commit is contained in:
Matt Gajownik
2022-09-23 12:08:11 +10:00
committed by Matt Gajownik
parent dba3401ceb
commit 1b2fc73021
6 changed files with 40 additions and 0 deletions
+11
View File
@@ -1590,6 +1590,17 @@ bool obs_scripting_python_runtime_linked(void)
return (bool)RUNTIME_LINK;
}
void obs_scripting_python_version(char *version, size_t version_length)
{
#if RUNTIME_LINK
snprintf(version, version_length, "%d.%d", python_version.major,
python_version.minor);
#else
snprintf(version, version_length, "%d.%d", PY_MAJOR_VERSION,
PY_MINOR_VERSION);
#endif
}
bool obs_scripting_python_loaded(void)
{
return python_loaded;