4d6b170769
* Fixing compiler warnings with -Wextra * More warnings suppression, WIP * Even more warning fixes * Added new lines at end of text files. * Padding fix * Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline * Fixes for Secplus v1 * -additional warnings * +-Wredundant-decls fixes * FuriHal: print stack overflow task name in console * FuriHal: add missing include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
#include "../bad_usb_app_i.h"
|
|
#include "furi_hal_power.h"
|
|
#include "furi_hal_usb.h"
|
|
|
|
static bool bad_usb_file_select(BadUsbApp* bad_usb) {
|
|
furi_assert(bad_usb);
|
|
|
|
// Input events and views are managed by file_select
|
|
bool res = dialog_file_select_show(
|
|
bad_usb->dialogs,
|
|
BAD_USB_APP_PATH_FOLDER,
|
|
BAD_USB_APP_EXTENSION,
|
|
bad_usb->file_name,
|
|
sizeof(bad_usb->file_name),
|
|
NULL);
|
|
return res;
|
|
}
|
|
|
|
void bad_usb_scene_file_select_on_enter(void* context) {
|
|
BadUsbApp* bad_usb = context;
|
|
|
|
furi_hal_usb_disable();
|
|
|
|
if(bad_usb_file_select(bad_usb)) {
|
|
scene_manager_next_scene(bad_usb->scene_manager, BadUsbSceneWork);
|
|
} else {
|
|
furi_hal_usb_enable();
|
|
//scene_manager_previous_scene(bad_usb->scene_manager);
|
|
view_dispatcher_stop(bad_usb->view_dispatcher);
|
|
}
|
|
}
|
|
|
|
bool bad_usb_scene_file_select_on_event(void* context, SceneManagerEvent event) {
|
|
UNUSED(context);
|
|
UNUSED(event);
|
|
// BadUsbApp* bad_usb = context;
|
|
return false;
|
|
}
|
|
|
|
void bad_usb_scene_file_select_on_exit(void* context) {
|
|
UNUSED(context);
|
|
// BadUsbApp* bad_usb = context;
|
|
}
|