From 7337f89f4d69cc0e5fe3a72f9f6773ecf9b24cc5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 28 Mar 2017 11:00:31 +0200 Subject: start renaming internal macros as OPENTRACK_* to OTR_* --- dinput/dinput.hpp | 2 +- dinput/export.hpp | 29 ++++++----------------------- dinput/keybinding-worker.hpp | 4 ++-- dinput/win32-joystick.hpp | 4 ++-- 4 files changed, 11 insertions(+), 28 deletions(-) (limited to 'dinput') 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; #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 #include -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; 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 }; } -struct OPENTRACK_DINPUT_EXPORT win32_joy_ctx +struct OTR_DINPUT_EXPORT win32_joy_ctx { using fn = std::function; @@ -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 all; joys_t joys; -- cgit v1.2.3