diff --git a/tools/replay/ui.py b/tools/replay/ui.py index aa03ae193c..31e4fff74d 100755 --- a/tools/replay/ui.py +++ b/tools/replay/ui.py @@ -101,8 +101,11 @@ def ui_thread(addr): draw_plots = init_plots(plot_arr, name_to_arr_idx, plot_xlims, plot_ylims, plot_names, plot_colors, plot_styles) vipc_client = VisionIpcClient("camerad", VisionStreamType.VISION_STREAM_ROAD, True) - while 1: - list(pygame.event.get()) + while True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + sys.exit() screen.fill((64, 64, 64)) lid_overlay = lid_overlay_blank.copy()