Skip to content

Commit

Permalink
Fixed FNA compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru committed Jul 9, 2024
1 parent cb5789a commit 40b3165
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public static Texture2D MakePremultiplied(Texture2D file)
#if MONOGAME
premultSpriteBatch.Begin(SpriteSortMode.Immediate, blendColor, samplerState: SamplerState.PointClamp);
#else
spriteBatch.Begin(SpriteSortMode.Immediate, blendColor, SamplerState.PointClamp, null, null);
premultSpriteBatch.Begin(SpriteSortMode.Immediate, blendColor, SamplerState.PointClamp, null, null);
#endif
premultSpriteBatch.Draw(file, position, Color.White);
premultSpriteBatch.End();
Expand All @@ -255,7 +255,7 @@ public static Texture2D MakePremultiplied(Texture2D file)
#if MONOGAME
premultSpriteBatch.Begin(SpriteSortMode.Immediate, blendAlpha, samplerState: SamplerState.PointClamp);
#else
spriteBatch.Begin(SpriteSortMode.Immediate, blendAlpha, SamplerState.PointClamp, null, null);
premultSpriteBatch.Begin(SpriteSortMode.Immediate, blendAlpha, SamplerState.PointClamp, null, null);
#endif
premultSpriteBatch.Draw(file, position, Color.White);
premultSpriteBatch.End();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,12 +776,18 @@ public static void MakeNameUnique<T>(T nameable, IList<T> list)
}
}

/// <summary>
/// Adds or increments the number at the end of the nameable's Name until it is unique in the list.
/// </summary>
/// <typeparam name="T">Nameable type</typeparam>
/// <param name="nameable">The nameable instance</param>
/// <param name="list">The list of other nameables.</param>
public static void MakeNameUnique<T>(T nameable, IEnumerable<T> list)
where T : INameable
{
var count = list.Count();

for (int i = 0; i < list.Count(); i++)
for (int i = 0; i < count; i++)
{
var atI = list.ElementAt(i);

Expand Down

0 comments on commit 40b3165

Please sign in to comment.