Permalink
Browse files

Merge pull request #41 from Bengrs/master

Fix for Mac Support
  • Loading branch information...
2 parents 0757a31 + f478193 commit 0e82765f7ae931e074d2222bab18f580794e209d @RHY3756547 committed on GitHub Dec 20, 2016
@@ -432,6 +432,10 @@
<Content Include="sdl2.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
+ <Compile Include="Utils\GameLocator\MacOSLocator.cs" />
+ <Content Include="Monogame\MacOS\libxammac.dylib">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
</ItemGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
@@ -471,15 +475,9 @@
<Content Include="Monogame\MacOS\MonoGame.Framework.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="Monogame\MacOS\MonoMac.dll">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="Monogame\MacOS\OpenTK.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="Monogame\MacOS\OpenTK.dll.mdb">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="Monogame\MacOS\Tao.Sdl.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
@@ -5,21 +5,20 @@
</assembly>
<members>
<member name="P:Microsoft.Xna.Framework.Net.MonoGamerPeer.SimulatedLatency">
- <summary>
- Used to Simulate the delay between computers
- </summary>
- </member>
+ <summary>
+ Used to Simulate the delay between computers
+ </summary>
+ </member>
<member name="P:Microsoft.Xna.Framework.Net.MonoGamerPeer.SimulatedPacketLoss">
- <summary>
- Used to simulate the number of packets you might expect to loose.
- </summary>
- </member>
+ <summary>
+ Used to simulate the number of packets you might expect to loose.
+ </summary>
+ </member>
<member name="M:Microsoft.Xna.Framework.Net.MonoGamerPeer.GetServerList(Lidgren.Network.NetPeer)">
- <summary>
- Contacts the Master Server on the net and gets a list of available host games
- </summary>
- <param name="netPeer">
- </param>
- </member>
+ <summary>
+ Contacts the Master Server on the net and gets a list of available host games
+ </summary>
+ <param name="netPeer"></param>
+ </member>
</members>
</doc>
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
View
Binary file not shown.
No changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -40,8 +40,12 @@ public static bool InitWithArguments(string[] args)
ILocator gameLocator;
bool linux = pid == PlatformID.MacOSX || pid == PlatformID.Unix;
- if (linux) gameLocator = new LinuxLocator();
- else gameLocator = new WindowsLocator();
+ if (linux && Directory.Exists("/Users"))
+ gameLocator = new MacOSLocator();
+ else if (linux)
+ gameLocator = new LinuxLocator();
+ else
+ gameLocator = new WindowsLocator();
bool useDX = false;
@@ -118,6 +118,14 @@ protected override void Initialize()
}
/// <summary>
+ /// Run this instance with GameRunBehavior forced as Synchronous.
+ /// </summary>
+ public new void Run()
+ {
+ Run(GameRunBehavior.Synchronous);
+ }
+
+ /// <summary>
/// Only used on desktop targets. Use extensive reflection to AVOID linking on iOS!
/// </summary>
void AddTextInput()
@@ -0,0 +1,12 @@
+using System;
+
+namespace FSO.Client.Utils.GameLocator
+{
+ public class MacOSLocator : ILocator
+ {
+ public string FindTheSimsOnline()
+ {
+ return string.Format("{0}/Documents/The Sims Online/TSOClient/", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
+ }
+ }
+}
@@ -39,13 +39,14 @@ public static bool Link(bool preferDX11)
monogameDir = "Monogame/Windows/";
}
}
- else if (pid == PlatformID.Unix)
+ //Check if MacOS by checkking user directory. Because PlatformID.MacOSX is not true on OS X.
+ else if (Directory.Exists("/Users"))
{
- monogameDir = "Monogame/Linux/";
+ monogameDir = "Monogame/MacOS/";
}
- else if (pid == PlatformID.MacOSX)
+ else
{
- monogameDir = "Monogame/MacOS/";
+ monogameDir = "Monogame/Linux/";
}
//DirectoryCopy(contentDir, "Content/", true);

0 comments on commit 0e82765

Please sign in to comment.