2021-04-08 14:32:07 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
using UnrealBuildTool;
|
|
|
|
|
|
|
|
|
|
public class CommonInput : ModuleRules
|
|
|
|
|
{
|
|
|
|
|
public CommonInput(ReadOnlyTargetRules Target) : base(Target)
|
|
|
|
|
{
|
|
|
|
|
PublicDependencyModuleNames.AddRange(
|
|
|
|
|
new string[]
|
CommonInput - Using the new UPlatformSettings, to store per-platform information into an NDA location when each platform is configured. These changes make it so we use the 'real' platform ini name, e.g. There's no more "PC" platform as far as the common input exists for configuring the platforms. So if you setup linux, that's another platform you'd configure. The gamepads are still wonky, they're trying to use platform ini names for gamepad names, going to refactor that so it's not coming from platform names. Made an upgrade path for the old settings that will update and then clear the old configuration. Also removed some settings that were added to DataDrivenPlatformInfo that don't make sense, and updated some platforms that never got the settings to begin with.
#review-16605256 Josh.Adams, Michael.Noland, Daren.Cheng
#fyi Josh.Adams, Michael.Noland, Daren.Cheng
[CL 16605253 by Nick Darnell in ue5-main branch]
2021-06-09 10:44:46 -04:00
|
|
|
{
|
2021-04-08 14:32:07 -04:00
|
|
|
"Core",
|
|
|
|
|
"CoreUObject",
|
|
|
|
|
"Engine",
|
CommonInput - Using the new UPlatformSettings, to store per-platform information into an NDA location when each platform is configured. These changes make it so we use the 'real' platform ini name, e.g. There's no more "PC" platform as far as the common input exists for configuring the platforms. So if you setup linux, that's another platform you'd configure. The gamepads are still wonky, they're trying to use platform ini names for gamepad names, going to refactor that so it's not coming from platform names. Made an upgrade path for the old settings that will update and then clear the old configuration. Also removed some settings that were added to DataDrivenPlatformInfo that don't make sense, and updated some platforms that never got the settings to begin with.
#review-16605256 Josh.Adams, Michael.Noland, Daren.Cheng
#fyi Josh.Adams, Michael.Noland, Daren.Cheng
[CL 16605253 by Nick Darnell in ue5-main branch]
2021-06-09 10:44:46 -04:00
|
|
|
"InputCore",
|
2023-02-11 12:26:44 -05:00
|
|
|
"EnhancedInput",
|
CommonInput - Using the new UPlatformSettings, to store per-platform information into an NDA location when each platform is configured. These changes make it so we use the 'real' platform ini name, e.g. There's no more "PC" platform as far as the common input exists for configuring the platforms. So if you setup linux, that's another platform you'd configure. The gamepads are still wonky, they're trying to use platform ini names for gamepad names, going to refactor that so it's not coming from platform names. Made an upgrade path for the old settings that will update and then clear the old configuration. Also removed some settings that were added to DataDrivenPlatformInfo that don't make sense, and updated some platforms that never got the settings to begin with.
#review-16605256 Josh.Adams, Michael.Noland, Daren.Cheng
#fyi Josh.Adams, Michael.Noland, Daren.Cheng
[CL 16605253 by Nick Darnell in ue5-main branch]
2021-06-09 10:44:46 -04:00
|
|
|
"DeveloperSettings"
|
2021-04-08 14:32:07 -04:00
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
PrivateDependencyModuleNames.AddRange(
|
|
|
|
|
new string[]
|
|
|
|
|
{
|
|
|
|
|
"SlateCore",
|
|
|
|
|
"Slate",
|
2021-06-18 00:38:36 -04:00
|
|
|
"ApplicationCore",
|
2021-04-08 14:32:07 -04:00
|
|
|
"EngineSettings"
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
2021-04-21 10:59:25 -04:00
|
|
|
|
2022-06-03 10:35:31 -04:00
|
|
|
PrivateDefinitions.Add("UE_COMMONINPUT_PLATFORM_KBM_REQUIRES_ATTACHED_MOUSE=" + (bPlatformKBMRequiresAttachedMouse ? "1" : "0"));
|
2023-12-20 12:40:45 -05:00
|
|
|
PrivateDefinitions.Add("UE_COMMONINPUT_FORCE_TOUCH_SUPPORT_DISABLED=" + (bForceTouchSupportDisabled ? "1" : "0"));
|
2021-04-08 14:32:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static public string ToCommonUIPlatform(UnrealTargetPlatform TargetPlatform)
|
|
|
|
|
{
|
2023-03-30 03:56:32 -04:00
|
|
|
if (TargetPlatform.IsInGroup(UnrealPlatformGroup.Windows))
|
2021-04-08 14:32:07 -04:00
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
2022-06-03 10:35:31 -04:00
|
|
|
|
|
|
|
|
protected virtual bool bPlatformKBMRequiresAttachedMouse { get { return false; } }
|
2023-12-20 12:40:45 -05:00
|
|
|
protected virtual bool bForceTouchSupportDisabled { get { return false; } }
|
2021-04-08 14:32:07 -04:00
|
|
|
}
|