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 42
42
BUTTONS = ["left" , "right" , "middle" ]
43
43
44
44
45
- def find_and_init_boot_mouse ():
45
+ def find_and_init_boot_mouse (cursor_image = "/launcher_assets/mouse_cursor.bmp" ):
46
46
"""
47
47
Scan for an attached boot mouse connected via USB host.
48
48
If one is found initialize an instance of BootMouse class
@@ -87,7 +87,9 @@ def find_and_init_boot_mouse():
87
87
mouse_device .set_configuration ()
88
88
89
89
# load the mouse cursor bitmap
90
- mouse_bmp = OnDiskBitmap ("/launcher_assets/mouse_cursor.bmp" )
90
+ if not isinstance (cursor_image , str ):
91
+ raise TypeError ("cursor_image must be a string" )
92
+ mouse_bmp = OnDiskBitmap (cursor_image )
91
93
92
94
# make the background pink pixels transparent
93
95
mouse_bmp .pixel_shader .make_transparent (0 )
You can’t perform that action at this time.
0 commit comments