diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-02-15 13:52:25 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-02-19 14:51:39 -0800 |
| commit | b1e8c4367987944c3faaad613142fec974840044 (patch) | |
| tree | 31e3c2d9c16c3c56c28905d2bef5d4e4b169e8c6 /shared-module | |
| parent | 53fa65e318efc6ac17ae904e1e60cb91aa2ac954 (diff) | |
Fix reload while display is updating.
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/displayio/__init__.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index 5db571f33..0d35abf0f 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -2,6 +2,7 @@ #include <string.h> #include "shared-module/displayio/__init__.h" +#include "py/reload.h" #include "shared-bindings/displayio/Bitmap.h" #include "shared-bindings/displayio/Display.h" #include "shared-bindings/displayio/Group.h" @@ -22,6 +23,12 @@ static inline void swap(uint16_t* a, uint16_t* b) { bool refreshing_displays = false; void displayio_refresh_displays(void) { + // Somehow reloads from the sdcard are being lost. So, cheat and reraise. + if (reload_requested) { + mp_raise_reload_exception(); + return; + } + if (refreshing_displays) { return; } |
