Просмотр исходного кода

Just some small tweaks

- These tweaks make the app work on momentum firmware
acegoal07 1 год назад
Родитель
Сommit
cda44998d8

+ 0 - 1
scenes/nfc_playlist_scene_emulation.c

@@ -88,7 +88,6 @@ int32_t nfc_playlist_emulation_task(void* context) {
             nfc_playlist_worker_stop(nfc_playlist->nfc_playlist_worker);
             nfc_playlist_worker_clear_nfc_data(nfc_playlist->nfc_playlist_worker);
          }
-         free(file_path);
       }
       popup_reset(nfc_playlist->popup);
       popup_set_header(nfc_playlist->popup, EmulationState == NfcPlaylistEmulationState_Canceled ? "Emulation stopped" : "Emulation finished", 64, 10, AlignCenter, AlignTop);

+ 1 - 1
scenes/nfc_playlist_scene_name_new_file.c

@@ -11,7 +11,7 @@ void nfc_playlist_name_new_file_menu_callback(void* context) {
       File* file = storage_file_alloc(storage);
       if (storage_file_open(file, furi_string_get_cstr(file_name), FSAM_READ_WRITE, FSOM_CREATE_NEW)) {
          storage_file_close(file);
-         furi_string_move(nfc_playlist->settings.file_path, file_name);
+         furi_string_swap(nfc_playlist->settings.file_path, file_name);
       }
       storage_file_free(file);
    }

+ 1 - 1
scenes/nfc_playlist_scene_playlist_select.c

@@ -2,7 +2,7 @@
 
 void nfc_playlist_playlist_select_menu_callback(void* context) {
    NfcPlaylist* nfc_playlist = context;
-   furi_string_move(nfc_playlist->settings.file_path, nfc_playlist->file_browser_output);
+   furi_string_swap(nfc_playlist->settings.file_path, nfc_playlist->file_browser_output);
    furi_string_reset(nfc_playlist->file_browser_output);
    scene_manager_previous_scene(nfc_playlist->scene_manager);
 }