Apply ConfigureAwait changes to game side

This commit is contained in:
Dean Herbert
2021-03-08 12:57:16 +09:00
parent 85bad1ab89
commit b1cd01ceb8
25 changed files with 65 additions and 66 deletions

View File

@ -103,7 +103,7 @@ namespace osu.Game.Graphics
}
}
using (var image = await host.TakeScreenshotAsync())
using (var image = await host.TakeScreenshotAsync().ConfigureAwait(false))
{
if (Interlocked.Decrement(ref screenShotTasks) == 0 && cursorVisibility.Value == false)
cursorVisibility.Value = true;
@ -116,13 +116,13 @@ namespace osu.Game.Graphics
switch (screenshotFormat.Value)
{
case ScreenshotFormat.Png:
await image.SaveAsPngAsync(stream);
await image.SaveAsPngAsync(stream).ConfigureAwait(false);
break;
case ScreenshotFormat.Jpg:
const int jpeg_quality = 92;
await image.SaveAsJpegAsync(stream, new JpegEncoder { Quality = jpeg_quality });
await image.SaveAsJpegAsync(stream, new JpegEncoder { Quality = jpeg_quality }).ConfigureAwait(false);
break;
default: