mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
fix color extension bug (#925)
* fix color extension bug * add preprocessor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user