From 202a3f7cfc9248d101140e29a7950ea835b5453b Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 17 Mar 2021 07:47:14 -0400 Subject: [PATCH] Store prodName/guid --- BeefLibs/Beefy2D/src/input/InputManager.bf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BeefLibs/Beefy2D/src/input/InputManager.bf b/BeefLibs/Beefy2D/src/input/InputManager.bf index 37fad069..bd39f192 100644 --- a/BeefLibs/Beefy2D/src/input/InputManager.bf +++ b/BeefLibs/Beefy2D/src/input/InputManager.bf @@ -10,6 +10,8 @@ namespace Beefy.input [CallingConvention(.Stdcall), CLink] public static extern char8* BFInput_GetState(void* nativeInputDevice); + public String mProdName ~ delete _; + public String mGUID ~ delete _; void* mNativeInputDevice; public ~this() @@ -36,12 +38,14 @@ namespace Beefy.input outData.Append(BFApp_EnumerateInputDevices()); } - public InputDevice CreateInputDevice(StringView guid) + public InputDevice CreateInputDevice(StringView prodName, StringView guid) { void* nativeInputDevice = BFApp_CreateInputDevice(guid.ToScopeCStr!()); if (nativeInputDevice == null) return null; InputDevice inputDevice = new .(); + inputDevice.mProdName = new String(prodName); + inputDevice.mGUID = new String(guid); inputDevice.[Friend]mNativeInputDevice = nativeInputDevice; return inputDevice; }