rework prev and next buttons
This commit is contained in:
parent
264b98548f
commit
3f7f398210
|
@ -1048,13 +1048,9 @@ void EventStream::processCommand( const CmdMsg *msg )
|
||||||
{
|
{
|
||||||
Debug( 1, "Got PREV command" );
|
Debug( 1, "Got PREV command" );
|
||||||
if ( replay_rate >= 0 )
|
if ( replay_rate >= 0 )
|
||||||
{
|
|
||||||
curr_frame_id = 0;
|
curr_frame_id = 0;
|
||||||
if ( mode == MODE_ALL_GAPLESS )
|
|
||||||
keep_curr_frame_id = true;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
curr_frame_id = event_data->frame_count-1;
|
curr_frame_id = event_data->frame_count+1;
|
||||||
paused = false;
|
paused = false;
|
||||||
forceEventChange = true;
|
forceEventChange = true;
|
||||||
break;
|
break;
|
||||||
|
@ -1063,13 +1059,9 @@ void EventStream::processCommand( const CmdMsg *msg )
|
||||||
{
|
{
|
||||||
Debug( 1, "Got NEXT command" );
|
Debug( 1, "Got NEXT command" );
|
||||||
if ( replay_rate >= 0 )
|
if ( replay_rate >= 0 )
|
||||||
curr_frame_id = event_data->frame_count-1;
|
curr_frame_id = event_data->frame_count+1;
|
||||||
else
|
else
|
||||||
{
|
|
||||||
curr_frame_id = 0;
|
curr_frame_id = 0;
|
||||||
if ( mode == MODE_ALL_GAPLESS )
|
|
||||||
keep_curr_frame_id = true;
|
|
||||||
}
|
|
||||||
paused = false;
|
paused = false;
|
||||||
forceEventChange = true;
|
forceEventChange = true;
|
||||||
break;
|
break;
|
||||||
|
@ -1176,7 +1168,7 @@ void EventStream::checkEventLoaded()
|
||||||
loadEventData( event_id );
|
loadEventData( event_id );
|
||||||
|
|
||||||
Debug( 2, "Current frame id = %d", curr_frame_id );
|
Debug( 2, "Current frame id = %d", curr_frame_id );
|
||||||
if ( curr_frame_id <= 0 && !keep_curr_frame_id )
|
if ( replay_rate < 0 )
|
||||||
curr_frame_id = event_data->frame_count;
|
curr_frame_id = event_data->frame_count;
|
||||||
else
|
else
|
||||||
curr_frame_id = 1;
|
curr_frame_id = 1;
|
||||||
|
@ -1192,7 +1184,6 @@ void EventStream::checkEventLoaded()
|
||||||
}
|
}
|
||||||
mysql_free_result( result );
|
mysql_free_result( result );
|
||||||
forceEventChange = false;
|
forceEventChange = false;
|
||||||
keep_curr_frame_id = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -221,7 +221,6 @@ protected:
|
||||||
protected:
|
protected:
|
||||||
StreamMode mode;
|
StreamMode mode;
|
||||||
bool forceEventChange;
|
bool forceEventChange;
|
||||||
bool keep_curr_frame_id;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int curr_frame_id;
|
int curr_frame_id;
|
||||||
|
|
Loading…
Reference in New Issue