diff options
Diffstat (limited to 'streamdeck.c')
-rw-r--r-- | streamdeck.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/streamdeck.c b/streamdeck.c index 28e5a03..30e5065 100644 --- a/streamdeck.c +++ b/streamdeck.c @@ -106,6 +106,8 @@ streamdeck* connect() { streamdeck* res = malloc(sizeof(streamdeck)); + if (!res) + return NULL; res->hid_handle = create_hid_handler (); if (1) /* Replace this with the actual ID of the different streamdecks */ { @@ -207,7 +209,7 @@ update_current_folder (screen* folder) { for (int i = 0; i < STREAMDECK_MINI; i++ ) { - + ; } return 0; } @@ -222,3 +224,18 @@ load_key () { } +void +destroy_streamdeck (streamdeck* target) +{ + hid_close (target->hid_handle->handler); + free (target->hid_handle); + free (target->curr_screen); + free (target); +} + +void +clean_exit () +{ + hid_exit (); +} + |