File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Fruit_Jam/Fruit_Jam_PyPaint
Metro/Metro_RP2350_Memory/memory_game Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -680,8 +680,8 @@ def atexit_callback():
680680 print ("inside atexit callback" )
681681 if painter .mouse is not None :
682682 mouse = painter .mouse
683- if mouse .was_attached and not mouse .device .is_kernel_driver_active (0 ):
684- mouse .device .attach_kernel_driver (0 )
683+ if mouse .was_attached and not mouse .device .is_kernel_driver_active (mouse . interface ):
684+ mouse .device .attach_kernel_driver (mouse . interface )
685685 # The keyboard buffer seems to have data left over from when it was detached
686686 # This clears it before the next process starts
687687 while supervisor .runtime .serial_bytes_available :
Original file line number Diff line number Diff line change @@ -311,8 +311,12 @@ def atexit_callback():
311311 """
312312 print ("inside atexit callback" )
313313 if mouse is not None :
314- if mouse_ptr .was_attached and not mouse_ptr .device .is_kernel_driver_active (0 ):
315- mouse .attach_kernel_driver (0 )
314+ if (
315+ mouse_ptr .was_attached and
316+ not mouse_ptr .device .is_kernel_driver_active (mouse_ptr .interface )
317+ ):
318+
319+ mouse .attach_kernel_driver (mouse_ptr .interface )
316320 # The keyboard buffer seems to have data left over from when it was detached
317321 # This clears it before the next process starts
318322 while supervisor .runtime .serial_bytes_available :
You can’t perform that action at this time.
0 commit comments