Don't initialize pygame if --no-show-output
This commit is contained in:
parent
e77e7abd43
commit
5fefd0b0bb
15
convert.py
15
convert.py
|
@ -352,13 +352,14 @@ def main():
|
||||||
inner_iterations = 10
|
inner_iterations = 10
|
||||||
outer_iterations = 20
|
outer_iterations = 20
|
||||||
|
|
||||||
pygame.init()
|
if args.show_output:
|
||||||
# TODO: for some reason I need to execute this twice - the first time
|
pygame.init()
|
||||||
# the window is created and immediately destroyed
|
# TODO: for some reason I need to execute this twice - the first time
|
||||||
_ = pygame.display.set_mode((640, 400))
|
# the window is created and immediately destroyed
|
||||||
canvas = pygame.display.set_mode((640, 400))
|
_ = pygame.display.set_mode((640, 400))
|
||||||
canvas.fill((0, 0, 0))
|
canvas = pygame.display.set_mode((640, 400))
|
||||||
pygame.display.flip()
|
canvas.fill((0, 0, 0))
|
||||||
|
pygame.display.flip()
|
||||||
|
|
||||||
total_image_error = None
|
total_image_error = None
|
||||||
# TODO: reserved_colours should be a flag
|
# TODO: reserved_colours should be a flag
|
||||||
|
|
Loading…
Reference in New Issue