mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Fix on-screen frames calculation.
This commit is contained in:
parent
3ee4a72076
commit
0fe0f1d095
@ -454,8 +454,8 @@ void View::DrawFrames()
|
|||||||
const int fwidth = m_frameScale == 0 ? 4 : 1;
|
const int fwidth = m_frameScale == 0 ? 4 : 1;
|
||||||
const int group = m_frameScale < 2 ? 1 : ( 1 << ( m_frameScale - 1 ) );
|
const int group = m_frameScale < 2 ? 1 : ( 1 << ( m_frameScale - 1 ) );
|
||||||
const int total = m_frames.size();
|
const int total = m_frames.size();
|
||||||
const int onScreen = ( w - 2 ) / fwidth * group;
|
const int onScreen = ( w - 2 ) / fwidth;
|
||||||
if( !m_pause ) m_frameStart = total < onScreen ? 0 : total - onScreen;
|
if( !m_pause ) m_frameStart = ( total < onScreen * group ) ? 0 : total - onScreen * group;
|
||||||
|
|
||||||
int i = 0, idx = 0;
|
int i = 0, idx = 0;
|
||||||
while( i < onScreen && m_frameStart + idx < total )
|
while( i < onScreen && m_frameStart + idx < total )
|
||||||
|
Loading…
Reference in New Issue
Block a user