Files
UnleashedRecomp-hedge-dev/UnleashedRecomp/hid/hid.h
Hyper fc99db7c97 Fixed village camera receiving input in options menu, replaced extra nav inputs in achievements menu with fast scroll (#344)
* options_menu: prohibit right stick input to prevent camera moving in villages

* achievement_menu: remove extra nav inputs, implemented fast scroll

* achievement_menu: replicate skills menu fast scrolling
2025-02-09 21:18:59 +00:00

50 lines
1.1 KiB
C++

#pragma once
namespace hid
{
enum class EInputDevice
{
Keyboard,
Mouse,
Xbox,
PlayStation
};
enum class EInputDeviceExplicit
{
Unknown,
Xbox360,
XboxOne,
DualShock3,
DualShock4,
SwitchPro,
Virtual,
DualSense,
Luna,
Stadia,
NvShield,
SwitchJCLeft,
SwitchJCRight,
SwitchJCPair
};
extern EInputDevice g_inputDevice;
extern EInputDevice g_inputDeviceController;
extern EInputDeviceExplicit g_inputDeviceExplicit;
extern uint16_t g_prohibitedButtons;
extern bool g_isLeftStickProhibited;
extern bool g_isRightStickProhibited;
void Init();
uint32_t GetState(uint32_t dwUserIndex, XAMINPUT_STATE* pState);
uint32_t SetState(uint32_t dwUserIndex, XAMINPUT_VIBRATION* pVibration);
uint32_t GetCapabilities(uint32_t dwUserIndex, XAMINPUT_CAPABILITIES* pCaps);
void SetProhibitedInputs(uint16_t wButtons = 0, bool leftStick = false, bool rightStick = false);
bool IsInputAllowed();
bool IsInputDeviceController();
std::string GetInputDeviceName();
}