File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -224,8 +224,6 @@ static void common_hal_displayio_release_displays_impl(bool keep_primary) {
224224 display_buses [i ].bus_base .type = & mp_type_NoneType ;
225225 #endif
226226 }
227- max_allocated_display = CIRCUITPY_DISPLAY_LIMIT ;
228-
229227 if (!keep_primary ) {
230228 supervisor_stop_terminal ();
231229 }
@@ -255,6 +253,8 @@ void malloc_display_memory(void) {
255253void reset_displays (void ) {
256254 // In CircuitPython 10, release secondary displays before doing anything else:
257255 common_hal_displayio_release_displays_impl (true);
256+ // Set dynamically allocated displays to 0 (CIRCUITPY_DISPLAY_LIMIT)
257+ max_allocated_display = CIRCUITPY_DISPLAY_LIMIT ;
258258
259259 // The SPI buses used by FourWires may be allocated on the heap so we need to move them inline.
260260 for (uint8_t i = 0 ; i < CIRCUITPY_DISPLAY_LIMIT ; i ++ ) {
You can’t perform that action at this time.
0 commit comments