diff --git a/.gitmodules b/.gitmodules index 5f8eec8b5e..5ddbc44946 100644 --- a/.gitmodules +++ b/.gitmodules @@ -97,4 +97,4 @@ url = https://github.com/pewpew-game/pew-pewpew-standalone-10.x.git [submodule "frozen/circuitpython-stage"] path = frozen/circuitpython-stage - url = https://github.com/python-ugame/circuitpython-stage + url = https://github.com/python-ugame/circuitpython-stage.git diff --git a/main.c b/main.c index 4b58b778d2..77498d7dee 100755 --- a/main.c +++ b/main.c @@ -213,10 +213,11 @@ bool run_code_py(safe_mode_t safe_mode) { serial_write_compressed(translate("WARNING: Your code filename has two extensions\n")); } } - // Turn off the display before the heap disappears. + // Turn off the display and flush the fileystem before the heap disappears. #if CIRCUITPY_DISPLAYIO reset_displays(); #endif + filesystem_flush(); stop_mp(); free_memory(heap); supervisor_move_memory(); @@ -375,6 +376,7 @@ int run_repl(void) { } else { exit_code = pyexec_friendly_repl(); } + filesystem_flush(); reset_port(); reset_board(); stop_mp(); diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 546a46b1eb..ced5b0fef6 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -29,10 +29,8 @@ void displayio_refresh_displays(void) { if (mp_hal_is_interrupted()) { return; } - // Somehow reloads from the sdcard are being lost. So, cheat and reraise. - // But don't re-raise if already pending. - if (reload_requested && MP_STATE_VM(mp_pending_exception) == MP_OBJ_NULL) { - mp_raise_reload_exception(); + if (reload_requested) { + // Reload is about to happen, so don't redisplay. return; }