Skip to content
Permalink
Browse files

Don't use emscripten.async_call while already in async mode

This particular use case appears to be safe, but I could make Ren'Py crash with more complex async_call-s.
This may also explain some irregular crashes a while ago when letting RenPyWeb run unattended.
This is somewhat similar to running Python in two threads. In doubt, let's avoid.
Moreover, however autosave is run, the browser will freeze a bit, no significant change.
  • Loading branch information...
Beuc committed Oct 24, 2019
1 parent 6691bb0 commit c1b077ff1790652658844fe035c27b1f8ee2a4dd
Showing with 1 addition and 2 deletions.
  1. +1 −2 renpy/loadsave.py
@@ -570,8 +570,7 @@ def force_autosave(take_screenshot=False, block=False):
autosave_thread.daemon = True
autosave_thread.start()
else:
import emscripten
emscripten.async_call(autosave_thread_function, take_screenshot, -1)
autosave_thread_function(take_screenshot)


################################################################################

0 comments on commit c1b077f

Please sign in to comment.
You can’t perform that action at this time.