Browse Source

move dynamic_macro_record_key_user() conditional logic

The dynamic_macro_record_key_user() user hook should trigger on every call to dynamic_macro_record_key(). Code in the else block only triggers when the recording has reached the end of the available buffer. This moves the hook call out of the conditional block. A more useful action should still be added for the else block. Fixes #16173
pull/16175/head
yearski 2 years ago
committed by GitHub
parent
commit
88776d632b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      quantum/process_keycode/process_dynamic_macro.c

+ 3
- 1
quantum/process_keycode/process_dynamic_macro.c View File

@ -110,10 +110,12 @@ void dynamic_macro_record_key(keyrecord_t *macro_buffer, keyrecord_t **macro_poi
**macro_pointer = *record;
*macro_pointer += direction;
} else {
dynamic_macro_record_key_user(direction, record);
// TBD: perform some action when the recording is still in progress but has consumed the available macro buffer
dprint("dynamic macro: end of buffer. New key record not added to buffer.\n");
}
dprintf("dynamic macro: slot %d length: %d/%d\n", DYNAMIC_MACRO_CURRENT_SLOT(), DYNAMIC_MACRO_CURRENT_LENGTH(macro_buffer, *macro_pointer), DYNAMIC_MACRO_CURRENT_CAPACITY(macro_buffer, macro2_end));
dynamic_macro_record_key_user(direction, record);
}
/**


Loading…
Cancel
Save