File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,12 @@ STATIC mp_obj_t stage_render(size_t n_args, const mp_obj_t *args) {
83
83
uint16_t * buffer = bufinfo .buf ;
84
84
size_t buffer_size = bufinfo .len / 2 ; // 16-bit indexing
85
85
86
- if (!MP_OBJ_IS_TYPE (args [6 ], & displayio_display_type )) {
86
+ mp_obj_t native_display = mp_instance_cast_to_native_base (args [6 ],
87
+ & displayio_display_type );
88
+ if (!MP_OBJ_IS_TYPE (native_display , & displayio_display_type )) {
87
89
mp_raise_TypeError (translate ("argument num/types mismatch" ));
88
90
}
89
- displayio_display_obj_t * display = MP_OBJ_TO_PTR (args [ 6 ] );
91
+ displayio_display_obj_t * display = MP_OBJ_TO_PTR (native_display );
90
92
91
93
while (!displayio_display_begin_transaction (display )) {
92
94
#ifdef MICROPY_VM_HOOK_LOOP
You can’t perform that action at this time.
0 commit comments