diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2017-04-14 22:34:14 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2017-04-14 22:34:36 +0100 |
commit | f085f13f429d01a8f72e3b348a694124d5ba7533 (patch) | |
tree | 27da92ec779400ffd3732cc91a511e9abea601db /src/main.c | |
parent | cccb00ec0fa28d58bcebad8e9c8ff054657b725c (diff) | |
download | imv-f085f13f429d01a8f72e3b348a694124d5ba7533.tar.gz |
Refactor navigator poll rate limiting
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -370,9 +370,6 @@ int main(int argc, char** argv) unsigned int last_time = SDL_GetTicks(); unsigned int current_time; - /* keep file change polling rate under control */ - static uint8_t poll_countdown = UINT8_MAX; - g_state.need_redraw = 1; g_state.need_rescale = 0; @@ -422,7 +419,7 @@ int main(int argc, char** argv) } /* if the user has changed image, start loading the new one */ - if(imv_navigator_poll_changed(g_state.nav, poll_countdown--)) { + if(imv_navigator_poll_changed(g_state.nav)) { const char *current_path = imv_navigator_selection(g_state.nav); if(!current_path) { if(g_options.stdin_list) { @@ -560,9 +557,6 @@ int main(int argc, char** argv) /* redraw complete, unset the flag */ g_state.need_redraw = 0; - /* reset poll countdown timer */ - poll_countdown = UINT8_MAX; - /* tell SDL to show the newly drawn frame */ SDL_RenderPresent(g_state.renderer); } |