summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-03-14 18:47:19 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-03-14 18:47:19 -0400
commitdfb12351333dc3deb47f5c33212d7be7d2ac94d7 (patch)
tree2bdc0cbdf65d55e08127b17565a4939836a2abf1 /src/SMAPI/Framework/ContentManagers/ModContentManager.cs
parente80b7712f7e4c78a5b016289ca19efaf7d39cd8b (diff)
downloadSMAPI-dfb12351333dc3deb47f5c33212d7be7d2ac94d7.tar.gz
SMAPI-dfb12351333dc3deb47f5c33212d7be7d2ac94d7.tar.bz2
SMAPI-dfb12351333dc3deb47f5c33212d7be7d2ac94d7.zip
fix semi-transparency issues on Linux/Mac
Apparently Mono no longer premultiplies loaded PNGs by default.
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers/ModContentManager.cs')
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index 4ffe3acd..fda80a83 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -241,13 +241,6 @@ namespace StardewModdingAPI.Framework.ContentManagers
/// <remarks>Based on <a href="https://gamedev.stackexchange.com/a/26037">code by David Gouveia</a>.</remarks>
private Texture2D PremultiplyTransparency(Texture2D texture)
{
- // Textures loaded by Texture2D.FromStream are already premultiplied on Linux/Mac, even
- // though the XNA documentation explicitly says otherwise. That's a glitch in MonoGame
- // fixed in newer versions, but the game uses a bundled version that will always be
- // affected. See https://github.com/MonoGame/MonoGame/issues/4820 for more info.
- if (Constants.TargetPlatform != GamePlatform.Windows)
- return texture;
-
// premultiply pixels
Color[] data = new Color[texture.Width * texture.Height];
texture.GetData(data);