Codechange: remove _realtime_tick variable
(cherry picked from commit fe451b8dc7)
# Conflicts:
# src/debug.cpp
# src/debug.h
# src/video/video_driver.cpp
This commit is contained in:
committed by
Jonathan G Rennison
parent
3744d71b13
commit
535fdb5c89
@@ -19,13 +19,6 @@ bool VideoDriver::Tick()
|
||||
{
|
||||
auto cur_ticks = std::chrono::steady_clock::now();
|
||||
|
||||
/* If more than a millisecond has passed, increase the _realtime_tick. */
|
||||
if (cur_ticks - this->last_realtime_tick > std::chrono::milliseconds(1)) {
|
||||
auto delta = std::chrono::duration_cast<std::chrono::milliseconds>(cur_ticks - this->last_realtime_tick);
|
||||
_realtime_tick += delta.count();
|
||||
this->last_realtime_tick += delta;
|
||||
}
|
||||
|
||||
if (cur_ticks >= this->next_game_tick || (_fast_forward && !_pause_mode)) {
|
||||
if (_fast_forward && !_pause_mode) {
|
||||
this->next_game_tick = cur_ticks + this->GetGameInterval();
|
||||
|
||||
@@ -210,7 +210,6 @@ protected:
|
||||
return std::chrono::microseconds(1000000 / _settings_client.gui.refresh_rate);
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point last_realtime_tick;
|
||||
std::chrono::steady_clock::time_point next_game_tick;
|
||||
std::chrono::steady_clock::time_point next_draw_tick;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user