summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/module.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2020-05-31 06:38:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2020-05-31 06:38:00 +0200
commit58d857673ed0fdd801da53b7c7b6dec1dc26d60a (patch)
treedc7c523a2213bc6765a04b94d9eb50754255f498 /video-ps3eye/module.hpp
parent4c39f488136f79692d1b78da8772fd77e97d3c77 (diff)
video/ps3eye: don't reset sensor that much
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);