From 04d184c9528f641b487c246944900d4fefd3bee3 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 12 Jun 2026 20:11:10 -0400 Subject: [PATCH] Avoid loading some resources on round watches --- src/c/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/c/main.c b/src/c/main.c index dd43082..0bc1a22 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -9,17 +9,17 @@ static TextLayer *s_text_layer; static GBitmap *s_action_icon_plus; static GBitmap *s_action_icon_minus; static GBitmap *s_action_icon_reset; -static GBitmap *s_legacy_actionbar_patch_bottom; -static GBitmap *s_legacy_actionbar_patch_top; static ActionBarLayer *s_action_bar_layer; static StatusBarLayer *s_status_bar_layer; -static BitmapLayer *s_patch_bottom_layer; -static BitmapLayer *s_patch_top_layer; static int s_count; #if PBL_RECT +static GBitmap *s_legacy_actionbar_patch_bottom; +static GBitmap *s_legacy_actionbar_patch_top; +static BitmapLayer *s_patch_bottom_layer; +static BitmapLayer *s_patch_top_layer; #if PBL_DISPLAY_WIDTH == 200 static const GRect s_patch_bottom_grect = GRect(166, 223, 34, 5); static const GRect s_patch_top_grect = GRect(166, 20, 34, 5); @@ -119,8 +119,10 @@ void init() { s_action_icon_plus = gbitmap_create_with_resource(RESOURCE_ID_PLUS); s_action_icon_minus = gbitmap_create_with_resource(RESOURCE_ID_MINUS); s_action_icon_reset = gbitmap_create_with_resource(RESOURCE_ID_RESET); +#if PBL_RECT s_legacy_actionbar_patch_bottom = gbitmap_create_with_resource(RESOURCE_ID_PATCH_BOTTOM); s_legacy_actionbar_patch_top = gbitmap_create_with_resource(RESOURCE_ID_PATCH_TOP); +#endif s_window = window_create();