You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- The detection criteria can be defined in gamepad assets - Limited because XInput makes it totally impossible to distinguish between different controller types (other plugin sources will still work), so to preserve the ability to set a preference in project settings the logic prefers to stick with an existing match rather than switching to something else, but otherwise will prefer the first match found in the controller asset list #codereview nick.darnell, daren.cheng [CL 16716911 by Michael Noland in ue5-main branch]
82 lines
1.7 KiB
C#
82 lines
1.7 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using UnrealBuildTool;
|
|
|
|
public class CommonInput : ModuleRules
|
|
{
|
|
public CommonInput(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
PublicDependencyModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
"Core",
|
|
"CoreUObject",
|
|
"Engine",
|
|
"InputCore",
|
|
"DeveloperSettings"
|
|
}
|
|
);
|
|
|
|
PrivateDependencyModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
"SlateCore",
|
|
"Slate",
|
|
"ApplicationCore",
|
|
"EngineSettings"
|
|
}
|
|
);
|
|
|
|
PrivateIncludePaths.AddRange(
|
|
new string[]
|
|
{
|
|
"CommonInput/Private",
|
|
}
|
|
);
|
|
|
|
if (Target.Type == TargetType.Editor)
|
|
{
|
|
PublicDependencyModuleNames.AddRange(
|
|
new string[] {
|
|
"EditorFramework",
|
|
"UnrealEd",
|
|
}
|
|
);
|
|
}
|
|
|
|
string CommonUIPlatform = ToCommonUIPlatform(Target.Platform);
|
|
if (!string.IsNullOrEmpty(CommonUIPlatform))
|
|
{
|
|
PublicDefinitions.Add("UE_COMMONINPUT_PLATFORM_TYPE = " + CommonUIPlatform);
|
|
}
|
|
|
|
PrivateDependencyModuleNames.Add("GeForceNOWWrapper");
|
|
}
|
|
|
|
static public string ToCommonUIPlatform(UnrealTargetPlatform TargetPlatform)
|
|
{
|
|
if (TargetPlatform == UnrealTargetPlatform.Win64)
|
|
{
|
|
return "PC";
|
|
}
|
|
else if (TargetPlatform == UnrealTargetPlatform.Mac)
|
|
{
|
|
return "Mac";
|
|
}
|
|
else if (TargetPlatform == UnrealTargetPlatform.Linux)
|
|
{
|
|
return "PC";
|
|
}
|
|
else if (TargetPlatform == UnrealTargetPlatform.IOS)
|
|
{
|
|
return "IOS";
|
|
}
|
|
else if (TargetPlatform == UnrealTargetPlatform.Android)
|
|
{
|
|
return "Android";
|
|
}
|
|
|
|
return string.Empty;
|
|
}
|
|
}
|