Bump engine submodule and quit with a click or by pressing q.

This commit is contained in:
Roz K 2022-12-24 06:41:02 +01:00
parent 7ed23a5d5f
commit 119cd76156
Signed by: roz
GPG Key ID: 51FBF4E483E1C822
2 changed files with 10 additions and 5 deletions

2
engine

@ -1 +1 @@
Subproject commit 61cfdbccf3230b73d42eb90f6eec934dbe1ddfdb
Subproject commit 65b25c8be37aff5ab94c1c0b5a1410afa8a87f2b

View File

@ -153,8 +153,7 @@ def main():
cube_orientation = tests_batch.params[cube_id].orientation
clouds_orientation = tests_batch.params[clouds_id].orientation
print("Running...")
events = buffer(Event, 16)
print("Running... Click or press q to quit")
start_time = time.monotonic()
current_time = 0.0
frame_min = 10000.0
@ -164,6 +163,7 @@ def main():
draw_max = 0.0
draw_avg = 0.0
perf_count = 0
events = buffer(Event, 16)
try:
for frame in range(10000):
current_time = time.monotonic() - start_time
@ -244,8 +244,13 @@ def main():
if not nevents:
break
for event in events[:nevents]:
if event.type == EVENT_KEY_RELEASE:
print("EVENT_KEY_RELEASE:", event.data.key.keycode)
if event.type == EVENT_FOCUS_IN:
print("EVENT_FOCUS_IN")
elif event.type == EVENT_FOCUS_OUT:
print("EVENT_FOCUS_OUT")
elif event.type == EVENT_KEY_PRESS and event.data.key.character == 'q':
stop = True
elif event.type == EVENT_BUTTON_RELEASE:
stop = True
if stop:
break