mirror of https://github.com/ppy/osu
Use async overloads
This commit is contained in:
parent
78c43641d1
commit
62b1e37f73
|
@ -116,13 +116,13 @@ public Task TakeScreenshotAsync() => Task.Run(async () =>
|
|||
switch (screenshotFormat.Value)
|
||||
{
|
||||
case ScreenshotFormat.Png:
|
||||
image.SaveAsPng(stream);
|
||||
await image.SaveAsPngAsync(stream);
|
||||
break;
|
||||
|
||||
case ScreenshotFormat.Jpg:
|
||||
const int jpeg_quality = 92;
|
||||
|
||||
image.SaveAsJpeg(stream, new JpegEncoder { Quality = jpeg_quality });
|
||||
await image.SaveAsJpegAsync(stream, new JpegEncoder { Quality = jpeg_quality });
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue