mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 13:22:55 +08:00
Merge branch 'centralise-update-managers' into add-star-difficulty-max-migration
This commit is contained in:
commit
d3786a9382
@ -30,11 +30,6 @@ namespace osu.Android
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override UpdateManager CreateUpdateManager() => new SimpleUpdateManager();
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
Add(new SimpleUpdateManager());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,20 +47,25 @@ namespace osu.Desktop
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override UpdateManager CreateUpdateManager()
|
||||||
|
{
|
||||||
|
switch (RuntimeInfo.OS)
|
||||||
|
{
|
||||||
|
case RuntimeInfo.Platform.Windows:
|
||||||
|
return new SquirrelUpdateManager();
|
||||||
|
|
||||||
|
default:
|
||||||
|
return new SimpleUpdateManager();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (!noVersionOverlay)
|
if (!noVersionOverlay)
|
||||||
{
|
|
||||||
LoadComponentAsync(versionManager = new VersionManager { Depth = int.MinValue }, Add);
|
LoadComponentAsync(versionManager = new VersionManager { Depth = int.MinValue }, Add);
|
||||||
|
|
||||||
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows)
|
|
||||||
Add(new SquirrelUpdateManager());
|
|
||||||
else
|
|
||||||
Add(new SimpleUpdateManager());
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadComponentAsync(new DiscordRichPresence(), Add);
|
LoadComponentAsync(new DiscordRichPresence(), Add);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ using osu.Game.Overlays.Volume;
|
|||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
using osu.Game.Updater;
|
||||||
using osu.Game.Utils;
|
using osu.Game.Utils;
|
||||||
using LogLevel = osu.Framework.Logging.LogLevel;
|
using LogLevel = osu.Framework.Logging.LogLevel;
|
||||||
|
|
||||||
@ -390,6 +391,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
protected virtual Loader CreateLoader() => new Loader();
|
protected virtual Loader CreateLoader() => new Loader();
|
||||||
|
|
||||||
|
protected virtual UpdateManager CreateUpdateManager() => new UpdateManager();
|
||||||
|
|
||||||
protected override Container CreateScalingContainer() => new ScalingContainer(ScalingMode.Everything);
|
protected override Container CreateScalingContainer() => new ScalingContainer(ScalingMode.Everything);
|
||||||
|
|
||||||
#region Beatmap progression
|
#region Beatmap progression
|
||||||
@ -628,6 +631,7 @@ namespace osu.Game
|
|||||||
chatOverlay.State.ValueChanged += state => channelManager.HighPollRate.Value = state.NewValue == Visibility.Visible;
|
chatOverlay.State.ValueChanged += state => channelManager.HighPollRate.Value = state.NewValue == Visibility.Visible;
|
||||||
|
|
||||||
Add(externalLinkOpener = new ExternalLinkOpener());
|
Add(externalLinkOpener = new ExternalLinkOpener());
|
||||||
|
Add(CreateUpdateManager()); // dependency on notification overlay
|
||||||
|
|
||||||
// side overlays which cancel each other.
|
// side overlays which cancel each other.
|
||||||
var singleDisplaySideOverlays = new OverlayContainer[] { Settings, notifications };
|
var singleDisplaySideOverlays = new OverlayContainer[] { Settings, notifications };
|
||||||
|
@ -34,12 +34,12 @@ namespace osu.Game.Updater
|
|||||||
|
|
||||||
if (game.IsDeployedBuild && version != lastVersion)
|
if (game.IsDeployedBuild && version != lastVersion)
|
||||||
{
|
{
|
||||||
config.Set(OsuSetting.Version, version);
|
|
||||||
|
|
||||||
// only show a notification if we've previously saved a version to the config file (ie. not the first run).
|
// only show a notification if we've previously saved a version to the config file (ie. not the first run).
|
||||||
if (!string.IsNullOrEmpty(lastVersion))
|
if (!string.IsNullOrEmpty(lastVersion))
|
||||||
Notifications.Post(new UpdateCompleteNotification(version));
|
Notifications.Post(new UpdateCompleteNotification(version));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.Set(OsuSetting.Version, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class UpdateCompleteNotification : SimpleNotification
|
private class UpdateCompleteNotification : SimpleNotification
|
||||||
|
@ -11,12 +11,5 @@ namespace osu.iOS
|
|||||||
public class OsuGameIOS : OsuGame
|
public class OsuGameIOS : OsuGame
|
||||||
{
|
{
|
||||||
public override Version AssemblyVersion => new Version(NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString());
|
public override Version AssemblyVersion => new Version(NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString());
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
Add(new UpdateManager());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user