File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
Fruit_Jam/Fruit_Jam_PyPaint
Metro/Metro_RP2350_Memory/memory_game Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -680,11 +680,8 @@ def atexit_callback():
680680 print ("inside atexit callback" )
681681 if painter .mouse is not None :
682682 mouse = painter .mouse
683+ mouse .release ()
683684 if mouse .was_attached :
684- # Typically HID devices have interfaces 0,1,2
685- for intf in range (3 ):
686- if not mouse .device .is_kernel_driver_active (intf ):
687- mouse .device .attach_kernel_driver (intf )
688685 # The keyboard buffer seems to have data left over from when it was detached
689686 # This clears it before the next process starts
690687 while supervisor .runtime .serial_bytes_available :
Original file line number Diff line number Diff line change @@ -311,12 +311,8 @@ def atexit_callback():
311311 """
312312 print ("inside atexit callback" )
313313 if mouse_ptr .device is not None :
314+ mouse_ptr .release ()
314315 if mouse_ptr .was_attached :
315- # Typically HID devices have interfaces 0,1,2
316- for intf in range (3 ):
317- if not mouse_ptr .device .is_kernel_driver_active (intf ):
318- mouse_ptr .device .attach_kernel_driver (intf )
319-
320316 # The keyboard buffer seems to have data left over from when it was detached
321317 # This clears it before the next process starts
322318 while supervisor .runtime .serial_bytes_available :
@@ -454,7 +450,7 @@ def atexit_callback():
454450 if left_button_pressed :
455451 # if the mouse point is within the exit button
456452 if (mouse_tg .x >= display .width - 30 and
457- mouse_tg .y >= display .height - 15 ):
453+ mouse_tg .y >= display .height - 20 ):
458454 # restart back to code.py
459455 supervisor .reload ()
460456
You can’t perform that action at this time.
0 commit comments