summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/module.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'video-ps3eye/module.hpp')
-rw-r--r--video-ps3eye/module.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/video-ps3eye/module.hpp b/video-ps3eye/module.hpp
index 56ffe5df..955463d6 100644
--- a/video-ps3eye/module.hpp
+++ b/video-ps3eye/module.hpp
@@ -8,8 +8,8 @@
#include "compat/timer.hpp"
#include "ui_dialog.h"
-#include <QDialog>
#include <QProcess>
+#include <QTimer>
using namespace options;
@@ -27,6 +27,7 @@ struct settings final
void set_exposure();
void set_gain();
+ void apply();
};
class dialog final : public QWidget
@@ -35,13 +36,15 @@ class dialog final : public QWidget
Ui_Dialog ui;
settings s;
+ QTimer t;
+
shm_wrapper shm { "ps3eye-driver-shm", nullptr, sizeof(ps3eye::shm) };
- void do_ok() { s.b->save(); close(); deleteLater(); }
- void do_cancel() { s.b->reload(); close(); deleteLater(); }
+ void do_ok() { s.b->save(); s.apply(); close(); }
+ void do_cancel() { s.b->reload(); s.apply(); close(); }
protected:
- void closeEvent(QCloseEvent*) override { do_cancel(); }
+ void closeEvent(QCloseEvent*) override { do_cancel(); deleteLater(); }
public:
explicit dialog(QWidget* parent = nullptr);