fix color extension bug (#925)

* fix color extension bug

* add preprocessor
This commit is contained in:
Srayan Jana
2024-07-29 08:25:26 -07:00
committed by GitHub
parent 3ca0a3ef2a
commit 40d260b454
+10 -1
View File
@@ -100,7 +100,16 @@ namespace MonoGame.Extended
(abgr & 0x00FF0000) >> 8 | // Green
(abgr & 0xFF000000) >> 24; // Red
return new Color(rgba);
Color result;
#if FNA
result = default;
result.PackedValue = rgba;
#else
result = new Color(rgba);
#endif
return result;
}
}
}