mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Merge remote-tracking branch 'WarmUpTill/master'
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
#include "switcher-data-structs.hpp"
|
||||
using namespace std;
|
||||
|
||||
static inline bool WeakSourceValid(obs_weak_source_t* ws)
|
||||
static inline bool WeakSourceValid(obs_weak_source_t *ws)
|
||||
{
|
||||
obs_source_t* source = obs_weak_source_get_source(ws);
|
||||
obs_source_t *source = obs_weak_source_get_source(ws);
|
||||
if (source)
|
||||
obs_source_release(source);
|
||||
return !!source;
|
||||
@@ -119,7 +119,7 @@ static inline QString MakeFileSwitchName(const QString &scene,
|
||||
return switchName;
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
typedef enum {
|
||||
TIME_RESTRICTION_NONE,
|
||||
TIME_RESTRICTION_SHORTER,
|
||||
TIME_RESTRICTION_LONGER,
|
||||
@@ -171,6 +171,15 @@ MakeMediaSwitchName(const QString &source, const QString &scene,
|
||||
return switchName;
|
||||
}
|
||||
|
||||
static inline QString MakeTimeSwitchName(const QString &scene,
|
||||
const QString &transition, QTime &time)
|
||||
{
|
||||
QString switchName = QStringLiteral("At ") + time.toString() +
|
||||
QStringLiteral(" switch to ") + scene +
|
||||
QStringLiteral(" using ") + transition;
|
||||
return switchName;
|
||||
}
|
||||
|
||||
static inline string GetWeakSourceName(obs_weak_source_t *weak_source)
|
||||
{
|
||||
string name;
|
||||
|
||||
Reference in New Issue
Block a user