Skip to content

Commit

Permalink
Merge pull request #33 from yesser-studios/mac-borderless
Browse files Browse the repository at this point in the history
Force borderless window on Unix-based systems
  • Loading branch information
yesseruser authored Oct 9, 2024
2 parents 5c53379 + a7b6934 commit 88ba5bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Pong.Game.Shared/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Runtime.InteropServices;

namespace Pong.Game
{
Expand Down Expand Up @@ -86,6 +87,9 @@ protected override void Initialize()
_graphics.HardwareModeSwitch = false;
#endif

if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
_graphics.HardwareModeSwitch = false; // Force borderless window on Mac

_graphics.ApplyChanges();

base.Initialize();
Expand Down

0 comments on commit 88ba5bc

Please sign in to comment.