forked from hedge-dev/UnleashedRecomp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhid.cpp
More file actions
29 lines (24 loc) · 801 Bytes
/
Copy pathhid.cpp
File metadata and controls
29 lines (24 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "hid.h"
#include <ui/game_window.h>
#include <user/config.h>
hid::EInputDevice hid::g_inputDevice;
hid::EInputDevice hid::g_inputDeviceController;
hid::EInputDeviceExplicit hid::g_inputDeviceExplicit;
uint16_t hid::g_prohibitedButtons;
bool hid::g_isLeftStickProhibited;
bool hid::g_isRightStickProhibited;
void hid::SetProhibitedInputs(uint16_t wButtons, bool leftStick, bool rightStick)
{
hid::g_prohibitedButtons = wButtons;
hid::g_isLeftStickProhibited = leftStick;
hid::g_isRightStickProhibited = rightStick;
}
bool hid::IsInputAllowed()
{
return GameWindow::s_isFocused || Config::AllowBackgroundInput;
}
bool hid::IsInputDeviceController()
{
return hid::g_inputDevice != hid::EInputDevice::Keyboard &&
hid::g_inputDevice != hid::EInputDevice::Mouse;
}