Skip to content

Commit

Permalink
Fixed startup on win7
Browse files Browse the repository at this point in the history
(с) TadaceAce
  • Loading branch information
Qvin0000 committed Sep 11, 2019
1 parent a9a18fe commit 89fe115
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Core/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@ public Core(RenderForm form)
_dx11 = new DX11(form, _coreSettings);
}

_soundController = new SoundController("Sounds");
if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
{
}
else
{
_soundController = new SoundController("Sounds");
Logger.Information($"SoundController init skipped because win7 issue.");
}
_coreSettings.Volume.OnValueChanged += (sender, i) => { _soundController.SetVolume(i / 100f); };
_coreSettings.VSync.OnValueChanged += (obj, b) => { _dx11.VSync = _coreSettings.VSync.Value; };
Graphics = new Graphics(_dx11, _coreSettings);
Expand Down

0 comments on commit 89fe115

Please sign in to comment.