UI: Change certain scene functions to slot functions

This allows using the functions via Qt message queue.  The reason for
this is so a frontend API can queue these functions to call safely from
another thread.
This commit is contained in:
jp9000
2016-09-06 04:54:23 -07:00
parent 7224e8d36e
commit 9ed95b2497
2 changed files with 9 additions and 8 deletions
+4 -4
View File
@@ -220,7 +220,7 @@ obs_source_t *OBSBasic::FindTransition(const char *name)
return nullptr;
}
void OBSBasic::TransitionToScene(obs_scene_t *scene, bool force)
void OBSBasic::TransitionToScene(OBSScene scene, bool force)
{
obs_source_t *source = obs_scene_get_source(scene);
TransitionToScene(source, force);
@@ -237,7 +237,7 @@ void OBSBasic::TransitionStopped()
swapScene = nullptr;
}
void OBSBasic::TransitionToScene(obs_source_t *source, bool force)
void OBSBasic::TransitionToScene(OBSSource source, bool force)
{
obs_scene_t *scene = obs_scene_from_source(source);
bool usingPreviewProgram = IsPreviewProgramMode();
@@ -293,7 +293,7 @@ static inline void SetComboTransition(QComboBox *combo, obs_source_t *tr)
}
}
void OBSBasic::SetTransition(obs_source_t *transition)
void OBSBasic::SetTransition(OBSSource transition)
{
obs_source_t *oldTransition = obs_get_output_source(0);
@@ -530,7 +530,7 @@ static T GetOBSRef(QListWidgetItem *item)
return item->data(static_cast<int>(QtDataRole::OBSRef)).value<T>();
}
void OBSBasic::SetCurrentScene(obs_source_t *scene, bool force)
void OBSBasic::SetCurrentScene(OBSSource scene, bool force)
{
if (!IsPreviewProgramMode()) {
TransitionToScene(scene, force);