forked from Lephenixnoir/hex-editor
add USB capture feature (disabled by default)
This commit is contained in:
parent
5a33181db7
commit
57ad21375b
16
src/main.c
16
src/main.c
|
@ -18,6 +18,12 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define ENABLE_USB 0
|
||||
#ifdef ENABLE_USB
|
||||
#include <gint/usb.h>
|
||||
#include <gint/usb-ff-bulk.h>
|
||||
#endif
|
||||
|
||||
// Global application data //
|
||||
|
||||
struct {
|
||||
|
@ -466,6 +472,16 @@ void hex_view(void)
|
|||
gint_osmenu();
|
||||
jscene_queue_event(scene, (jevent){ .type = JSCENE_PAINT });
|
||||
}
|
||||
#if ENABLE_USB
|
||||
if(key == KEY_OPTN && e.key.shift && e.key.alpha) {
|
||||
if(!usb_is_open()) {
|
||||
usb_interface_t const *intf[] = { &usb_ff_bulk, NULL };
|
||||
usb_open(intf, GINT_CALL_NULL);
|
||||
usb_open_wait();
|
||||
}
|
||||
usb_fxlink_screenshot(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(jscene_focused_widget(scene) == goto_input)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue