diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-03 14:52:19 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-03 14:52:19 +0200 |
commit | 03a164ed74d616e8d5203142ec7e9738c8aae547 (patch) | |
tree | 0c18798947a7a1e8df195ab3c52303511e490bbc | |
parent | 86df1eb3f75fcc28d215bb0e42844b95a31a1f29 (diff) | |
parent | 149403bf828e83b91e049eca1a4e89ef5874b974 (diff) |
Merge branch 'unstable' into trackhat-ui
* unstable:
move header to right place
shortcuts: whole is _WIN32, don't check twice nested
qfc: move division last
-rwxr-xr-x | opentrack/win32-shortcuts.cpp | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | opentrack/win32-shortcuts.h | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | qfunctionconfigurator/functionconfig.cpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/opentrack/win32-shortcuts.cpp b/opentrack/win32-shortcuts.cpp index 67f71f41..d4107949 100755 --- a/opentrack/win32-shortcuts.cpp +++ b/opentrack/win32-shortcuts.cpp @@ -6,7 +6,6 @@ # include <dinput.h> #include <QList> -#include <QKeySequence> #include <QVariant> #include <QDebug> #include "win32-shortcuts.h" @@ -116,7 +115,6 @@ bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods) { auto qt = static_cast<QVariant>(qt_).toInt(); auto our_mods = qt & Qt::KeyboardModifierMask; -#ifdef _WIN32 const auto our_mods_ = our_mods; our_mods |= Qt::ShiftModifier; switch (qt & ~Qt::KeyboardModifierMask) @@ -145,7 +143,6 @@ bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods) case Qt::Key::Key_Bar: qt = Qt::Key::Key_Backslash; break; default: our_mods = our_mods_; break; } -#endif const auto key = qt & ~Qt::KeyboardModifierMask; for (auto& wk : windows_key_sequences) diff --git a/opentrack/win32-shortcuts.h b/opentrack/win32-shortcuts.h index 8167036d..3e824b89 100644..100755 --- a/opentrack/win32-shortcuts.h +++ b/opentrack/win32-shortcuts.h @@ -2,6 +2,8 @@ #ifdef _WIN32 +#include <QKeySequence> + struct win_key; extern QList<win_key> windows_key_mods; diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp index b597a902..c97aec16 100644..100755 --- a/qfunctionconfigurator/functionconfig.cpp +++ b/qfunctionconfigurator/functionconfig.cpp @@ -136,7 +136,7 @@ void Map::reload() { const n y_ = std::min<n>(max_y, std::max<n>(y, 0)); - data[x] = y_ / max_y * integral_max; + data[x] = y_ * integral_max / max_y; } } |