Navigation
API > API/Runtime > API/Runtime/ApplicationCore
Thread-safe singleton registry mapping FInputDeviceId to FInputDeviceDescriptor.
This is the intended replacement for FInputDeviceScope::GetCurrent() and is safe to call from multiple threads.
| Name | FInputDeviceRegistry |
| Type | class |
| Header File | /Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/InputDeviceRegistry.h |
| Include Path | #include "GenericPlatform/InputDeviceRegistry.h" |
Syntax
class FInputDeviceRegistry
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DescriptorChangedDelegate | FOnInputDeviceDescriptorChanged | GenericPlatform/InputDeviceRegistry.h | ||
| Descriptors | TMap< FInputDeviceId, FInputDeviceDescriptor > | GenericPlatform/InputDeviceRegistry.h | ||
| Lock | FRWLock | GenericPlatform/InputDeviceRegistry.h | ||
| SimulatedDescriptors | TMap< FInputDeviceId, FInputDeviceDescriptor > | Descriptors set via SetSimulatedDescriptor. Checked first by FindDescriptor. | GenericPlatform/InputDeviceRegistry.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ClearAllSimulatedDescriptors () |
Remove all simulated descriptors at once (e.g. on PIE end or tool teardown). | GenericPlatform/InputDeviceRegistry.h | |
static void ClearSimulatedDescriptor
(
const FInputDeviceId DeviceId |
Remove the simulated descriptor for a device, restoring FindDescriptor to return the real registered descriptor (if any). | GenericPlatform/InputDeviceRegistry.h | |
static TOptional< FInputDeviceDescriptor > FindDescriptor
(
const FInputDeviceId DeviceId |
Look up the descriptor for a device by its FInputDeviceId. | GenericPlatform/InputDeviceRegistry.h | |
static FInputDeviceRegistry & Get() |
Returns the process-wide singleton instance. | GenericPlatform/InputDeviceRegistry.h | |
static void LogRegistryContents () |
Log the current contents of the registry to LogInputDeviceRegistry. | GenericPlatform/InputDeviceRegistry.h | |
static FOnInputDeviceDescriptorChanged & OnInputDeviceDescriptorChanged () |
Returns the singleton's "descriptor changed" multicast delegate. | GenericPlatform/InputDeviceRegistry.h | |
static bool RegisterDevice
(
const FInputDeviceDescriptor& Descriptor |
Register or update the descriptor for a device. | GenericPlatform/InputDeviceRegistry.h | |
static void RemoveDevice
(
const FInputDeviceId DeviceId |
Explicitly remove the descriptor for a device from the registry. | GenericPlatform/InputDeviceRegistry.h | |
static void SetSimulatedDescriptor
(
const FInputDeviceId DeviceId, |
Override the descriptor returned by FindDescriptor for a specific device ID with a simulated one. | GenericPlatform/InputDeviceRegistry.h |