summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Liu <joshua.liu@sourceobby.com>2025-08-21 16:09:50 -0400
committerJoshua Liu <joshua.liu@sourceobby.com>2025-08-21 16:09:50 -0400
commit7d34748c2adb810374894adbac899ad08fbe54ee (patch)
tree8ba69a3e626d5772577476a04a253b956f04fc56
parentda525aae81d7b1221e73a4b1a9c048bfa832bf37 (diff)
feat: corrected some bad types and completed the pthread_create function call
-rw-r--r--streamdeck.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/streamdeck.c b/streamdeck.c
index 4de63a3..453bd80 100644
--- a/streamdeck.c
+++ b/streamdeck.c
@@ -9,7 +9,7 @@ int update_current_folder (screen* folder);
int load_folder ();
int load_key ();
int createreadthread (streamdeck* target);
-void read_deck_stream (void* target);
+void* read_deck_stream (void* target);
int
@@ -99,7 +99,8 @@ connect()
int
createreadthread(streamdeck* target)
{
- if (pthread_create(pthread_t *restrict newthread, NULL, read_deck_stream, target))
+ pthread_t read_thread;
+ if (pthread_create(&read_thread, NULL, read_deck_stream, target))
return 1;
return 0;
}
@@ -227,11 +228,11 @@ set_brightness (streamdeck* deck, int new_level)
return 0;
}
-void
+void*
read_deck_stream (void* target)
{
streamdeck* deck = (streamdeck*) target;
if (!deck)
- return;
+ return NULL;
}