diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-21 16:38:23 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-03-21 16:38:23 -0400 |
commit | 75f3600ab1eae06463ae8f386c5ab71f3815142f (patch) | |
tree | 5bff95c0446b9e70a06c1525fa7387b21ff148cc /src/SMAPI/Framework/InternalExtensions.cs | |
parent | fc5fc54ab1c375e20b3e4f947bb11f08b4983bd1 (diff) | |
parent | 74215e844ae2af0075e5df3ab6a5f58efff4f981 (diff) | |
download | SMAPI-75f3600ab1eae06463ae8f386c5ab71f3815142f.tar.gz SMAPI-75f3600ab1eae06463ae8f386c5ab71f3815142f.tar.bz2 SMAPI-75f3600ab1eae06463ae8f386c5ab71f3815142f.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/InternalExtensions.cs')
-rw-r--r-- | src/SMAPI/Framework/InternalExtensions.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/SMAPI/Framework/InternalExtensions.cs b/src/SMAPI/Framework/InternalExtensions.cs index ba1879da..ab7f1e6c 100644 --- a/src/SMAPI/Framework/InternalExtensions.cs +++ b/src/SMAPI/Framework/InternalExtensions.cs @@ -179,15 +179,10 @@ namespace StardewModdingAPI.Framework /// <param name="reflection">The reflection helper with which to access private fields.</param> public static bool IsOpen(this SpriteBatch spriteBatch, Reflector reflection) { - // get field name - const string fieldName = -#if SMAPI_FOR_WINDOWS - "inBeginEndPair"; -#else - "_beginCalled"; -#endif + string fieldName = Constants.GameFramework == GameFramework.Xna + ? "inBeginEndPair" + : "_beginCalled"; - // get result return reflection.GetField<bool>(Game1.spriteBatch, fieldName).GetValue(); } } |