mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-11 07:12:09 +03:00
fix badusb
This commit is contained in:
parent
2731b3bf57
commit
ac1a53dbf8
@ -104,7 +104,7 @@ BadUsbApp* bad_usb_app_alloc(char* arg) {
|
||||
if(!string_empty_p(app->file_path)) {
|
||||
scene_manager_next_scene(app->scene_manager, BadUsbSceneWork);
|
||||
} else {
|
||||
string_set_str(app->file_path, BAD_USB_APP_PATH_SCRIPT_FOLDER);
|
||||
string_set_str(app->file_path, BAD_USB_APP_BASE_FOLDER);
|
||||
scene_manager_next_scene(app->scene_manager, BadUsbSceneFileSelect);
|
||||
}
|
||||
}
|
||||
@ -115,14 +115,14 @@ BadUsbApp* bad_usb_app_alloc(char* arg) {
|
||||
void bad_usb_app_free(BadUsbApp* app) {
|
||||
furi_assert(app);
|
||||
|
||||
if(app->bad_usb_script) {
|
||||
if(app->bad_usb_script != NULL) {
|
||||
bad_usb_script_close(app->bad_usb_script);
|
||||
app->bad_usb_script = NULL;
|
||||
}
|
||||
|
||||
// Views
|
||||
view_dispatcher_remove_view(app->view_dispatcher, BadUsbAppViewWork);
|
||||
view_dispatcher_remove_view(app->view_dispatcher, BadUsbAppViewConfigLayout);
|
||||
|
||||
bad_usb_free(app->bad_usb_view);
|
||||
|
||||
// Custom Widget
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "views/bad_usb_view.h"
|
||||
|
||||
#define BAD_USB_APP_BASE_FOLDER ANY_PATH("badusb")
|
||||
#define BAD_USB_APP_PATH_SCRIPT_FOLDER BAD_USB_APP_BASE_FOLDER
|
||||
#define BAD_USB_APP_PATH_LAYOUT_FOLDER BAD_USB_APP_BASE_FOLDER "/layouts"
|
||||
#define BAD_USB_APP_SCRIPT_EXTENSION ".txt"
|
||||
#define BAD_USB_APP_LAYOUT_EXTENSION ".kl"
|
||||
@ -45,5 +44,4 @@ typedef enum {
|
||||
BadUsbAppViewError,
|
||||
BadUsbAppViewWork,
|
||||
BadUsbAppViewConfig,
|
||||
BadUsbAppViewConfigLayout,
|
||||
} BadUsbAppView;
|
Loading…
Reference in New Issue
Block a user