diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2020-05-31 06:38:00 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2020-05-31 06:38:00 +0200 |
commit | 58d857673ed0fdd801da53b7c7b6dec1dc26d60a (patch) | |
tree | dc7c523a2213bc6765a04b94d9eb50754255f498 /video-ps3eye/module.hpp | |
parent | 4c39f488136f79692d1b78da8772fd77e97d3c77 (diff) |
video/ps3eye: don't reset sensor that much
Diffstat (limited to 'video-ps3eye/module.hpp')
-rw-r--r-- | video-ps3eye/module.hpp | 11 |
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); |