Merge branch 'master' into grey-logo-animation

This commit is contained in:
Dean Herbert
2020-07-27 14:10:52 +09:00
72 changed files with 1170 additions and 242 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
@ -55,7 +54,16 @@ namespace osu.Game.Graphics.Cursor
return;
}
var newTarget = inputManager.HoveredDrawables.OfType<IProvideCursor>().FirstOrDefault(t => t.ProvidingUserCursor) ?? this;
IProvideCursor newTarget = this;
foreach (var d in inputManager.HoveredDrawables)
{
if (d is IProvideCursor p && p.ProvidingUserCursor)
{
newTarget = p;
break;
}
}
if (currentTarget == newTarget)
return;

View File

@ -19,6 +19,7 @@ using osu.Game.Input.Bindings;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
namespace osu.Game.Graphics
{
@ -119,7 +120,9 @@ namespace osu.Game.Graphics
break;
case ScreenshotFormat.Jpg:
image.SaveAsJpeg(stream);
const int jpeg_quality = 92;
image.SaveAsJpeg(stream, new JpegEncoder { Quality = jpeg_quality });
break;
default: