UI: Add obs_frontend_get_current_profile_path()

Returns the path of the current profile's location on the filesystem.
This commit is contained in:
tt2468
2021-04-13 16:49:01 -07:00
committed by Dillon Pentz
parent 53a8a326da
commit 9ca70f4470
5 changed files with 25 additions and 0 deletions

View File

@@ -238,6 +238,16 @@ struct OBSStudioAPI : obs_frontend_callbacks {
return bstrdup(name);
}
char *obs_frontend_get_current_profile_path(void) override
{
char profilePath[512];
int ret = GetProfilePath(profilePath, sizeof(profilePath), "");
if (ret <= 0)
return nullptr;
return bstrdup(profilePath);
}
void obs_frontend_set_current_profile(const char *profile) override
{
QList<QAction *> menuActions = main->ui->profileMenu->actions();