diff --git a/applications/settings/dolphin_passport/passport.c b/applications/settings/dolphin_passport/passport.c index ea7f823c9..a25514c4c 100644 --- a/applications/settings/dolphin_passport/passport.c +++ b/applications/settings/dolphin_passport/passport.c @@ -43,14 +43,14 @@ static void render_callback(Canvas* canvas, void* ctx) { DolphinStats* stats = ctx; DesktopSettings* settings = malloc(sizeof(DesktopSettings)); - DESKTOP_SETTINGS_LOAD(settings) + DESKTOP_SETTINGS_LOAD(settings); char level_str[20]; char xp_str[12]; char mood_str[32]; uint8_t mood = 0; - if(Settings->sfw_mode) ( + if(settings->sfw_mode) { if(stats->butthurt <= 4) { mood = 0; snprintf(mood_str, 20, "Mood: Happy"); @@ -61,7 +61,7 @@ static void render_callback(Canvas* canvas, void* ctx) { mood = 2; snprintf(mood_str, 20, "Mood: Angry"); } - ) else ( + } else { if(stats->butthurt <= 4) { mood = 0; snprintf(mood_str, 20, "Status: Wet"); @@ -73,7 +73,7 @@ static void render_callback(Canvas* canvas, void* ctx) { snprintf(mood_str, 20, "Status: Desperate"); } - ) + } uint32_t xp_progress = 0; uint32_t xp_to_levelup = dolphin_state_xp_to_levelup(stats->icounter); uint32_t xp_above_last_levelup = dolphin_state_xp_above_last_levelup(stats->icounter); diff --git a/applications/settings/power_settings_app/scenes/power_settings_scene_power_off.c b/applications/settings/power_settings_app/scenes/power_settings_scene_power_off.c index 1921c8782..d01a09955 100644 --- a/applications/settings/power_settings_app/scenes/power_settings_scene_power_off.c +++ b/applications/settings/power_settings_app/scenes/power_settings_scene_power_off.c @@ -1,4 +1,5 @@ #include "../power_settings_app.h" +#include "../../desktop_settings/desktop_settings_app.h" void power_settings_scene_power_off_dialog_callback(DialogExResult result, void* context) { furi_assert(context); @@ -10,9 +11,16 @@ void power_settings_scene_power_off_on_enter(void* context) { PowerSettingsApp* app = context; DialogEx* dialog = app->dialog; + DesktopSettings* settings = malloc(sizeof(DesktopSettings)); + DESKTOP_SETTINGS_LOAD(settings); + dialog_ex_set_header(dialog, "Turn Off Device?", 64, 2, AlignCenter, AlignTop); - dialog_ex_set_text( - dialog, " I will be\nwaiting for\n you master", 78, 16, AlignLeft, AlignTop); + if (settings->sfw_mode) { + dialog_ex_set_text(dialog, " I will be\nwaiting for\n you here", 78, 16, AlignLeft, AlignTop); + } + else { + dialog_ex_set_text(dialog, " I will be\nwaiting for\n you master", 78, 16, AlignLeft, AlignTop); + } dialog_ex_set_icon(dialog, 21, 13, &I_Cry_dolph_55x52); dialog_ex_set_left_button_text(dialog, "Back"); dialog_ex_set_right_button_text(dialog, "OFF"); @@ -20,6 +28,7 @@ void power_settings_scene_power_off_on_enter(void* context) { dialog_ex_set_context(dialog, app); view_dispatcher_switch_to_view(app->view_dispatcher, PowerSettingsAppViewDialog); + free(settings); } bool power_settings_scene_power_off_on_event(void* context, SceneManagerEvent event) {