mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:43:00 +08:00
Use async overloads
This commit is contained in:
parent
78c43641d1
commit
62b1e37f73
@ -116,13 +116,13 @@ namespace osu.Game.Graphics
|
||||
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
Block a user