Skip to content

Commit 0f8608c

Browse files
committed
fix build for non-displayio & non-protomatter targets
1 parent e1d5ee4 commit 0f8608c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

shared-module/displayio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
2323

24+
#if CIRCUITPY_PROTOMATTER
2425
STATIC bool any_display_uses_this_protomatter(protomatter_protomatter_obj_t* pm) {
2526
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
2627
if (displays[i].framebuffer_display.base.type == &framebufferio_framebufferdisplay_type) {
@@ -32,6 +33,7 @@ STATIC bool any_display_uses_this_protomatter(protomatter_protomatter_obj_t* pm)
3233
}
3334
return false;
3435
}
36+
#endif
3537

3638
// Check for recursive calls to displayio_background.
3739
bool displayio_background_in_progress = false;

supervisor/shared/display.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@
2929
#include <string.h>
3030

3131
#include "py/mpstate.h"
32-
#include "shared-module/displayio/__init__.h"
3332
#include "shared-bindings/displayio/Group.h"
3433
#include "shared-bindings/displayio/Palette.h"
3534
#include "shared-bindings/displayio/TileGrid.h"
3635
#include "supervisor/memory.h"
3736

37+
#if CIRCUITPY_PROTOMATTER
38+
#include "shared-module/displayio/__init__.h"
39+
#endif
40+
3841
extern size_t blinka_bitmap_data[];
3942
extern displayio_bitmap_t blinka_bitmap;
4043
extern displayio_group_t circuitpython_splash;

0 commit comments

Comments
 (0)