diff --git a/.gitignore b/.gitignore index 54c4a80..8563f57 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ __pycache__/ gainput_2008.* docs/ test/Catch/ - +gainput.sdf +gainput.sln +gainput.unsuccessfulbuild diff --git a/lib/include/gainput/recorder/GainputInputPlayer.h b/lib/include/gainput/recorder/GainputInputPlayer.h index e6f1cad..f7a5674 100644 --- a/lib/include/gainput/recorder/GainputInputPlayer.h +++ b/lib/include/gainput/recorder/GainputInputPlayer.h @@ -12,7 +12,7 @@ namespace gainput * In order for input recording to be available, Gainput must have been built with * \c GAINPUT_ENABLE_RECORDER defined. */ -class InputPlayer : public DeviceStateModifier +class GAINPUT_LIBEXPORT InputPlayer : public DeviceStateModifier { public: /// Initializes the player. diff --git a/lib/include/gainput/recorder/GainputInputRecorder.h b/lib/include/gainput/recorder/GainputInputRecorder.h index 76333df..a2deba4 100644 --- a/lib/include/gainput/recorder/GainputInputRecorder.h +++ b/lib/include/gainput/recorder/GainputInputRecorder.h @@ -12,7 +12,7 @@ namespace gainput * In order for input recording to be available, Gainput must have been built with * \c GAINPUT_ENABLE_RECORDER defined. */ -class InputRecorder +class GAINPUT_LIBEXPORT InputRecorder { public: /// Initializes the recorder. diff --git a/lib/include/gainput/recorder/GainputInputRecording.h b/lib/include/gainput/recorder/GainputInputRecording.h index 5767f98..5bd5944 100644 --- a/lib/include/gainput/recorder/GainputInputRecording.h +++ b/lib/include/gainput/recorder/GainputInputRecording.h @@ -8,7 +8,7 @@ namespace gainput { /// A single recorded change for a device button. -struct RecordedDeviceButtonChange +struct GAINPUT_LIBEXPORT RecordedDeviceButtonChange { /// The time at which the change occurred. uint64_t time; @@ -36,7 +36,7 @@ struct RecordedDeviceButtonChange * \sa InputPlayer * \sa InputRecorder */ -class InputRecording +class GAINPUT_LIBEXPORT InputRecording { public: /// Initializes the recording in an empty state. diff --git a/lib/source/gainput/GainputInputManager.cpp b/lib/source/gainput/GainputInputManager.cpp index 48b7b62..5364989 100644 --- a/lib/source/gainput/GainputInputManager.cpp +++ b/lib/source/gainput/GainputInputManager.cpp @@ -252,6 +252,12 @@ InputManager::HandleMessage(const MSG& msg) it != devices_.end(); ++it) { +#if defined(GAINPUT_DEV) + if (it->second->IsSynced()) + { + continue; + } +#endif if (it->second->GetType() == InputDevice::DT_KEYBOARD) { InputDeviceKeyboard* keyboard = static_cast(it->second); @@ -279,6 +285,12 @@ InputManager::HandleInput(AInputEvent* event) it != devices_.end(); ++it) { +#if defined(GAINPUT_DEV) + if (it->second->IsSynced()) + { + continue; + } +#endif if (it->second->GetType() == InputDevice::DT_TOUCH) { InputDeviceTouch* touch = static_cast(it->second); diff --git a/lib/source/gainput/dev/GainputNetListener.cpp b/lib/source/gainput/dev/GainputNetListener.cpp index 35b7864..470a0e0 100644 --- a/lib/source/gainput/dev/GainputNetListener.cpp +++ b/lib/source/gainput/dev/GainputNetListener.cpp @@ -97,8 +97,10 @@ NetListener::Accept() namespace gainput { -NetListener::NetListener(const NetAddress& address) : +NetListener::NetListener(const NetAddress& address, Allocator& allocator) : address(address), + allocator(allocator), + blocking(true), listenSocket(INVALID_SOCKET) {