diff --git a/src/common/RewindManager.cxx b/src/common/RewindManager.cxx index af05ca577..55ff40959 100644 --- a/src/common/RewindManager.cxx +++ b/src/common/RewindManager.cxx @@ -308,13 +308,13 @@ string RewindManager::getUnitString(Int64 cycles) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -uInt32 RewindManager::getFirstCycles() const +uInt64 RewindManager::getFirstCycles() const { return !myStateList.empty() ? myStateList.first()->cycles : 0; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -uInt32 RewindManager::getCurrentCycles() const +uInt64 RewindManager::getCurrentCycles() const { if(myStateList.currentIsValid()) return myStateList.current().cycles; @@ -323,7 +323,7 @@ uInt32 RewindManager::getCurrentCycles() const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -uInt32 RewindManager::getLastCycles() const +uInt64 RewindManager::getLastCycles() const { return !myStateList.empty() ? myStateList.last()->cycles : 0; } diff --git a/src/common/RewindManager.hxx b/src/common/RewindManager.hxx index 6066beadf..5ce4959a6 100644 --- a/src/common/RewindManager.hxx +++ b/src/common/RewindManager.hxx @@ -149,9 +149,9 @@ class RewindManager uInt32 getCurrentIdx() { return myStateList.currentIdx(); } uInt32 getLastIdx() { return myStateList.size(); } - uInt32 getFirstCycles() const; - uInt32 getCurrentCycles() const; - uInt32 getLastCycles() const; + uInt64 getFirstCycles() const; + uInt64 getCurrentCycles() const; + uInt64 getLastCycles() const; /** Get a collection of cycle timestamps, offset from the first one in diff --git a/src/gui/TimeLineWidget.cxx b/src/gui/TimeLineWidget.cxx index 5fdb02cca..76e490c1d 100644 --- a/src/gui/TimeLineWidget.cxx +++ b/src/gui/TimeLineWidget.cxx @@ -161,7 +161,7 @@ void TimeLineWidget::drawWidget(bool hilite) int numTicks = std::min(5, int(_stepValue.size())); for(int i = 1; i < numTicks; ++i) { - int idx = (_stepValue.size() * i + numTicks / 2) / numTicks; + int idx = int((_stepValue.size() * i + numTicks / 2) / numTicks); if(idx > 1) { int tp = valueToPos(idx - 1); diff --git a/src/gui/TimeMachineDialog.cxx b/src/gui/TimeMachineDialog.cxx index b0a2e172f..be386dea1 100644 --- a/src/gui/TimeMachineDialog.cxx +++ b/src/gui/TimeMachineDialog.cxx @@ -212,7 +212,7 @@ void TimeMachineDialog::loadConfig() IntArray cycles = r.cyclesList(); // Set range and intervals for timeline - myTimeline->setMaxValue(cycles.size() - 1); + myTimeline->setMaxValue(int(cycles.size()) - 1); myTimeline->setStepValues(cycles); // Enable blending (only once is necessary) @@ -319,11 +319,11 @@ string TimeMachineDialog::getTimeString(uInt64 cycles) const Int32 PAL_FREQ = 1182298; // ~76*312*50 const Int32 freq = isNTSC ? NTSC_FREQ : PAL_FREQ; // = cycles/second - uInt32 minutes = cycles / (freq * 60); + uInt32 minutes = uInt32(cycles / (freq * 60)); cycles -= minutes * (freq * 60); - uInt32 seconds = cycles / freq; + uInt32 seconds = uInt32(cycles / freq); cycles -= seconds * freq; - uInt32 frames = cycles / (scanlines * 76); + uInt32 frames = uInt32(cycles / (scanlines * 76)); ostringstream time; time << Common::Base::toString(minutes, Common::Base::F_10_2) << ":";