mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Use async overloads
This commit is contained in:
@ -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:
|
||||||
|
Reference in New Issue
Block a user