MonoGamePlatform Windows specific volume fix

This commit is contained in:
Aragas 2016-10-15 15:49:36 +03:00
parent 347d3ef72e
commit 4141a0a63a

View File

@ -467,7 +467,15 @@
End Function End Function
Public Shared Sub ForceVolumeUpdate() Public Shared Sub ForceVolumeUpdate()
#If WINDOWS Then
Try
MediaPlayer.Volume = Volume * MasterVolume
Catch ex As NullReferenceException
' song changed while changing volume
End Try
#Else
MediaPlayer.Volume = Volume * MasterVolume MediaPlayer.Volume = Volume * MasterVolume
#End If
LastVolume = Volume * MasterVolume LastVolume = Volume * MasterVolume
End Sub End Sub