mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 17:28:36 -07:00
New loader stuff in api mismatch (app too new/old)
This commit is contained in:
@@ -455,18 +455,21 @@ static LoaderStatus loader_start_external_app(
|
||||
const FlipperApplicationManifest* manifest =
|
||||
flipper_application_get_manifest(loader->app.fap);
|
||||
|
||||
char buf[66];
|
||||
bool app_newer = preload_res == FlipperApplicationPreloadStatusApiTooNew;
|
||||
const char* header = app_newer ? "App Too New" : "App Too Old";
|
||||
char text[63];
|
||||
snprintf(
|
||||
buf,
|
||||
66,
|
||||
"FAP: %i != FW: %i\nThis app might not work\nContinue anyways?",
|
||||
text,
|
||||
sizeof(text),
|
||||
"APP:%i %c FW:%i\nThis app might not work\nContinue anyways?",
|
||||
manifest->base.api_version.major,
|
||||
app_newer ? '>' : '<',
|
||||
firmware_api_interface->api_version_major);
|
||||
|
||||
DialogMessage* message = dialog_message_alloc();
|
||||
dialog_message_set_header(message, "API Mismatch", 64, 0, AlignCenter, AlignTop);
|
||||
dialog_message_set_header(message, header, 64, 0, AlignCenter, AlignTop);
|
||||
dialog_message_set_buttons(message, "Cancel", NULL, "Continue");
|
||||
dialog_message_set_text(message, buf, 64, 32, AlignCenter, AlignCenter);
|
||||
dialog_message_set_text(message, text, 64, 32, AlignCenter, AlignCenter);
|
||||
DialogMessageButton res =
|
||||
dialog_message_show(furi_record_open(RECORD_DIALOGS), message);
|
||||
dialog_message_free(message);
|
||||
|
||||
Reference in New Issue
Block a user