Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions static/3d.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,15 @@ async def custom_site():
print("""
* Waiting for media user engagement : please click/touch page *
""")
while not platform.window.MM.UME:
await asyncio.sleep(.1)
waiting = True
while waiting:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
elif event.type == pygame.MOUSEBUTTONDOWN or event.type == pygame.KEYDOWN:
waiting = False
await asyncio.sleep(0.1)

# start async top level machinery if not started and add a console in any case if requested.
await TopLevel_async_handler.start_toplevel(platform.shell, console=window.python.config.debug)
Expand Down
11 changes: 9 additions & 2 deletions static/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,15 @@ async def custom_site():
print("""
* Waiting for media user engagement : please click/touch page *
""")
while not platform.window.MM.UME:
await asyncio.sleep(.1)
waiting = True
while waiting:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
elif event.type == pygame.MOUSEBUTTONDOWN or event.type == pygame.KEYDOWN:
waiting = False
await asyncio.sleep(0.1)

# cleanup
screen.fill( (0,0,0,0) )
Expand Down
11 changes: 9 additions & 2 deletions static/mobile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,15 @@ async def custom_site():


""")
while not platform.window.MM.UME:
await asyncio.sleep(.1)
waiting = True
while waiting:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
elif event.type == pygame.MOUSEBUTTONDOWN or event.type == pygame.KEYDOWN:
waiting = False
await asyncio.sleep(0.1)


# unlock async for main.py loop ( 2nd asyncio.run call )
Expand Down
11 changes: 9 additions & 2 deletions static/noctx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,15 @@ async def custom_site():
print("""
* Waiting for media user engagement : please click/touch page *
""")
while not platform.window.MM.UME:
await asyncio.sleep(.1)
waiting = True
while waiting:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
elif event.type == pygame.MOUSEBUTTONDOWN or event.type == pygame.KEYDOWN:
waiting = False
await asyncio.sleep(0.1)

# start async top level machinery if not started and add a console in any case if requested.
await TopLevel_async_handler.start_toplevel(platform.shell, console=window.python.config.debug)
Expand Down