mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
Qt: clamp progress bar values
This commit is contained in:
parent
88bfdb0c05
commit
2b8cab906c
7 changed files with 21 additions and 26 deletions
|
@ -439,10 +439,10 @@ void gs_frame::progress_increment(int delta)
|
|||
#ifdef _WIN32
|
||||
if (m_tb_progress)
|
||||
{
|
||||
m_tb_progress->setValue(m_tb_progress->value() + delta);
|
||||
m_tb_progress->setValue(std::clamp(m_tb_progress->value() + delta, m_tb_progress->minimum(), m_tb_progress->maximum()));
|
||||
}
|
||||
#elif HAVE_QTDBUS
|
||||
m_progress_value += delta;
|
||||
m_progress_value = std::clamp(m_progress_value + delta, 0, m_gauge_max);
|
||||
UpdateProgress(m_progress_value);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue