mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 06:08:35 -07:00
Merge remote-tracking branch 'ul/dev' into mntm-dev
This commit is contained in:
@@ -137,6 +137,10 @@ static bool desktop_custom_event_callback(void* context, uint32_t event) {
|
||||
|
||||
} else if(event == DesktopGlobalAutoLock) {
|
||||
if(!desktop->app_running && !desktop->locked) {
|
||||
// Disable AutoLock if usb_inhibit_autolock option enabled and device have active USB session.
|
||||
if((desktop->settings.usb_inhibit_auto_lock) && (furi_hal_usb_is_locked())) {
|
||||
return true;
|
||||
}
|
||||
desktop_lock(desktop, desktop->settings.auto_lock_with_pin);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define TAG "DesktopSettings"
|
||||
|
||||
#define DESKTOP_SETTINGS_VER (11)
|
||||
#define DESKTOP_SETTINGS_VER (12)
|
||||
#define DESKTOP_SETTINGS_MAGIC (0x13) // Different from OFW 0x17
|
||||
|
||||
void desktop_settings_load(DesktopSettings* settings) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
typedef struct {
|
||||
uint32_t auto_lock_delay_ms;
|
||||
uint8_t auto_lock_with_pin;
|
||||
uint8_t usb_inhibit_auto_lock;
|
||||
uint8_t display_clock;
|
||||
} DesktopSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user