mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 05:08:35 -07:00
Add desktop auto lock with pin setting
This commit is contained in:
@@ -56,7 +56,7 @@ static bool desktop_custom_event_callback(void* context, uint32_t event) {
|
||||
return true;
|
||||
case DesktopGlobalAutoLock:
|
||||
if(!loader_is_locked(desktop->loader)) {
|
||||
if(desktop->settings.pin_code.length > 0) {
|
||||
if(desktop->settings.auto_lock_with_pin && desktop->settings.pin_code.length > 0) {
|
||||
desktop_pin_lock(&desktop->settings);
|
||||
}
|
||||
desktop_lock(desktop);
|
||||
|
||||
@@ -54,4 +54,5 @@ typedef struct {
|
||||
PinCode pin_code;
|
||||
uint8_t is_locked;
|
||||
uint32_t auto_lock_delay_ms;
|
||||
bool auto_lock_with_pin;
|
||||
} DesktopSettings;
|
||||
|
||||
Reference in New Issue
Block a user