Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

allow slider actions (volume/seek sliders) to have the precision of f…

…loats, rather than being constrained to integral percentages
  • Loading branch information...
commit bc32307c0146616fb250a5082340755a16eb5018 1 parent 9baaeda
Jonathan Marshall authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 xbmc/guilib/GUISliderControl.cpp
8 xbmc/guilib/GUISliderControl.cpp
@@ -25,8 +25,8 @@
#include "GUIWindowManager.h"
static const SliderAction actions[] = {
- {"seek", "PlayerControl(SeekPercentage(%2d))", PLAYER_PROGRESS, false},
- {"volume", "SetVolume(%2d)", PLAYER_VOLUME, true}
+ {"seek", "PlayerControl(SeekPercentage(%2f))", PLAYER_PROGRESS, false},
+ {"volume", "SetVolume(%2f)", PLAYER_VOLUME, true}
CGUISliderControl::CGUISliderControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& backGroundTexture, const CTextureInfo& nibTexture, const CTextureInfo& nibTextureFocus, int iType)
@@ -246,8 +246,8 @@ void CGUISliderControl::Move(int iNumSteps)
void CGUISliderControl::SendClick()
- int percent = MathUtils::round_int(100*GetProportion());
- SEND_CLICK_MESSAGE(GetID(), GetParentID(), percent);
+ float percent = 100*GetProportion();
+ SEND_CLICK_MESSAGE(GetID(), GetParentID(), MathUtils::round_int(percent));
if (m_action && (!m_dragging || m_action->fireOnDrag))
CStdString action;
Please sign in to comment.
Something went wrong with that request. Please try again.