Merge remote-tracking branch 'ul/dev' into mntm-dev

This commit is contained in:
Willy-JL
2025-02-04 15:32:17 +00:00
19 changed files with 244 additions and 233 deletions

View File

@@ -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);
}

View File

@@ -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) {

View File

@@ -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;