You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The UE_COMMONINPUT_PLATFORM_SUPPORTS_TOUCH macro will be replaced with a new UE_COMMONINPUT_FORCE_TOUCH_SUPPORT_DISABLED macro and only enabled on the required platform to match the logic that was in place before the introduction of the UE_COMMONINPUT_PLATFORM_SUPPORTS_TOUCH macro. Also adjusted the logic that overrides the touch support flag on Desktop builds so that the override only applies in the Editor (to support testing with UseMouseForTouch setting enabled or with URemote in the Editor). The previous logic was only overriding the touch support flag in non-Shipping Destop builds, which was causing different touch behaviors on Desktop Test builds and Desktop Shipping builds. #rnx #rb daren.cheng #tests Tested touch support still works when using PIE with UseMouseForTouch enabled or URemote. Tested with a preflight on android, switch and mobile streaming platforms. [CL 30415335 by bernard lambert in ue5-main branch]
80 lines
1.9 KiB
C#
80 lines
1.9 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",
|
|
"EnhancedInput",
|
|
"DeveloperSettings"
|
|
}
|
|
);
|
|
|
|
PrivateDependencyModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
"SlateCore",
|
|
"Slate",
|
|
"ApplicationCore",
|
|
"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);
|
|
}
|
|
|
|
PrivateDefinitions.Add("UE_COMMONINPUT_PLATFORM_KBM_REQUIRES_ATTACHED_MOUSE=" + (bPlatformKBMRequiresAttachedMouse ? "1" : "0"));
|
|
PrivateDefinitions.Add("UE_COMMONINPUT_FORCE_TOUCH_SUPPORT_DISABLED=" + (bForceTouchSupportDisabled ? "1" : "0"));
|
|
}
|
|
|
|
static public string ToCommonUIPlatform(UnrealTargetPlatform TargetPlatform)
|
|
{
|
|
if (TargetPlatform.IsInGroup(UnrealPlatformGroup.Windows))
|
|
{
|
|
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;
|
|
}
|
|
|
|
protected virtual bool bPlatformKBMRequiresAttachedMouse { get { return false; } }
|
|
protected virtual bool bForceTouchSupportDisabled { get { return false; } }
|
|
}
|