mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-11 19:33:30 -07:00
added nsfw to dap link
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include <dialogs/dialogs.h>
|
||||
#include "DAP_Link_icons.h"
|
||||
|
||||
#include "../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
/***************************************************************************/
|
||||
/****************************** DAP COMMON *********************************/
|
||||
/***************************************************************************/
|
||||
@@ -482,22 +484,37 @@ DapConfig* dap_app_get_config(DapApp* app) {
|
||||
|
||||
int32_t dap_link_app(void* p) {
|
||||
UNUSED(p);
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
if(furi_hal_usb_is_locked()) {
|
||||
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
|
||||
DialogMessage* message = dialog_message_alloc();
|
||||
dialog_message_set_header(message, "Connection\nis active!", 3, 2, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(
|
||||
message,
|
||||
"Disconnect from\nPC or phone to\nuse this function.",
|
||||
3,
|
||||
30,
|
||||
AlignLeft,
|
||||
AlignTop);
|
||||
if (settings->sfw_mode) {
|
||||
dialog_message_set_header(message, "Connection\nis active!", 3, 2, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(
|
||||
message,
|
||||
"Disconnect from\nPC or phone to\nuse this function.",
|
||||
3,
|
||||
30,
|
||||
AlignLeft,
|
||||
AlignTop);
|
||||
}
|
||||
else {
|
||||
dialog_message_set_header(message, "I am not\na whore!", 3, 2, AlignLeft, AlignTop);
|
||||
dialog_message_set_text(
|
||||
message,
|
||||
"Pull out from\nPC or phone to\nuse me like this.",
|
||||
3,
|
||||
30,
|
||||
AlignLeft,
|
||||
AlignTop);
|
||||
}
|
||||
dialog_message_set_icon(message, &I_ActiveConnection_50x64, 78, 0);
|
||||
dialog_message_show(dialogs, message);
|
||||
dialog_message_free(message);
|
||||
furi_record_close(RECORD_DIALOGS);
|
||||
free(settings);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -524,4 +541,4 @@ int32_t dap_link_app(void* p) {
|
||||
dap_app_free(app);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user