1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 21:02:54 +08:00

Use async overloads

This commit is contained in:
smoogipoo 2020-12-03 18:04:53 +09:00
parent 78c43641d1
commit 62b1e37f73

View File

@ -116,13 +116,13 @@ namespace osu.Game.Graphics
switch (screenshotFormat.Value) switch (screenshotFormat.Value)
{ {
case ScreenshotFormat.Png: case ScreenshotFormat.Png:
image.SaveAsPng(stream); await image.SaveAsPngAsync(stream);
break; break;
case ScreenshotFormat.Jpg: case ScreenshotFormat.Jpg:
const int jpeg_quality = 92; const int jpeg_quality = 92;
image.SaveAsJpeg(stream, new JpegEncoder { Quality = jpeg_quality }); await image.SaveAsJpegAsync(stream, new JpegEncoder { Quality = jpeg_quality });
break; break;
default: default: