diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-17 20:36:31 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-21 16:05:15 -0400 |
commit | 73321eceb96f263f10857667d7b3726a5098e770 (patch) | |
tree | 440d79377c7be7184e8154aa500e7ca6b6372953 /src/SMAPI.Mods.ErrorHandler | |
parent | fdfb060795a0cca62bc98df97c28160160f4317a (diff) | |
download | SMAPI-73321eceb96f263f10857667d7b3726a5098e770.tar.gz SMAPI-73321eceb96f263f10857667d7b3726a5098e770.tar.bz2 SMAPI-73321eceb96f263f10857667d7b3726a5098e770.zip |
split compile flag into separate Windows + XNA flags (#767)
Diffstat (limited to 'src/SMAPI.Mods.ErrorHandler')
-rw-r--r-- | src/SMAPI.Mods.ErrorHandler/Patches/SpriteBatchValidationPatches.cs | 4 | ||||
-rw-r--r-- | src/SMAPI.Mods.ErrorHandler/SMAPI.Mods.ErrorHandler.csproj | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/SMAPI.Mods.ErrorHandler/Patches/SpriteBatchValidationPatches.cs b/src/SMAPI.Mods.ErrorHandler/Patches/SpriteBatchValidationPatches.cs index 95e4f5ef..f605b2ce 100644 --- a/src/SMAPI.Mods.ErrorHandler/Patches/SpriteBatchValidationPatches.cs +++ b/src/SMAPI.Mods.ErrorHandler/Patches/SpriteBatchValidationPatches.cs @@ -27,7 +27,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches #endif { harmony.Patch( -#if SMAPI_FOR_WINDOWS +#if SMAPI_FOR_XNA original: AccessTools.Method(typeof(SpriteBatch), "InternalDraw"), #else original: AccessTools.Method(typeof(SpriteBatch), "CheckValid", new[] { typeof(Texture2D) }), @@ -40,7 +40,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches /********* ** Private methods *********/ -#if SMAPI_FOR_WINDOWS +#if SMAPI_FOR_XNA /// <summary>The method to call instead of <see cref="SpriteBatch.InternalDraw"/>.</summary> /// <param name="texture">The texture to validate.</param> #else diff --git a/src/SMAPI.Mods.ErrorHandler/SMAPI.Mods.ErrorHandler.csproj b/src/SMAPI.Mods.ErrorHandler/SMAPI.Mods.ErrorHandler.csproj index 5c0cf952..e5ce8f5e 100644 --- a/src/SMAPI.Mods.ErrorHandler/SMAPI.Mods.ErrorHandler.csproj +++ b/src/SMAPI.Mods.ErrorHandler/SMAPI.Mods.ErrorHandler.csproj @@ -7,6 +7,8 @@ <PlatformTarget>x86</PlatformTarget> </PropertyGroup> + <Import Project="..\..\build\common.targets" /> + <ItemGroup> <ProjectReference Include="..\SMAPI\SMAPI.csproj" Private="False" /> <Reference Include="..\..\build\0Harmony.dll" Private="False" /> @@ -16,19 +18,21 @@ <Reference Include="$(GameExecutableName)" HintPath="$(GamePath)\$(GameExecutableName).exe" Private="False" /> </ItemGroup> + <!-- Windows only --> + <ItemGroup Condition="'$(OS)' == 'Windows_NT'"> + <Reference Include="Netcode" HintPath="$(GamePath)\Netcode.dll" Private="False" /> + </ItemGroup> + + <!-- Game framework --> <Choose> - <!-- Windows --> - <When Condition="$(OS) == 'Windows_NT'"> + <When Condition="$(DefineConstants.Contains(SMAPI_FOR_XNA))"> <ItemGroup> - <Reference Include="Netcode" HintPath="$(GamePath)\Netcode.dll" Private="False" /> <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" Private="False" /> <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" Private="False" /> <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" Private="False" /> <Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" Private="False" /> </ItemGroup> </When> - - <!-- Linux/Mac --> <Otherwise> <ItemGroup> <Reference Include="MonoGame.Framework" HintPath="$(GamePath)\MonoGame.Framework.dll" Private="False" /> @@ -42,5 +46,4 @@ </ItemGroup> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" /> - <Import Project="..\..\build\common.targets" /> </Project> |