Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion scripts/SplitScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void LayoutPlayersRedirect(GameViewportClient self)
return;
}

// For 2-player horizontal, crop sides to maintain 16:9 layout
// For 2-player horizontal, crop to maintain aspect ratio
if (
engine.GamePlayers.Count == 2
&& self.ActiveSplitscreenType == ESplitScreenType.eSST_2P_HORIZONTAL
Expand All @@ -136,6 +136,28 @@ public static void LayoutPlayersRedirect(GameViewportClient self)
p2.AspectRatioAxisConstraint = EAspectRatioAxisConstraint.AspectRatio_MaintainYFOV;
}
}
// For 2-player vertical, crop to maintain aspect ratio
else if (
self.ActiveSplitscreenType == ESplitScreenType.eSST_2P_VERTICAL
&& engine.GamePlayers.Count == 2
)
{
var p1 = engine.GamePlayers[0];
var p2 = engine.GamePlayers[1];

if (Instance.UseLetterboxing)
{
p1.Size.Y = 0.5f;
p1.Origin.Y = 0.25f;
p2.Size.Y = 0.5f;
p2.Origin.Y = 0.25f;
}
else
{
p1.AspectRatioAxisConstraint = EAspectRatioAxisConstraint.AspectRatio_MaintainYFOV;
p2.AspectRatioAxisConstraint = EAspectRatioAxisConstraint.AspectRatio_MaintainYFOV;
}
}
}

// Force IsMultiplayer() to return false - fixes the level-up screen and possibly other bugs
Expand Down