Skip to content

Commit

Permalink
Added PlayStation 5 support (MonoGame#7645)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhelmut authored and viniciusjarina committed Jan 17, 2022
1 parent 2eb893b commit 306830f
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
'$(MonoGamePlatform)' != 'WindowsPhone8' And
'$(MonoGamePlatform)' != 'RaspberryPi' And
'$(MonoGamePlatform)' != 'PlayStation4' And
'$(MonoGamePlatform)' != 'PlayStation5' And
'$(MonoGamePlatform)' != 'XboxOne' And
'$(MonoGamePlatform)' != 'WindowsGL'" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
<Import Project="..\Switch\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\Switch\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\XBoxOne\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\XBoxOne\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\PlayStation4\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\PlayStation4\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\PlayStation5\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\PlayStation5\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\PSVita\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\PSVita\MonoGame.Framework.Content.Pipeline.targets')" />
<Import Project="..\Stadia\MonoGame.Framework.Content.Pipeline.targets" Condition="exists('..\Stadia\MonoGame.Framework.Content.Pipeline.targets')" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public sealed class ContentWriter : BinaryWriter
'M', // WindowsPhone8
'r', // RaspberryPi
'P', // PlayStation4
'5', // PlayStation5
'O', // XboxOne
'S', // Nintendo Switch
'G', // Google Stadia
Expand Down
7 changes: 6 additions & 1 deletion MonoGame.Framework.Content.Pipeline/TargetPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ public enum TargetPlatform
/// Sony PlayStation4
/// </summary>
PlayStation4,


/// <summary>
/// Sony PlayStation5
/// </summary>
PlayStation5,

/// <summary>
/// Xbox One
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions MonoGame.Framework/Content/ContentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public partial class ContentManager : IDisposable
'M', // WindowsPhone8
'r', // RaspberryPi
'P', // PlayStation4
'5', // PlayStation5
'O', // XboxOne
'S', // Nintendo Switch
'G', // Google Stadia
Expand Down
5 changes: 5 additions & 0 deletions MonoGame.Framework/Utilities/MonoGamePlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public enum MonoGamePlatform
/// </summary>
PlayStation4,

/// <summary>
/// MonoGame PlayStation 5 platform.
/// </summary>
PlayStation5,

/// <summary>
/// MonoGame Nintendo Switch platform.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions MonoGame.Framework/Utilities/PlatformInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static MonoGamePlatform MonoGamePlatform
return MonoGamePlatform.XboxOne;
#elif PLAYSTATION4
return MonoGamePlatform.PlayStation4;
#elif PLAYSTATION5
return MonoGamePlatform.PlayStation5;
#elif STADIA
return MonoGamePlatform.Stadia;
#endif
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ We support a growing list of platforms across the desktop, mobile, and console s
* Windows Phone 10 (UWP)
* Consoles (for registered developers)
* PlayStation 4
* PlayStation 5
* Xbox One (both UWP and XDK)
* Nintendo Switch
* Google Stadia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<Import Project="..\..\Switch\MonoGame.Effect.Compiler.targets" Condition="exists('..\..\Switch\MonoGame.Effect.Compiler.targets')" />
<Import Project="..\..\XBoxOne\MonoGame.Effect.Compiler.targets" Condition="exists('..\..\XBoxOne\MonoGame.Effect.Compiler.targets')" />
<Import Project="..\..\PlayStation4\MonoGame.Effect.Compiler.targets" Condition="exists('..\..\PlayStation4\MonoGame.Effect.Compiler.targets')" />
<Import Project="..\..\PlayStation5\MonoGame.Effect.Compiler.targets" Condition="exists('..\..\PlayStation5\MonoGame.Effect.Compiler.targets')" />
<Import Project="..\..\Stadia\MonoGame.Effect.Compiler.targets" Condition="exists('..\..\Stadia\MonoGame.Effect.Compiler.targets')" />

</Project>
Expand Down
1 change: 1 addition & 0 deletions Tools/MonoGame.Tools.Tests/TestCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected override Stream OpenStream(string assetName)
TargetPlatform.WindowsPhone8,
TargetPlatform.RaspberryPi,
TargetPlatform.PlayStation4,
TargetPlatform.PlayStation5,
TargetPlatform.XboxOne,
TargetPlatform.Switch,
TargetPlatform.Web
Expand Down

0 comments on commit 306830f

Please sign in to comment.