summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dinput/keybinding-worker.cpp7
-rw-r--r--dinput/keybinding-worker.hpp2
-rw-r--r--logic/win32-shortcuts.cpp2
-rw-r--r--logic/work.hpp2
-rw-r--r--proto-fsuipc/ftnoir_protocol_fsuipc.h6
5 files changed, 10 insertions, 9 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp
index a67e8470..608f8fc1 100644
--- a/dinput/keybinding-worker.cpp
+++ b/dinput/keybinding-worker.cpp
@@ -88,8 +88,8 @@ KeybindingWorker& KeybindingWorker::make()
void KeybindingWorker::run()
{
- BYTE keystate[256] = {0};
- BYTE old_keystate[256] = {0};
+ unsigned char keystate[256] = {0};
+ unsigned char old_keystate[256] = {0};
while (!should_quit)
{
@@ -101,7 +101,8 @@ void KeybindingWorker::run()
{
const HRESULT hr = dinkeyboard->GetDeviceState(256, (LPVOID)keystate);
- if (hr != DI_OK) {
+ if (hr != DI_OK)
+ {
qDebug() << "Tracker::run GetDeviceState function failed!" << GetLastError();
Sleep(25);
continue;
diff --git a/dinput/keybinding-worker.hpp b/dinput/keybinding-worker.hpp
index c2d571f8..c4b441b8 100644
--- a/dinput/keybinding-worker.hpp
+++ b/dinput/keybinding-worker.hpp
@@ -23,8 +23,8 @@
struct OPENTRACK_DINPUT_EXPORT Key
{
- BYTE keycode;
QString guid;
+ int keycode;
bool shift;
bool ctrl;
bool alt;
diff --git a/logic/win32-shortcuts.cpp b/logic/win32-shortcuts.cpp
index df9145a0..114bb46d 100644
--- a/logic/win32-shortcuts.cpp
+++ b/logic/win32-shortcuts.cpp
@@ -164,7 +164,7 @@ bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods)
{
// CAVEAT don't use QVariant::toUInt() or conversion fails
const unsigned qt = static_cast<unsigned>(QVariant(qt_).toInt());
- const unsigned our_mods = qt & Qt::KeyboardModifierMask;
+ const unsigned our_mods = unsigned(qt & Qt::KeyboardModifierMask);
{
const auto key_ = qt;
diff --git a/logic/work.hpp b/logic/work.hpp
index b20b1824..bf5b5b15 100644
--- a/logic/work.hpp
+++ b/logic/work.hpp
@@ -39,5 +39,5 @@ struct OPENTRACK_LOGIC_EXPORT Work
void reload_shortcuts();
private:
- std::shared_ptr<TrackLogger> make_logger(const main_settings &s);
+ static std::shared_ptr<TrackLogger> make_logger(const main_settings &s);
};
diff --git a/proto-fsuipc/ftnoir_protocol_fsuipc.h b/proto-fsuipc/ftnoir_protocol_fsuipc.h
index d17527ae..f7a98ad8 100644
--- a/proto-fsuipc/ftnoir_protocol_fsuipc.h
+++ b/proto-fsuipc/ftnoir_protocol_fsuipc.h
@@ -37,11 +37,11 @@ struct settings : opts {
{}
};
-#pragma pack(push,1) // All fields in structure must be byte aligned.
+#pragma pack(push,1) // All fields in structure must be unaligned
typedef struct
{
- int Control; // Control identifier
- int Value; // Value of DOF
+ int Control; // Control identifier
+ int Value; // Value of DOF
} TFSState;
#pragma pack(pop)