[FL-2970] Untangle NFC_APP_FOLDER from nfc_device (#2124)

* Untangle NFC_APP_FOLDER from nfc_device
* Make the folder an internal part of the nfc device struct
* Move the NFC folder definition to the nfc allocator
* Move the NFC folder definition to the allocator in the nfc magic FAP
* Replace furi_string_printf with furi_string_set for folder allocation and handle the cases when folder has no slashes
* Build and allocation fixes

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Astra
2022-12-19 21:57:48 +02:00
committed by GitHub
parent a81a5ca57c
commit fa87216a1e
6 changed files with 53 additions and 12 deletions

View File

@@ -46,6 +46,7 @@ Nfc* nfc_alloc() {
// Nfc device
nfc->dev = nfc_device_alloc();
furi_string_set(nfc->dev->folder, NFC_APP_FOLDER);
// Open GUI record
nfc->gui = furi_record_open(RECORD_GUI);

View File

@@ -44,6 +44,7 @@
ARRAY_DEF(MfClassicUserKeys, char*, M_PTR_OPLIST);
#define NFC_TEXT_STORE_SIZE 128
#define NFC_APP_FOLDER ANY_PATH("nfc")
typedef enum {
NfcRpcStateIdle,