add USB capture feature (disabled by default)

This commit is contained in:
Lephenixnoir 2022-06-24 20:45:54 +01:00
parent 5a33181db7
commit 57ad21375b
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 16 additions and 0 deletions

View File

@ -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;