mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-19 09:41:32 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user