Skip to content

Commit

Permalink
added double support. Precentage of UPower battery is a double value.
Browse files Browse the repository at this point in the history
  • Loading branch information
huceke committed Jul 13, 2011
1 parent ac6dbdd commit 07b733d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/linux/DBusUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ CVariant CDBusUtil::ParseType(DBusMessageIter *itr)
dbus_int64_t int64 = 0;
dbus_uint64_t uint64 = 0;
dbus_bool_t boolean = false;
double doublev = 0;

int type = dbus_message_iter_get_arg_type(itr);
switch (type)
Expand Down Expand Up @@ -145,6 +146,10 @@ CVariant CDBusUtil::ParseType(DBusMessageIter *itr)
dbus_message_iter_get_basic(itr, &boolean);
value = (bool)boolean;
break;
case DBUS_TYPE_DOUBLE:
dbus_message_iter_get_basic(itr, &doublev);
value = (double)doublev;
break;
case DBUS_TYPE_ARRAY:
DBusMessageIter array;
dbus_message_iter_recurse(itr, &array);
Expand Down

0 comments on commit 07b733d

Please sign in to comment.