All pastes #1889492 Raw Edit

Miscellany

public diff v1 · immutable
#1889492 ·published 2010-06-25 21:23 UTC
rendered paste body
diff --git a/xbmc/GUIWindowVisualisation.cpp b/xbmc/GUIWindowVisualisation.cppindex fa47506..e1b1f5f 100644--- a/xbmc/GUIWindowVisualisation.cpp+++ b/xbmc/GUIWindowVisualisation.cpp@@ -41,7 +41,8 @@ using namespace ADDON; #define CONTROL_VIS          2  CGUIWindowVisualisation::CGUIWindowVisualisation(void)-    : CGUIWindow(WINDOW_VISUALISATION, "MusicVisualisation.xml")+    : CGUIWindow(WINDOW_VISUALISATION, "MusicVisualisation.xml"),+      m_initTimer(true), m_lockedTimer(true) {   m_bShowPreset = false; }diff --git a/xbmc/utils/Stopwatch.cpp b/xbmc/utils/Stopwatch.cppindex fe153e0..7a9f8da 100644--- a/xbmc/utils/Stopwatch.cpp+++ b/xbmc/utils/Stopwatch.cpp@@ -25,11 +25,12 @@ #endif #include "utils/TimeUtils.h" -CStopWatch::CStopWatch()+CStopWatch::CStopWatch(bool useFrameTime /*=false*/) {   m_timerPeriod      = 0.0f;   m_startTick        = 0;   m_isRunning        = false;+  m_useFrameTime     = useFrameTime;    // Get the timer frequency (ticks per second) #ifndef _LINUX@@ -90,6 +91,8 @@ float CStopWatch::GetElapsedMilliseconds() const  int64_t CStopWatch::GetTicks() const {+  if (m_useFrameTime)+    return CTimeUtils::GetFrameTime(); #ifndef _LINUX   return CurrentHostCounter(); #elsediff --git a/xbmc/utils/Stopwatch.h b/xbmc/utils/Stopwatch.hindex 3109494..932c711 100644--- a/xbmc/utils/Stopwatch.h+++ b/xbmc/utils/Stopwatch.h@@ -26,7 +26,7 @@ class CStopWatch { public:-  CStopWatch();+  CStopWatch(bool useFrameTime=false);   ~CStopWatch();    bool IsRunning() const;@@ -42,4 +42,5 @@ private:   float m_timerPeriod;        // to save division in GetElapsed...()   int64_t m_startTick;   bool m_isRunning;+  bool m_useFrameTime; };