summaryrefslogtreecommitdiff
path: root/src/junkcraft.c
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2026-01-28 13:24:36 -0600
committerAaditya Dhruv <[email protected]>2026-01-28 13:25:21 -0600
commit77dddef4153688218bec0b50f547622daa18903d (patch)
tree33ec69c97e86f38c2afb397db8620cfb92f34057 /src/junkcraft.c
parent17cd7420e9d2432d56f9c69c6e4a8ab665ef4b9b (diff)
Move input to separate file
- Input is handled in a separate thread, its all kind of unsafe right now but will fix later on
Diffstat (limited to 'src/junkcraft.c')
-rw-r--r--src/junkcraft.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/junkcraft.c b/src/junkcraft.c
index 4a1a96a..e3e5260 100644
--- a/src/junkcraft.c
+++ b/src/junkcraft.c
@@ -1,12 +1,16 @@
#include "engine.h"
+#include "input.h"
#include <time.h>
+
int main() {
struct engine engine = { 0 };
if (engine_init(&engine) != 0) {
return -1;
}
+ pthread_t input_thread = input_init(&engine);
engine_draw(&engine);
+ input_join(input_thread, &engine);
window_cleanup(engine.window);
return 0;
}