frontend-tools: Display Python version in UI

This commit is contained in:
Matt Gajownik 2022-08-06 13:52:39 +10:00 • committed by jp9000
commit 89d9493468
6 changed files with 40 additions and 0 deletions

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;