diff --git a/namedropper/Assets/Plugins/LibRawInput.dll b/namedropper/Assets/Plugins/LibRawInput.dll new file mode 100644 index 0000000..276dfd9 Binary files /dev/null and b/namedropper/Assets/Plugins/LibRawInput.dll differ diff --git a/namedropper/Assets/Plugins/LibRawInput.dll.meta b/namedropper/Assets/Plugins/LibRawInput.dll.meta new file mode 100644 index 0000000..6d296a9 --- /dev/null +++ b/namedropper/Assets/Plugins/LibRawInput.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 95e06d97e80c1704e8b5c5c7afd90cb3 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/namedropper/Assets/Scenes/Game.unity b/namedropper/Assets/Scenes/Game.unity index b075bca..6ef2080 100644 --- a/namedropper/Assets/Scenes/Game.unity +++ b/namedropper/Assets/Scenes/Game.unity @@ -3629,6 +3629,7 @@ GameObject: - component: {fileID: 1666960091} - component: {fileID: 1666960090} - component: {fileID: 1666960089} + - component: {fileID: 1666960092} m_Layer: 5 m_Name: Canvas m_TagString: Untagged @@ -3723,6 +3724,24 @@ Canvas: m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 +--- !u!114 &1666960092 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666960087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c1935701df9467a4697e65458c3ecd11, type: 3} + m_Name: + m_EditorClassIdentifier: + cursor: {fileID: 23812149} + colors: [] + defaultMiceSensitivity: 1 + accelerationThreshold: 40 + accelerationMultiplier: 2 + screenBorderPixels: 16 --- !u!1001 &1680381204 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/namedropper/Assets/Scenes/MouseInputManager.cs b/namedropper/Assets/Scenes/MouseInputManager.cs new file mode 100644 index 0000000..9b559e8 --- /dev/null +++ b/namedropper/Assets/Scenes/MouseInputManager.cs @@ -0,0 +1,273 @@ +// Unity PINVOKE interface for pastebin.com/0Szi8ga6 +// Handles multiple cursors +// License: CC0 + +using UnityEngine; +using System.Collections; +using System.Runtime.InteropServices; +using System; +using System.Collections.Generic; +using UnityEngine.UI; + +public class MouseInputManager : MonoBehaviour +{ + public static MouseInputManager instance; + + [DllImport("LibRawInput")] + private static extern bool init(); + + [DllImport("LibRawInput")] + private static extern bool kill(); + + [DllImport("LibRawInput")] + private static extern IntPtr poll(); + + public const byte RE_DEVICE_CONNECT = 0; + public const byte RE_MOUSE = 2; + public const byte RE_DEVICE_DISCONNECT = 1; + public string getEventName(byte id) + { + switch (id) + { + case RE_DEVICE_CONNECT: return "RE_DEVICE_CONNECT"; + case RE_DEVICE_DISCONNECT: return "RE_DEVICE_DISCONNECT"; + case RE_MOUSE: return "RE_MOUSE"; + } + return "UNKNOWN(" + id + ")"; + } + + public GameObject cursor; + public Color[] colors; + public float defaultMiceSensitivity = 1f; + public float accelerationThreshold = 40; + public float accelerationMultiplier = 2; + public int screenBorderPixels = 16; + + [StructLayout(LayoutKind.Sequential)] + public struct RawInputEvent + { + public int devHandle; + public int x, y, wheel; + public byte press; + public byte release; + public byte type; + } + + public class MousePointer + { + public GameObject obj; + public Vector2 position; + public int deviceID; + public int playerID; + public float sensitivity; + } + Dictionary pointersByDeviceId = new Dictionary(); + Dictionary pointersByPlayerId = new Dictionary(); + int nextPlayerId = 1; + int miceCount = 0; + + Canvas canvas; + RectTransform canvasRect; + float width, height; + + void Start() + { + instance = this; + bool res = init(); + Debug.Log("Init() ==> " + res); + Debug.Log(Marshal.SizeOf(typeof(RawInputEvent))); + canvas = GetComponent(); + canvasRect = GetComponent(); + //enterSingleMode(); + } + + public void OnDestroy() + { + instance = null; + } + + int addCursor(int deviceId) + { + if (!isInit) + { + Debug.LogError("Not initialized"); + return -1; + } + + MousePointer mp = null; + pointersByDeviceId.TryGetValue(deviceId, out mp); + if (mp != null) + { + Debug.LogError("This device already has a cursor"); + return -1; + } + + Debug.Log("Adding DeviceID " + deviceId); + mp = new MousePointer(); + mp.playerID = nextPlayerId++; + pointersByDeviceId[deviceId] = mp; + pointersByPlayerId[mp.playerID] = mp; + mp.position = new Vector3(width / 2, height / 2, 0); + + mp.obj = Instantiate(cursor, transform) as GameObject; + var rt = mp.obj.GetComponent(); + rt.position = mp.position; + + var spriteComp = mp.obj.GetComponent(); + if (spriteComp) spriteComp.color = colors[mp.playerID % colors.Length]; + + ++miceCount; + return mp.playerID; + } + + void deleteCursor(int deviceId) + { + --miceCount; + var mp = pointersByDeviceId[deviceId]; + pointersByDeviceId.Remove(mp.deviceID); + pointersByPlayerId.Remove(mp.playerID); + Destroy(mp.obj); + } + + bool _isMultiplayer = true; + MousePointer _spPointer; + + [SerializeField] + public bool isMultiplayer + { + set + { + if (!value) enterSingleMode(); else enterMultipleMode(); + _isMultiplayer = value; + } + get { return _isMultiplayer; } + } + + void enterSingleMode() + { + clearCursorsAndDevices(); + --nextPlayerId; + addCursor(0); + _spPointer = pointersByDeviceId[0]; + Cursor.lockState = CursorLockMode.None; + Cursor.visible = false; + } + + void enterMultipleMode() + { + _spPointer = null; + nextPlayerId = 0; + clearCursorsAndDevices(); + Cursor.lockState = CursorLockMode.Locked; + Cursor.visible = false; + } + + void clearCursorsAndDevices() + { + pointersByDeviceId.Clear(); + pointersByPlayerId.Clear(); + nextPlayerId = 1; + miceCount = 0; + foreach (Transform t in transform) Destroy(t.gameObject); + } + + public MousePointer getByPlayerId(int id) + { + MousePointer res = null; + pointersByPlayerId.TryGetValue(id, out res); + return res; + } + + // Update is called once per frame + int lastEvents = 0; + bool isInit = true; + void Update() + { + // Keyboard controls debug + if (Input.GetKeyDown(KeyCode.R)) + { + if (isInit) + { + clearCursorsAndDevices(); + kill(); + isInit = false; + } + else + { + init(); + isInit = true; + } + } + + if (Input.GetKeyDown(KeyCode.M)) + { + isMultiplayer = !isMultiplayer; + } + + // SP + if (!_isMultiplayer) + { + var rt = _spPointer.obj.GetComponent(); + rt.position = Input.mousePosition; + } + else + { + // MP + width = canvasRect.rect.width; + height = canvasRect.rect.height; + var left = -width / 2; + var right = width / 2; + var top = -height / 2; + var bottom = height / 2; + //Debug.Log("left=" + left + ", right=" + right + ", top=" + top + ", bottom=" + bottom); + + // Poll the events and properly update whatever we need + IntPtr data = poll(); + int numEvents = Marshal.ReadInt32(data); + if (numEvents > 0) lastEvents = numEvents; + for (int i = 0; i < numEvents; ++i) + { + var ev = new RawInputEvent(); + long offset = data.ToInt64() + sizeof(int) + i * Marshal.SizeOf(ev); + ev.devHandle = Marshal.ReadInt32(new IntPtr(offset + 0)); + ev.x = Marshal.ReadInt32(new IntPtr(offset + 4)); + ev.y = Marshal.ReadInt32(new IntPtr(offset + 8)); + ev.wheel = Marshal.ReadInt32(new IntPtr(offset + 12)); + ev.press = Marshal.ReadByte(new IntPtr(offset + 16)); + ev.release = Marshal.ReadByte(new IntPtr(offset + 17)); + ev.type = Marshal.ReadByte(new IntPtr(offset + 18)); + //Debug.Log(getEventName(ev.type) + ": H=" + ev.devHandle + "; (" + ev.x + ";" + ev.y + ") Down=" + ev.press + " Up=" + ev.release); + + if (ev.type == RE_DEVICE_CONNECT) addCursor(ev.devHandle); + else if (ev.type == RE_DEVICE_DISCONNECT) deleteCursor(ev.devHandle); + else if (ev.type == RE_MOUSE) + { + MousePointer pointer = null; + if (pointersByDeviceId.TryGetValue(ev.devHandle, out pointer)) + { + float dx = ev.x * defaultMiceSensitivity; + float dy = ev.y * defaultMiceSensitivity; + if (Mathf.Abs(dx) > accelerationThreshold) dx *= accelerationMultiplier; + if (Mathf.Abs(dy) > accelerationThreshold) dy *= accelerationMultiplier; + pointer.position = new Vector2( + Mathf.Clamp(pointer.position.x + dx, screenBorderPixels, width - screenBorderPixels), + Mathf.Clamp(pointer.position.y - dy, screenBorderPixels, height - screenBorderPixels)); + RectTransform rt = pointer.obj.GetComponent(); + rt.position = pointer.position; + } + else + { + Debug.Log("Unknown device found"); + addCursor(ev.devHandle); + } + } + } + Marshal.FreeCoTaskMem(data); + } + } + + void OnApplicationQuit() + { + kill(); + } +} \ No newline at end of file diff --git a/namedropper/Assets/Scenes/MouseInputManager.cs.meta b/namedropper/Assets/Scenes/MouseInputManager.cs.meta new file mode 100644 index 0000000..780457a --- /dev/null +++ b/namedropper/Assets/Scenes/MouseInputManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c1935701df9467a4697e65458c3ecd11 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/.suo b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/.suo new file mode 100644 index 0000000..3c00f53 Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/.suo differ diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/Browse.VC.db b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/Browse.VC.db new file mode 100644 index 0000000..f870980 Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/Browse.VC.db differ diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/817cdfe4b65a265c.ipch b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/817cdfe4b65a265c.ipch new file mode 100644 index 0000000..a2cdb8e Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/817cdfe4b65a265c.ipch differ diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/AutoPCH/4c0f031e49fb97aa/DLLMAIN.ipch b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/AutoPCH/4c0f031e49fb97aa/DLLMAIN.ipch new file mode 100644 index 0000000..22715eb Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/AutoPCH/4c0f031e49fb97aa/DLLMAIN.ipch differ diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/AutoPCH/c221833100c36be1/DLLMAIN.ipch b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/AutoPCH/c221833100c36be1/DLLMAIN.ipch new file mode 100644 index 0000000..a6447e6 Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/AutoPCH/c221833100c36be1/DLLMAIN.ipch differ diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/a64f429896161579.ipch b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/a64f429896161579.ipch new file mode 100644 index 0000000..a9c6917 Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/a64f429896161579.ipch differ diff --git a/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/b36074f7519529.ipch b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/b36074f7519529.ipch new file mode 100644 index 0000000..c72848c Binary files /dev/null and b/rawinputdll/rawinputdll/.vs/rawinputdll/v15/ipch/b36074f7519529.ipch differ diff --git a/rawinputdll/rawinputdll/rawinputdll.sln b/rawinputdll/rawinputdll/rawinputdll.sln new file mode 100644 index 0000000..ba9fd59 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1082 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rawinputdll", "rawinputdll\rawinputdll.vcxproj", "{16B18B99-3E41-41D5-8743-FB8B4F477FCC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Debug|x64.ActiveCfg = Debug|x64 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Debug|x64.Build.0 = Debug|x64 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Debug|x86.ActiveCfg = Debug|x64 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Debug|x86.Build.0 = Debug|x64 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Release|x64.ActiveCfg = Release|x64 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Release|x64.Build.0 = Release|x64 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Release|x86.ActiveCfg = Release|Win32 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {20C5AE6E-DFFB-4D1E-AA91-B4BF65DE5358} + EndGlobalSection +EndGlobal diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/dllmain.obj b/rawinputdll/rawinputdll/rawinputdll/Debug/dllmain.obj new file mode 100644 index 0000000..54ca1eb Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/dllmain.obj differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/pch.obj b/rawinputdll/rawinputdll/rawinputdll/Debug/pch.obj new file mode 100644 index 0000000..6cf288b Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/pch.obj differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.log b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.log new file mode 100644 index 0000000..d2ff2bc --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.log @@ -0,0 +1,3 @@ + dllmain.cpp + Creating library A:\code\namedropper\rawinputdll\rawinputdll\Debug\rawinputdll.lib and object A:\code\namedropper\rawinputdll\rawinputdll\Debug\rawinputdll.exp + rawinputdll.vcxproj -> A:\code\namedropper\rawinputdll\rawinputdll\Debug\rawinputdll.dll diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.pch b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.pch new file mode 100644 index 0000000..fc0f355 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.pch differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.command.1.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.command.1.tlog new file mode 100644 index 0000000..3324a37 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.command.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.read.1.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.read.1.tlog new file mode 100644 index 0000000..4b1ff2f Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.read.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.write.1.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.write.1.tlog new file mode 100644 index 0000000..b4c1b3c Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/CL.write.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.command.1.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.command.1.tlog new file mode 100644 index 0000000..82f5b22 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.command.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.read.1.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.read.1.tlog new file mode 100644 index 0000000..55bc432 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.read.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.write.1.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.write.1.tlog new file mode 100644 index 0000000..729d434 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/link.write.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/rawinputdll.lastbuildstate b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/rawinputdll.lastbuildstate new file mode 100644 index 0000000..b5aa30c --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/rawinputdll.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0 +Debug|Win32|A:\code\namedropper\rawinputdll\rawinputdll\| diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/rawinputdll.write.1u.tlog b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/rawinputdll.write.1u.tlog new file mode 100644 index 0000000..0a77a10 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/rawinputdll.tlog/rawinputdll.write.1u.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/vc141.idb b/rawinputdll/rawinputdll/rawinputdll/Debug/vc141.idb new file mode 100644 index 0000000..ac737e7 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/vc141.idb differ diff --git a/rawinputdll/rawinputdll/rawinputdll/Debug/vc141.pdb b/rawinputdll/rawinputdll/rawinputdll/Debug/vc141.pdb new file mode 100644 index 0000000..5a79d36 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/Debug/vc141.pdb differ diff --git a/rawinputdll/rawinputdll/rawinputdll/dllmain.cpp b/rawinputdll/rawinputdll/rawinputdll/dllmain.cpp new file mode 100644 index 0000000..50d9a25 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/dllmain.cpp @@ -0,0 +1,370 @@ +/* A RawInput implementation with HWND_MESSAGE window and Device State detection. Uses separate thread and accumulates deltas */ + +#include +#include +//#include "stdafx.h" +//#include "MessageToString.h" +#include +#include +#include +#include +#include +#include +using namespace std; + +// State +bool isInitialized = false; +HANDLE runningThread = 0; +HWND messageWindow = 0; + +// Multi threading +using Mutex = std::mutex; +using MutexLocker = std::lock_guard; +#define EnsureMutexLocked(T) { if(T.try_lock()) Crash(); } +#define Crash() { std::cout << "CRASH()"; ((void(*)())0)(); } +#define StrongAssert(T) { if(!(T)) cout << "Assertion Failed" << ##T << "\n"; Crash(); } + +// RawInput stuff +const uint8_t RE_DEVICE_CONNECT = 0; +const uint8_t RE_DEVICE_DISCONNECT = 1; +const uint8_t RE_MOUSE = 2; + +struct RawInputEvent +{ + int32_t devHandle; + int32_t x, y, wheel; + // pressed button + uint8_t press; + //released button + uint8_t release; + // event type + uint8_t type; +}; +vector generatedEvents; // deltas must be accumulated +Mutex dataMutex; + +// Mouse state for now +struct DeviceState +{ + int32_t x, y, z; // x,y are delts movement, z is WheelDelta + uint8_t buttonStates; // bad idea for polling + wstring name; +}; + +// Global buffer for worker thread +std::vector m_RawInputMessageData; // Buffer + +map devices; + +void printEvent(RawInputEvent e) +{ + stringstream ss; + switch (e.type) + { + case RE_DEVICE_CONNECT: ss << "RE_DEVICE_CONNECT"; break; + case RE_DEVICE_DISCONNECT: ss << "RE_DEVICE_DISCONNECT"; break; + case RE_MOUSE: ss << "RE_MOUSE"; break; + default: ss << "UNKNOWN(" << e.type << ")"; + } + ss << " " << e.devHandle << " (" << e.x << "; " << e.y << ") DOWN=" << int(e.press) << " UP=" << int(e.release) << " w=" << e.wheel << "\n"; + cout << ss.str(); +} + +inline void AddEvent(uint8_t type, int32_t devHandle, uint8_t press, uint8_t release) +{ + MutexLocker locker(dataMutex); + RawInputEvent e; + e.x = 0; + e.y = 0; + e.wheel = 0; + e.type = type; + e.devHandle = devHandle; + e.press = press; + e.release = release; + generatedEvents.push_back(e); + printEvent(e); +} + +inline void AddEvent(RawInputEvent& ev) +{ + MutexLocker locker(dataMutex); + generatedEvents.push_back(ev); + printEvent(ev); +} + +void OnRawInput(HRAWINPUT handle) +{ + // Determine the size + UINT dataSize; + GetRawInputData(handle, RID_INPUT, NULL, &dataSize, sizeof(RAWINPUTHEADER)); // get Size + if (dataSize == 0) return; + if (dataSize > m_RawInputMessageData.size()) m_RawInputMessageData.resize(dataSize); + + // Get the Data + void* dataBuf = &m_RawInputMessageData[0]; + GetRawInputData(handle, RID_INPUT, dataBuf, &dataSize, sizeof(RAWINPUTHEADER)); // get Data + const RAWINPUT *raw = (const RAWINPUT*)dataBuf; + + // Mouse + //if (raw->header.dwType == RIM_TYPEMOUSE) + + HANDLE deviceHandle = raw->header.hDevice; + const RAWMOUSE& mouseData = raw->data.mouse; + + USHORT flags = mouseData.usButtonFlags; + short wheelDelta = (short)mouseData.usButtonData; + LONG x = mouseData.lLastX, y = mouseData.lLastY; + + // Some events are critical + if (flags & RI_MOUSE_LEFT_BUTTON_DOWN) AddEvent(RE_MOUSE, int32_t(raw->header.hDevice), 1, 0); + if (flags & RI_MOUSE_LEFT_BUTTON_UP) AddEvent(RE_MOUSE, int32_t(raw->header.hDevice), 0, 1); + if (flags & RI_MOUSE_MIDDLE_BUTTON_DOWN) AddEvent(RE_MOUSE, int32_t(raw->header.hDevice), 3, 0); + if (flags & RI_MOUSE_MIDDLE_BUTTON_UP) AddEvent(RE_MOUSE, int32_t(raw->header.hDevice), 0, 3); + if (flags & RI_MOUSE_RIGHT_BUTTON_DOWN) AddEvent(RE_MOUSE, int32_t(raw->header.hDevice), 2, 0); + if (flags & RI_MOUSE_RIGHT_BUTTON_UP) AddEvent(RE_MOUSE, int32_t(raw->header.hDevice), 0, 2); + + + // Some are to be accumulated + auto& dev = devices[raw->header.hDevice]; + dev.x += x; + dev.y += y; + dev.z += wheelDelta; + + /* + wprintf( + L"Mouse: Device=0x%08X, Flags=%04x, WheelDelta=%d, X=%d, Y=%d\n", + deviceHandle, flags, wheelDelta, x, y); + /**/ +} + + + +void OnDeviceChange(HRAWINPUT handle, bool connected) +{ + if (!connected) + { + RawInputEvent ev; + ev.devHandle = int32_t(handle); + ev.type = connected ? RE_DEVICE_CONNECT : RE_DEVICE_DISCONNECT; + ev.x = 0; + ev.y = 0; + AddEvent(ev); + MutexLocker locker(dataMutex); + devices.erase(handle); + return; + } + + // Determine the size, Get Device Name + std::vector deviceNameData; + wstring deviceName; + UINT dataSize; + SetLastError(0); + GetRawInputDeviceInfo(handle, RIDI_DEVICENAME, nullptr, &dataSize); + if (GetLastError()) return; + if (dataSize) + { + deviceNameData.resize(dataSize); + UINT result = GetRawInputDeviceInfo(handle, RIDI_DEVICENAME, &deviceNameData[0], &dataSize); + if (result != UINT_MAX) + { + deviceName.assign(deviceNameData.begin(), deviceNameData.end()); + wprintf(L" Name=%s\n", deviceName.c_str()); + } + } + + RID_DEVICE_INFO deviceInfo; + deviceInfo.cbSize = sizeof deviceInfo; + dataSize = sizeof deviceInfo; + UINT result = GetRawInputDeviceInfo(handle, RIDI_DEVICEINFO, &deviceInfo, &dataSize); + if (result != UINT_MAX) + { + wprintf(L" Id=%u, Buttons=%u, SampleRate=%u, HorizontalWheel=%s\n", + deviceInfo.mouse.dwId, + deviceInfo.mouse.dwNumberOfButtons, + deviceInfo.mouse.dwSampleRate, + deviceInfo.mouse.fHasHorizontalWheel ? L"1" : L"0"); + + // At this perfect moment, add OR remove the device + RawInputEvent ev; + ev.devHandle = int32_t(handle); + ev.type = RE_DEVICE_CONNECT; + ev.x = 0; + ev.y = 0; + AddEvent(ev); + MutexLocker locker(dataMutex); + devices[handle].name = deviceName; + } +} + +LRESULT CALLBACK RawInputWndProc(HWND wh, UINT msg, WPARAM wp, LPARAM lp) +{ + // Debugging Message pumps + //cout << WMMessageToStr(msg, true) << ": W= " << wp << "; L= " << lp << "\n"; + + // 254: WM_INPUT_DEVICE_CHANGE + // wp = 1 GIDC_ARRIVAL + // wp = 2 GIDC_REMOVAL + + // 255: WM_INPUT + + if (msg == WM_INPUT_DEVICE_CHANGE) + { + if (wp == 1) + { + OnDeviceChange((HRAWINPUT)lp, true); + } + else if (wp == 2) + { + OnDeviceChange((HRAWINPUT)lp, false); + } + } + else if (msg == WM_INPUT) + { + OnRawInput((HRAWINPUT)lp); + } + + return DefWindowProc(wh, msg, wp, lp); +} + +static const wchar_t* class_name = L"PI_DEV_RAWINPUT"; +void RawInputThread(LPVOID params) +{ + WNDCLASSEX wx = {}; + wx.cbSize = sizeof(WNDCLASSEX); + wx.lpfnWndProc = RawInputWndProc; + wx.hInstance = NULL; + wx.lpszClassName = class_name; + HWND wh; + if (RegisterClassEx(&wx)) + { + wh = CreateWindowEx(0, class_name, L"Pi-Dev RawInput [NS]", 0, 0, 0, 0, 0, HWND_DESKTOP, NULL, NULL, NULL); + messageWindow = wh; + ShowWindow(wh, SW_SHOWMINNOACTIVE); + + RAWINPUTDEVICE device[4]; + + // Mouse + device[0].usUsagePage = 0x01; + device[0].usUsage = 0x02; + device[0].dwFlags = RIDEV_INPUTSINK | RIDEV_DEVNOTIFY; + device[0].hwndTarget = wh; + + // Gamepad + device[1].usUsagePage = 0x01; + device[1].usUsage = 0x05; + device[1].dwFlags = RIDEV_INPUTSINK | RIDEV_DEVNOTIFY; + device[1].hwndTarget = wh; + + // Joystick + device[2].usUsagePage = 0x01; + device[2].usUsage = 0x04; + device[2].dwFlags = RIDEV_INPUTSINK | RIDEV_DEVNOTIFY; + device[2].hwndTarget = wh; + + // Keyboard + device[3].usUsagePage = 0x01; + device[3].usUsage = 0x06; + device[3].dwFlags = RIDEV_INPUTSINK | RIDEV_DEVNOTIFY; + device[3].hwndTarget = wh; + + // Register ONLY Mice + RegisterRawInputDevices(device, 1, sizeof RAWINPUTDEVICE); + + + MSG msg; + while (GetMessage(&msg, 0, 0, 0) > 0) + { + DispatchMessage(&msg); + } + } +} + +extern "C" __declspec(dllexport) int kill() +{ + SetLastError(0); + PostThreadMessage(GetThreadId(runningThread), WM_QUIT, 0, 0); + cout << "PostThreadMessage = " << GetLastError() << "\n"; + + SetLastError(0); + UnregisterClass(class_name, NULL); + cout << "UnregisterClass = " << GetLastError() << "\n"; + /**/ + + messageWindow = 0; + runningThread = 0; + isInitialized = false; + return GetLastError(); +} + +extern "C" __declspec(dllexport) bool init() +{ + kill(); + // this is actually reinit() + cout << "init()"; + MutexLocker locker(dataMutex); + devices.clear(); + generatedEvents.clear(); + + if (!isInitialized) + { + isInitialized = true; + runningThread = CreateThread(NULL, 0, LPTHREAD_START_ROUTINE(RawInputThread), NULL, 0, 0); + messageWindow = 0; + return true; + } + + return false; +} + +extern "C" __declspec(dllexport) void* poll() +{ + MutexLocker locker(dataMutex); + //cout << "==== Deltas =====\n"; + int numItems = generatedEvents.size(); + stringstream ss; + for (auto& d : devices) + { + RawInputEvent e; + e.devHandle = int32_t(d.first); + auto& data = d.second; + e.press = 0; + e.release = 0; + e.type = RE_MOUSE; + e.wheel = data.z; + e.x = data.x; + e.y = data.y; + if (e.x != 0 || e.y != 0) + { + ss.write((char*)&e, sizeof(RawInputEvent)); + ++numItems; + } + cout << e.x << "; " << e.y << "\n"; + // Zero accumulation fields + data.x = 0; + data.y = 0; + data.z = 0; + } + ss.write((char*)generatedEvents.data(), sizeof(RawInputEvent)*generatedEvents.size()); + uint8_t* buf = (uint8_t*)CoTaskMemAlloc(4 + numItems * sizeof(RawInputEvent)); + memcpy(buf, &numItems, 4); + memcpy(buf + 4, ss.str().data(), numItems * sizeof(RawInputEvent)); + generatedEvents.clear(); + return buf; +} + +int main() +{ + cout << "sz = " << sizeof(RawInputEvent) << "\n"; + init(); + while (true) + { + if (GetAsyncKeyState(VK_HOME)) cout << "init() = " << init() << "\n"; + if (GetAsyncKeyState(VK_END)) cout << "kill() = " << kill() << "\n"; + Sleep(1000); + void* data = poll(); + int d = 0; + memcpy(&d, data, 4); + //cout << d << "\n"; + } + return 0; +} \ No newline at end of file diff --git a/rawinputdll/rawinputdll/rawinputdll/framework.h b/rawinputdll/rawinputdll/rawinputdll/framework.h new file mode 100644 index 0000000..54b83e9 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/framework.h @@ -0,0 +1,5 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files +#include diff --git a/rawinputdll/rawinputdll/rawinputdll/pch.cpp b/rawinputdll/rawinputdll/rawinputdll/pch.cpp new file mode 100644 index 0000000..64b7eef --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to the pre-compiled header + +#include "pch.h" + +// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/rawinputdll/rawinputdll/rawinputdll/pch.h b/rawinputdll/rawinputdll/rawinputdll/pch.h new file mode 100644 index 0000000..885d5d6 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/pch.h @@ -0,0 +1,13 @@ +// pch.h: This is a precompiled header file. +// Files listed below are compiled only once, improving build performance for future builds. +// This also affects IntelliSense performance, including code completion and many code browsing features. +// However, files listed here are ALL re-compiled if any one of them is updated between builds. +// Do not add files here that you will be updating frequently as this negates the performance advantage. + +#ifndef PCH_H +#define PCH_H + +// add headers that you want to pre-compile here +#include "framework.h" + +#endif //PCH_H diff --git a/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj b/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj new file mode 100644 index 0000000..dfa997a --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {16B18B99-3E41-41D5-8743-FB8B4F477FCC} + Win32Proj + rawinputdll + 10.0.16299.0 + + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + LibRawInput + + + false + + + false + + + + NotUsing + Level3 + Disabled + true + WIN32;_DEBUG;RAWINPUTDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + + + Windows + true + false + + + + + NotUsing + Level3 + Disabled + true + _DEBUG;RAWINPUTDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + + + Windows + true + false + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;RAWINPUTDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + + + Windows + true + true + true + false + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;RAWINPUTDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + + + Windows + true + true + true + false + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj.filters b/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj.filters new file mode 100644 index 0000000..bd9682f --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj.user b/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/rawinputdll.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.pch b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.pch new file mode 100644 index 0000000..b2ab003 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.pch differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/dllmain.obj b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/dllmain.obj new file mode 100644 index 0000000..bb38045 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/dllmain.obj differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/pch.obj b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/pch.obj new file mode 100644 index 0000000..0dd8bdc Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/pch.obj differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.log b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.log new file mode 100644 index 0000000..79b3312 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.log @@ -0,0 +1,30 @@ + dllmain.cpp +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(119): warning C4311: '': pointer truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(119): warning C4302: '': truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(120): warning C4311: '': pointer truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(120): warning C4302: '': truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(121): warning C4311: '': pointer truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(121): warning C4302: '': truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(122): warning C4311: '': pointer truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(122): warning C4302: '': truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(123): warning C4311: '': pointer truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(123): warning C4302: '': truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(124): warning C4311: '': pointer truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(124): warning C4302: '': truncation from 'const HANDLE' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(147): warning C4311: '': pointer truncation from 'HRAWINPUT' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(147): warning C4302: '': truncation from 'HRAWINPUT' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(189): warning C4311: '': pointer truncation from 'HRAWINPUT' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(189): warning C4302: '': truncation from 'HRAWINPUT' to 'int32_t' +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(323): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(328): warning C4311: '': pointer truncation from '_Ty1' to 'int32_t' + with + [ + _Ty1=HANDLE + ] +a:\code\namedropper\rawinputdll\rawinputdll\rawinputdll\dllmain.cpp(328): warning C4302: '': truncation from '_Ty1' to 'int32_t' + with + [ + _Ty1=HANDLE + ] + Creating library A:\code\namedropper\rawinputdll\rawinputdll\x64\Debug\$LibRawInput.dll.lib and object A:\code\namedropper\rawinputdll\rawinputdll\x64\Debug\$LibRawInput.dll.exp + rawinputdll.vcxproj -> A:\code\namedropper\rawinputdll\rawinputdll\x64\Debug\$LibRawInput.dll.dll diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.command.1.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.command.1.tlog new file mode 100644 index 0000000..fb9d4a9 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.command.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.read.1.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.read.1.tlog new file mode 100644 index 0000000..a0fdb03 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.read.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.write.1.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.write.1.tlog new file mode 100644 index 0000000..0194101 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/CL.write.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.command.1.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.command.1.tlog new file mode 100644 index 0000000..d81d52b Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.command.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.read.1.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.read.1.tlog new file mode 100644 index 0000000..c4810d9 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.read.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.write.1.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.write.1.tlog new file mode 100644 index 0000000..e997a2b Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/link.write.1.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/rawinputdll.lastbuildstate b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/rawinputdll.lastbuildstate new file mode 100644 index 0000000..7722955 --- /dev/null +++ b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/rawinputdll.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0 +Debug|x64|A:\code\namedropper\rawinputdll\rawinputdll\| diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/rawinputdll.write.1u.tlog b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/rawinputdll.write.1u.tlog new file mode 100644 index 0000000..0e7a77e Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/rawinputdll.tlog/rawinputdll.write.1u.tlog differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/vc141.idb b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/vc141.idb new file mode 100644 index 0000000..51d86e1 Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/vc141.idb differ diff --git a/rawinputdll/rawinputdll/rawinputdll/x64/Debug/vc141.pdb b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/vc141.pdb new file mode 100644 index 0000000..d9022db Binary files /dev/null and b/rawinputdll/rawinputdll/rawinputdll/x64/Debug/vc141.pdb differ diff --git a/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.exp b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.exp new file mode 100644 index 0000000..275615d Binary files /dev/null and b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.exp differ diff --git a/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.ilk b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.ilk new file mode 100644 index 0000000..ede4886 Binary files /dev/null and b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.ilk differ diff --git a/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.lib b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.lib new file mode 100644 index 0000000..056aac3 Binary files /dev/null and b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.lib differ diff --git a/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.pdb b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.pdb new file mode 100644 index 0000000..47436ae Binary files /dev/null and b/rawinputdll/rawinputdll/x64/Debug/$LibRawInput.dll.pdb differ diff --git a/rawinputdll/rawinputdll/x64/Debug/LibRawInput.dll b/rawinputdll/rawinputdll/x64/Debug/LibRawInput.dll new file mode 100644 index 0000000..276dfd9 Binary files /dev/null and b/rawinputdll/rawinputdll/x64/Debug/LibRawInput.dll differ