File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -79,19 +79,23 @@ def request_display_config(width, height):
7979 )
8080 supervisor .runtime .display = framebufferio .FramebufferDisplay (fb )
8181
82+
8283def get_display_config ():
8384 """
84- Get the current display size configuration.
85+ Get the current display size configuration.
8586
8687 :return: width: The width of the display in pixels.
8788 :return: height: The height of the display in pixels.
8889 :return: pixel_depth of the display in pixels
8990 """
91+
9092 try :
91- display = (picodvi .Framebuffer .width , picodvi .Framebuffer .height , picodvi .Framebuffer .color_depth )
92- return display
93- except ValueError as e :
94- return (None , None , None )
93+ display = supervisor .runtime .display
94+ display_config = (display .width , display .height , display .framebuffer .color_depth )
95+ return display_config
96+ except ValueError :
97+ return (None , None , None )
98+
9599
96100class Peripherals :
97101 """Peripherals Helper Class for the FruitJam Library
You can’t perform that action at this time.
0 commit comments