From a904f76092b500cf450afbf21c929c290bd046da Mon Sep 17 00:00:00 2001 From: afiqzudinhadi Date: Wed, 24 Jun 2026 20:02:28 +0800 Subject: [PATCH] fix: guard split_peripheral_layer_changed behind CONFIG_ZMK_SPLIT Without this guard, non-split builds (e.g. settings_reset) fail with undefined reference to zmk_event_zmk_split_peripheral_layer_changed. --- app/src/activity.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/activity.c b/app/src/activity.c index 161771df..570b1462 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -16,7 +16,9 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#if IS_ENABLED(CONFIG_ZMK_SPLIT) #include +#endif #include #include @@ -110,7 +112,9 @@ static int activity_init(void) { ZMK_LISTENER(activity, activity_event_listener); ZMK_SUBSCRIPTION(activity, zmk_position_state_changed); ZMK_SUBSCRIPTION(activity, zmk_sensor_event); +#if IS_ENABLED(CONFIG_ZMK_SPLIT) ZMK_SUBSCRIPTION(activity, zmk_split_peripheral_layer_changed); +#endif #if IS_ENABLED(CONFIG_ZMK_POINTING)