summaryrefslogtreecommitdiffstats
path: root/quantum/dynamic_macro.h
diff options
context:
space:
mode:
authorDaniel Shields <dshields@bats.com>2017-05-11 10:46:11 +0200
committerDaniel Shields <dshields@bats.com>2017-06-01 17:29:58 +0200
commit606e13a47ea3f4099e09c0a71294555163790c4a (patch)
tree6f158d763086ebceded8890264febef9fdf8087c /quantum/dynamic_macro.h
parentec3e684123c5abf22fd8d397786adbd978bbfcdb (diff)
downloadqmk_firmware-606e13a47ea3f4099e09c0a71294555163790c4a.tar.gz
qmk_firmware-606e13a47ea3f4099e09c0a71294555163790c4a.tar.xz
Prevent the recording of looping dynamic macros.
If a macro play key is inadvertently recorded in a dynamic macro a loop is created and the macro will not terminate when played. This should be prevented.
Diffstat (limited to 'quantum/dynamic_macro.h')
-rw-r--r--quantum/dynamic_macro.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h
index f242405de..045ee95b5 100644
--- a/quantum/dynamic_macro.h
+++ b/quantum/dynamic_macro.h
@@ -274,6 +274,10 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record)
macro_id = 0;
}
return false;
+ case DYN_MACRO_PLAY1:
+ case DYN_MACRO_PLAY2:
+ dprintln("dynamic macro: ignoring macro play key while recording");
+ return false;
default:
/* Store the key in the macro buffer and process it normally. */
switch (macro_id) {