mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Fix test errors due to missing dependencies
This commit is contained in:
parent
bab93bed17
commit
f3c174a7f2
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
private bool automaticRendererInUse;
|
private bool automaticRendererInUse;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, IDialogOverlay dialogOverlay, OsuGame game, GameHost host)
|
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, IDialogOverlay? dialogOverlay, OsuGame? game, GameHost host)
|
||||||
{
|
{
|
||||||
var renderer = config.GetBindable<RendererType>(FrameworkSetting.Renderer);
|
var renderer = config.GetBindable<RendererType>(FrameworkSetting.Renderer);
|
||||||
automaticRendererInUse = renderer.Value == RendererType.Automatic;
|
automaticRendererInUse = renderer.Value == RendererType.Automatic;
|
||||||
@ -67,7 +67,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
if (r.NewValue == RendererType.Automatic && automaticRendererInUse)
|
if (r.NewValue == RendererType.Automatic && automaticRendererInUse)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dialogOverlay.Push(new ConfirmDialog(GraphicsSettingsStrings.ChangeRendererConfirmation, game.AttemptExit, () =>
|
dialogOverlay?.Push(new ConfirmDialog(GraphicsSettingsStrings.ChangeRendererConfirmation, () => game?.AttemptExit(), () =>
|
||||||
{
|
{
|
||||||
renderer.Value = r.OldValue;
|
renderer.Value = r.OldValue;
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user