提交 e8002dc9 编写于 作者: J jp9000

UI: Save at regular intervals

Save the file when "start recording" or "start streaming" is clicked,
and also save at every 20 second interval
上级 0332cdce
......@@ -593,6 +593,10 @@ void OBSBasic::OBSInit()
TimedCheckForUpdates();
loaded = true;
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(SaveProject()));
timer->start(20000);
}
OBSBasic::~OBSBasic()
......@@ -2200,6 +2204,8 @@ void OBSBasic::SetupEncoders()
void OBSBasic::on_streamButton_clicked()
{
SaveProject();
if (obs_output_active(streamOutput)) {
obs_output_stop(streamOutput);
} else {
......@@ -2235,6 +2241,8 @@ void OBSBasic::on_streamButton_clicked()
void OBSBasic::on_recordButton_clicked()
{
SaveProject();
if (obs_output_active(fileOutput)) {
obs_output_stop(fileOutput);
} else {
......
......@@ -147,6 +147,8 @@ public slots:
void RecordingStart();
void RecordingStop();
void SaveProject();
private slots:
void AddSceneItem(OBSSceneItem item);
void RemoveSceneItem(OBSSceneItem item);
......@@ -203,7 +205,6 @@ public:
void ResetAudioDevices();
void NewProject();
void SaveProject();
void LoadProject();
inline void GetDisplayRect(int &x, int &y, int &cx, int &cy)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册