Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Jan 4, 2025
1 parent 8216ed4 commit 66cdb25
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/src/studio/keymap_subsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,17 @@ zmk_studio_Response move_layer(const zmk_studio_Request *req) {
if (ret >= 0) {
resp.which_result = zmk_keymap_SetActivePhysicalLayoutResponse_ok_tag;
resp.result.ok.layers.funcs.encode = encode_keymap_layers;
populate_keymap_extra_props(&resp.result.ok);
resp.result.ok.max_layer_name_length = CONFIG_ZMK_KEYMAP_LAYER_NAME_MAX_LEN;
resp.result.ok.available_layers = 0;

for (zmk_keymap_layer_index_t index = 0; index < ZMK_KEYMAP_LAYERS_LEN; index++) {
zmk_keymap_layer_id_t id = zmk_keymap_layer_index_to_id(index);

if (id == UINT8_MAX) {
resp.result.ok.available_layers = ZMK_KEYMAP_LAYERS_LEN - index;
break;
}
}
raise_zmk_studio_rpc_notification((struct zmk_studio_rpc_notification){
.notification = KEYMAP_NOTIFICATION(unsaved_changes_status_changed, true)});
} else {
Expand Down

0 comments on commit 66cdb25

Please sign in to comment.