Skip to content

Commit

Permalink
Only do work on index change if the index actually changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mickelson committed Mar 25, 2014
1 parent 8ee8389 commit 3ef08ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/fe_present.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,12 @@ int FePresent::get_list_index() const

void FePresent::set_list_index( int index )
{
m_feSettings->change_rom( index - get_list_index() );
update( false );
int new_offset = index - get_list_index();
if ( new_offset != 0 )
{
m_feSettings->change_rom( index - get_list_index() );
update( false );
}
}

bool FePresent::reset_screen_saver( sf::RenderWindow *wnd )
Expand Down

0 comments on commit 3ef08ba

Please sign in to comment.