mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Don't allow negative volumes
Former-commit-id: 35a52235fa4194d40ffc0d8d3243d0653dcca0a5
This commit is contained in:
parent
888bd65036
commit
39caf7e51b
@ -78,6 +78,6 @@ impl AudioFrontend {
|
||||
}
|
||||
|
||||
pub fn set_volume(&mut self, volume: f32) {
|
||||
self.stream.set_volume(volume.min(1.0))
|
||||
self.stream.set_volume(volume.min(1.0).max(0.0))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user