Skip to content

Commit

Permalink
Improve throttling tolerance for speeds close to unthrottled
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Jun 21, 2024
1 parent 0db5552 commit 5e01d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/qt/emuthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void EmuThread::throttleWait() {
std::chrono::steady_clock::duration interval(std::chrono::duration_cast<std::chrono::steady_clock::duration>
(std::chrono::duration<double>(100 / (speed * run_rate))));
std::chrono::steady_clock::time_point next_time = m_lastTime + interval;
std::chrono::steady_clock::time_point tolerance_time = m_lastTime + std::chrono::milliseconds(30);
std::chrono::steady_clock::time_point tolerance_time = m_lastTime + std::chrono::milliseconds(40);
if (cur_time < std::max(next_time, tolerance_time)) {
m_lastTime = next_time;
if (cur_time < next_time) {
Expand Down

0 comments on commit 5e01d5e

Please sign in to comment.