mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-13 12:06:23 -04:00
If the "Pause timer when recording is paused" option in the Output Timer settings was enabled, even if an Output Timer was not being used, a recording may stop when attempting to unpause it. This was due to the check in the UnpauseRecordingTimer function being too loose and only checking for if the recording timer was not active. Let's initialize the recordingTimeLeft variable to -1 and check that it's greater than 0 before attempting to restart a recording timer.
45 lines
893 B
C++
45 lines
893 B
C++
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <memory>
|
|
|
|
#include "ui_output-timer.h"
|
|
|
|
class QCloseEvent;
|
|
|
|
class OutputTimer : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
std::unique_ptr<Ui_OutputTimer> ui;
|
|
OutputTimer(QWidget *parent);
|
|
|
|
void closeEvent(QCloseEvent *event) override;
|
|
void PauseRecordingTimer();
|
|
void UnpauseRecordingTimer();
|
|
|
|
public slots:
|
|
void StreamingTimerButton();
|
|
void RecordingTimerButton();
|
|
void StreamTimerStart();
|
|
void RecordTimerStart();
|
|
void StreamTimerStop();
|
|
void RecordTimerStop();
|
|
void UpdateStreamTimerDisplay();
|
|
void UpdateRecordTimerDisplay();
|
|
void ShowHideDialog();
|
|
void EventStopStreaming();
|
|
void EventStopRecording();
|
|
|
|
private:
|
|
bool streamingAlreadyActive = false;
|
|
bool recordingAlreadyActive = false;
|
|
|
|
QTimer *streamingTimer;
|
|
QTimer *recordingTimer;
|
|
QTimer *streamingTimerDisplay;
|
|
QTimer *recordingTimerDisplay;
|
|
|
|
int recordingTimeLeft = -1;
|
|
};
|