Navigation
API > API/Runtime > API/Runtime/ApplicationCore > API/Runtime/ApplicationCore/IPlatformInputDeviceMapper
Description
Functions to provide compatibility between the old "int32 ControllerId" and the new FPlatformUserId and FInputDeviceId structs. Remap a FPlatformUserId to a ControllerId that is needed by legacy code. Use this function to add compatibility to platforms that may not have implemented this device mapper yet.
Derived Overrides
| Name | RemapUserAndDeviceToControllerId |
| Type | function |
| Header File | /Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/GenericPlatformInputDeviceMapper.h |
| Include Path | #include "GenericPlatform/GenericPlatformInputDeviceMapper.h" |
bool RemapUserAndDeviceToControllerId
(
FPlatformUserId UserId,
int32 & OutControllerId,
FInputDeviceId OptionalDeviceId
)
True if this maps to a real user
Parameters
| Name | Remarks |
|---|---|
| UserId | The platform user that should be converted |
| OutControllerId | Set to the old plain "int32" that represented gamepad id or user index depending on the context. |
| OptionalDeviceId | Set this to a specific device id if known |