Use NFC device format when NFC app runs with args #810

This commit is contained in:
coreglitch 2021-11-05 15:38:59 +03:00 committed by GitHub
parent f8d3cc251c
commit 4e9e9f32d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,11 @@ int32_t nfc_app(void* p) {
// Check argument and run corresponding scene // Check argument and run corresponding scene
if((*args != '\0') && nfc_device_load(&nfc->dev, p)) { if((*args != '\0') && nfc_device_load(&nfc->dev, p)) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid); if(nfc->dev.format == NfcDeviceSaveFormatMifareUl) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateMifareUl);
} else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
}
} else { } else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneStart); scene_manager_next_scene(nfc->scene_manager, NfcSceneStart);
} }