aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-11-27 15:10:43 -0800
committerScott Jackson <daneren2005@gmail.com>2015-11-27 15:10:43 -0800
commit2eff8611ac2acfe13eb46d9757d169e1203dcfe8 (patch)
treec4b4abac81b091aaa948dee7104388938f9ed3c6 /app
parent32e04ec3166362b3232d72232a66f2cc1f0ab0a3 (diff)
downloaddsub-2eff8611ac2acfe13eb46d9757d169e1203dcfe8.tar.gz
dsub-2eff8611ac2acfe13eb46d9757d169e1203dcfe8.tar.bz2
dsub-2eff8611ac2acfe13eb46d9757d169e1203dcfe8.zip
Fix error if volumeMax is < 10 and increments gets rounded to 0
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java b/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java
index 73d4b5de..c5632362 100644
--- a/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java
+++ b/app/src/main/java/github/daneren2005/dsub/provider/DLNARouteProvider.java
@@ -169,7 +169,7 @@ public class DLNARouteProvider extends MediaRouteProvider {
if(device.volumeMax == 0) {
volume = 5;
} else {
- int increments = device.volumeMax / 10;
+ int increments = (int) Math.ceil(device.volumeMax / 10.0);
volume = controller == null ? device.volume : (int) controller.getVolume();
volume = volume / increments;
}