diff options
| author | Michael <[email protected]> | 2017-02-02 09:47:23 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-02 09:47:23 -0500 |
| commit | bbe37edb68f9e7535216bff80ba3e6b16cbca398 (patch) | |
| tree | 4382859eda0c253e17966159890f49208a41367f /ShiftOS.WinForms/ShiftOSAudioProvider.cs | |
| parent | d8978b860d950e3ccde3c8beecf8b88bdd4a34a8 (diff) | |
| download | shiftos_thereturn-bbe37edb68f9e7535216bff80ba3e6b16cbca398.tar.gz shiftos_thereturn-bbe37edb68f9e7535216bff80ba3e6b16cbca398.tar.bz2 shiftos_thereturn-bbe37edb68f9e7535216bff80ba3e6b16cbca398.zip | |
Shiftnet, and audio fixes
Diffstat (limited to 'ShiftOS.WinForms/ShiftOSAudioProvider.cs')
| -rw-r--r-- | ShiftOS.WinForms/ShiftOSAudioProvider.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ShiftOS.WinForms/ShiftOSAudioProvider.cs b/ShiftOS.WinForms/ShiftOSAudioProvider.cs index f217325..52cbc92 100644 --- a/ShiftOS.WinForms/ShiftOSAudioProvider.cs +++ b/ShiftOS.WinForms/ShiftOSAudioProvider.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using Newtonsoft.Json; using ShiftOS.Engine; @@ -19,18 +20,27 @@ namespace ShiftOS.WinForms } } - private float _vol = 1.0f; public float Volume { get { - return _vol; + if (SaveSystem.CurrentSave == null) + return 1.0f; + try + { + return SaveSystem.CurrentSave.Settings.audioVolume; + } + catch + { + SaveSystem.CurrentSave.Settings.audioVolume = 1.0f; + return 1.0f; + } } set { - _vol = value; + SaveSystem.CurrentSave.Settings.audioVolume = value; } } |
