mirror of
https://github.com/mfulz/qmk_firmware.git
synced 2025-08-12 15:40:49 +02:00
bugfixes
This commit is contained in:
parent
3a52e1819e
commit
89de0b3091
@ -1049,7 +1049,11 @@ bool process_record_enc(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->event.pressed) {
|
||||
return true;
|
||||
}
|
||||
enc_read_pw(keycode);
|
||||
int ret = enc_read_pw(keycode);
|
||||
if (ret != 0) {
|
||||
enc_switch_mode(ENC_MODE_CLOSED);
|
||||
return false;
|
||||
}
|
||||
if (enc_ctx.state.pw_ready) {
|
||||
if (enc_unlock() != 0) {
|
||||
enc_switch_mode(ENC_MODE_CLOSED);
|
||||
@ -1097,11 +1101,14 @@ bool process_record_enc(uint16_t keycode, keyrecord_t *record) {
|
||||
int ret = enc_read_key(keycode);
|
||||
if (ret != 0) {
|
||||
enc_switch_mode(ENC_MODE_CLOSED);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!enc_ctx.state.key_ready) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (enc_ctx.state.pw_check_ready && enc_ctx.state.pw_ready && enc_ctx.state.seed_ready) {
|
||||
if (enc_ctx.state.key_ready && enc_ctx.state.pw_check_ready && enc_ctx.state.pw_ready && enc_ctx.state.seed_ready) {
|
||||
if (initialize_enc(NULL, NULL, true) != 0) {
|
||||
enc_switch_mode(ENC_MODE_CLOSED);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user