@@ -689,17 +689,17 @@ mp_obj_t ModPicoGraphics_update(mp_obj_t self_in) {
689689*/
690690
691691 while (self->display ->is_busy ()) {
692- #ifdef mp_event_handle_nowait
693- mp_event_handle_nowait ( );
692+ #ifdef MICROPY_BUILD_TYPE
693+ mp_handle_pending ( true );
694694 #endif
695695 }
696696
697697 self->display ->update (self->graphics );
698698
699699 if (self->blocking ) {
700700 while (self->display ->is_busy ()) {
701- #ifdef mp_event_handle_nowait
702- mp_event_handle_nowait ( );
701+ #ifdef MICROPY_BUILD_TYPE
702+ mp_handle_pending ( true );
703703 #endif
704704 }
705705
@@ -715,8 +715,8 @@ mp_obj_t ModPicoGraphics_partial_update(size_t n_args, const mp_obj_t *args) {
715715 ModPicoGraphics_obj_t *self = MP_OBJ_TO_PTR2 (args[ARG_self], ModPicoGraphics_obj_t);
716716
717717 while (self->display ->is_busy ()) {
718- #ifdef mp_event_handle_nowait
719- mp_event_handle_nowait ( );
718+ #ifdef MICROPY_BUILD_TYPE
719+ mp_handle_pending ( true );
720720 #endif
721721 }
722722
@@ -729,8 +729,8 @@ mp_obj_t ModPicoGraphics_partial_update(size_t n_args, const mp_obj_t *args) {
729729
730730 if (self->blocking ) {
731731 while (self->display ->is_busy ()) {
732- #ifdef mp_event_handle_nowait
733- mp_event_handle_nowait ( );
732+ #ifdef MICROPY_BUILD_TYPE
733+ mp_handle_pending ( true );
734734 #endif
735735 }
736736 }
0 commit comments