upload
This commit is contained in:
commit
1c7a8cf25f
579 files changed
+83196
No files matched your search
@@ -0,0 +1,23 @@
|
||||
namespace VibranceHud.Hotkeys;
|
||||
|
||||
public static class RawInputPolicy
|
||||
{
|
||||
public static (bool Keyboard, bool Mouse) Wanted(bool offered, bool bound, int vk, uint modifiers, bool gameOnly, bool gameRunning)
|
||||
{
|
||||
if (!offered || !bound || (gameOnly && !gameRunning))
|
||||
{
|
||||
return (Keyboard: false, Mouse: false);
|
||||
}
|
||||
bool flag = IsMouseButton(vk);
|
||||
return (Keyboard: !flag || modifiers != 0, Mouse: flag);
|
||||
}
|
||||
|
||||
public static bool IsMouseButton(int vk)
|
||||
{
|
||||
if ((uint)(vk - 4) <= 2u)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user