1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 17:15:36 +08:00

Merge pull request #5552 from UselessToucan/do_not_check_cursor_visibility_on_each_update

Remove redundant ScreenshotManager.Update override
This commit is contained in:
Dan Balasescu 2019-08-02 00:47:14 +09:00 committed by GitHub
commit ccb989a191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,8 @@ namespace osu.Game.Graphics
using (var image = await host.TakeScreenshotAsync())
{
Interlocked.Decrement(ref screenShotTasks);
if (Interlocked.Decrement(ref screenShotTasks) == 0 && cursorVisibility.Value == false)
cursorVisibility.Value = true;
var fileName = getFileName();
if (fileName == null) return;
@ -125,14 +126,6 @@ namespace osu.Game.Graphics
}
});
protected override void Update()
{
base.Update();
if (cursorVisibility.Value == false && Interlocked.CompareExchange(ref screenShotTasks, 0, 0) == 0)
cursorVisibility.Value = true;
}
private string getFileName()
{
var dt = DateTime.Now;