mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-12 16:58:29 +00:00
Merge pull request #70 from hmmwhatsthisdo/enablekeypresscallback_issue69
Add sanity-check to CueSDK.EnableKeypressHandler()
This commit is contained in:
commit
850eb66b3b
@ -269,6 +269,9 @@ namespace CUE.NET
|
|||||||
if (!IsInitialized)
|
if (!IsInitialized)
|
||||||
throw new WrapperException("CueSDK isn't initialized.");
|
throw new WrapperException("CueSDK isn't initialized.");
|
||||||
|
|
||||||
|
if (_onKeyPressedDelegate != null)
|
||||||
|
return;
|
||||||
|
|
||||||
_onKeyPressedDelegate = OnKeyPressed;
|
_onKeyPressedDelegate = OnKeyPressed;
|
||||||
_CUESDK.CorsairRegisterKeypressCallback(Marshal.GetFunctionPointerForDelegate(_onKeyPressedDelegate), IntPtr.Zero);
|
_CUESDK.CorsairRegisterKeypressCallback(Marshal.GetFunctionPointerForDelegate(_onKeyPressedDelegate), IntPtr.Zero);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user