summaryrefslogtreecommitdiffhomepage
path: root/dinput
diff options
context:
space:
mode:
Diffstat (limited to 'dinput')
-rw-r--r--dinput/dinput.hpp2
-rw-r--r--dinput/export.hpp29
-rw-r--r--dinput/keybinding-worker.hpp4
-rw-r--r--dinput/win32-joystick.hpp4
4 files changed, 11 insertions, 28 deletions
diff --git a/dinput/dinput.hpp b/dinput/dinput.hpp
index 48132e76..afc29d29 100644
--- a/dinput/dinput.hpp
+++ b/dinput/dinput.hpp
@@ -24,7 +24,7 @@ typedef void* LPDIRECTINPUT8;
template struct __declspec(dllexport) std::atomic<int>;
#endif
-class OPENTRACK_DINPUT_EXPORT dinput_handle final
+class OTR_DINPUT_EXPORT dinput_handle final
{
public:
class di_t;
diff --git a/dinput/export.hpp b/dinput/export.hpp
index 51ee4531..8c6fa27b 100644
--- a/dinput/export.hpp
+++ b/dinput/export.hpp
@@ -1,28 +1,11 @@
-#pragma once
+// generates export.hpp for each module from compat/linkage.hpp
-#ifdef BUILD_dinput
-# ifdef _WIN32
-# define OPENTRACK_DINPUT_LINKAGE __declspec(dllexport)
-# else
-# define OPENTRACK_DINPUT_LINKAGE
-# endif
+#pragma once
-# ifndef _MSC_VER
-# define OPENTRACK_DINPUT_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_DINPUT_LINKAGE
-# else
-# define OPENTRACK_DINPUT_EXPORT OPENTRACK_DINPUT_LINKAGE
-# endif
+#include "compat/linkage-macros.hpp"
+#ifdef BUILD_DINPUT
+# define OTR_DINPUT_EXPORT OTR_GENERIC_EXPORT
#else
-#ifdef _WIN32
-# define OPENTRACK_DINPUT_LINKAGE __declspec(dllimport)
-#else
-# define OPENTRACK_DINPUT_LINKAGE
-#endif
-
-#ifndef _MSC_VER
-# define OPENTRACK_DINPUT_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_DINPUT_LINKAGE
-#else
-# define OPENTRACK_DINPUT_EXPORT OPENTRACK_DINPUT_LINKAGE
-#endif
+# define OTR_DINPUT_EXPORT OTR_GENERIC_IMPORT
#endif
diff --git a/dinput/keybinding-worker.hpp b/dinput/keybinding-worker.hpp
index c4b441b8..553a314c 100644
--- a/dinput/keybinding-worker.hpp
+++ b/dinput/keybinding-worker.hpp
@@ -21,7 +21,7 @@
#include <functional>
#include <vector>
-struct OPENTRACK_DINPUT_EXPORT Key
+struct OTR_DINPUT_EXPORT Key
{
QString guid;
int keycode;
@@ -37,7 +37,7 @@ public:
bool should_process();
};
-struct OPENTRACK_DINPUT_EXPORT KeybindingWorker : private QThread
+struct OTR_DINPUT_EXPORT KeybindingWorker : private QThread
{
using fun = std::function<void(const Key&)>;
diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp
index 6454c51c..4e72853f 100644
--- a/dinput/win32-joystick.hpp
+++ b/dinput/win32-joystick.hpp
@@ -35,7 +35,7 @@ struct hash<QString>
};
}
-struct OPENTRACK_DINPUT_EXPORT win32_joy_ctx
+struct OTR_DINPUT_EXPORT win32_joy_ctx
{
using fn = std::function<void(const QString& guid, int btn, bool held)>;
@@ -77,7 +77,7 @@ struct OPENTRACK_DINPUT_EXPORT win32_joy_ctx
private:
static QString guid_to_string(const GUID& guid);
- class OPENTRACK_DINPUT_EXPORT enum_state final
+ class OTR_DINPUT_EXPORT enum_state final
{
std::vector<QString> all;
joys_t joys;