瀏覽代碼

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.
Daniel Shields 8 年之前
父節點
當前提交
606e13a47e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      quantum/dynamic_macro.h

+ 4 - 0
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) {