screenshot

This is so great owo
This commit is contained in:
KikooDX 2021-05-27 11:13:18 +02:00
parent 97ab1923a8
commit 0cabf02e8b
2 changed files with 11 additions and 1 deletions

3
.gitignore vendored
View File

@ -10,3 +10,6 @@
# KBLE backup files
backup_*.kble
# fxlink stuff
fxlink-*.png

View File

@ -2,6 +2,7 @@
#include "choice.h"
#include <gint/display.h>
#include <gint/keyboard.h>
#include <gint/usb-ff-bulk.h>
static struct Bar bars[BAR_TOTAL];
static struct Choice choice;
@ -14,8 +15,11 @@ int
main(void)
{
int i;
key_event_t key_ev;
usb_interface_t const *interfaces[] = { &usb_ff_bulk, NULL };
/* init */
usb_open(interfaces, GINT_CALL_NULL);
for (i = 0; i < BAR_TOTAL; i += 1)
bars[i] = bar_init(i);
choice = choice_init();
@ -25,9 +29,12 @@ main(void)
bar_change(&bars[BAR_SUN], 69.42);
main_draw();
getkey();
key_ev = getkey();
if (key_ev.key == KEY_OPTN && usb_is_open())
usb_fxlink_screenshot(1);
/* deinit */
usb_close();
bar_deinit();
return 1;