Browse Source

Add a warning for unset recording formats

tags/v5.0.0^2
ArsenArsen 5 years ago
parent
commit
7d5be857ff
  1. 6
      mainwindow.cpp

6
mainwindow.cpp

@ -4,6 +4,7 @@
#include "screenshotutil.hpp"
#include "settingsdialog.hpp"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QMessageBox>
#include <colorpicker/colorpickerscene.hpp>
#include <formats.hpp>
@ -19,7 +20,10 @@ void MainWindow::rec() {
if (controller->isRunning()) return;
auto f
= static_cast<formats::Recording>(settings::settings().value("recording/format", (int)formats::Recording::None).toInt());
if (f >= formats::Recording::None) return;
if (f >= formats::Recording::None) {
qWarning() << "Recording format not set in settings. Aborting.";
return;
}
RecordingContext *ctx = new RecordingContext;
RecordingFormats *format = new RecordingFormats(f);
ctx->consumer = format->getConsumer();

Loading…
Cancel
Save