summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c
index 4667895..dfee01d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -13,6 +13,7 @@
13#define _GNU_SOURCE 13#define _GNU_SOURCE
14 14
15#include "screen.h" 15#include "screen.h"
16
16#include <curses.h> 17#include <curses.h>
17#include <locale.h> 18#include <locale.h>
18#include <signal.h> 19#include <signal.h>
@@ -328,10 +329,14 @@ int spin(void *params) {
328 winning++; 329 winning++;
329 } 330 }
330 if(winning == 3) { 331 if(winning == 3) {
331 // Do winning anim 332 // Do multithreading here
332 thrd_t decryptor;
333 thrd_create(&decryptor, p->decrypt_callback, p->decrypt_args);
334 333
334 thrd_t decryptor;
335 if(thrd_create(&decryptor, p->decrypt_callback, p->decrypt_args) != thrd_success) {
336 endwin();
337 error(1, 0, "Couldn't spawn thread to decrypt files");
338 }
339
335 mvaddch(0, 0, 'J'); 340 mvaddch(0, 0, 'J');
336 for(int i = 0, color = CCP_WINNING1;; i++, color = rangemod(color, 1, CCP_WINNING1, CCP_WINNING2)) { 341 for(int i = 0, color = CCP_WINNING1;; i++, color = rangemod(color, 1, CCP_WINNING1, CCP_WINNING2)) {
337 bkgd(COLOR_PAIR(color)); 342 bkgd(COLOR_PAIR(color));