diff --git a/pupil_src/capture/eye.py b/pupil_src/capture/eye.py index 371923c46d..f0bab650d8 100644 --- a/pupil_src/capture/eye.py +++ b/pupil_src/capture/eye.py @@ -120,10 +120,6 @@ def on_button(window,button, action, mods): g_pool.gui.update_button(button,action,mods) - window_update_timer = timer(1/60.) - def window_should_update(): - return next(window_update_timer) - def on_pos(window,x, y): hdpi_factor = float(glfwGetFramebufferSize(window)[0]/glfwGetWindowSize(window)[0]) @@ -265,6 +261,12 @@ def set_display_mode_info(val): fps_graph.update_rate = 5 fps_graph.label = "%0.0f FPS" + + #create a timer to control window update frequency + window_update_timer = timer(1/60.) + def window_should_update(): + return next(window_update_timer) + # Event loop while not g_pool.quit.value: # Get an image from the grabber