user input now handled through function pointers, now defined in config.h
This commit is contained in:
8
main.c
8
main.c
@ -6,9 +6,9 @@
|
||||
#include <sys/sysinfo.h>
|
||||
#include "threading.h"
|
||||
#include "window.h"
|
||||
#include "interactions.h"
|
||||
#include "defines.h"
|
||||
#include "colors.h"
|
||||
#include "interactions.h"
|
||||
|
||||
unsigned int terminal_height;
|
||||
unsigned int terminal_width;
|
||||
@ -24,7 +24,7 @@ void render_pass(WINDOW *wint, WINDOW *winb, WINDOW *winl, WINDOW *winm, WINDOW
|
||||
void init();
|
||||
|
||||
|
||||
int main() {
|
||||
int main(){
|
||||
|
||||
init();
|
||||
|
||||
@ -54,11 +54,13 @@ int main() {
|
||||
}
|
||||
if (status & STATUS_RUN_BACKEND || threading) {
|
||||
if (threading) {
|
||||
/* temporary comment, somehow stops timing related crashes
|
||||
pthread_cancel(thread_t);
|
||||
pthread_cancel(thread_b);
|
||||
pthread_cancel(thread_l);
|
||||
pthread_cancel(thread_m);
|
||||
pthread_cancel(thread_r);
|
||||
*/
|
||||
threading = 0;
|
||||
status &= ~STATUS_RUN_BACKEND;
|
||||
status &= ~STATUS_RELOAD_DIRECTORY;
|
||||
@ -73,7 +75,7 @@ int main() {
|
||||
}
|
||||
}
|
||||
if ((input = getch())) {
|
||||
user_interactions(&input, &status, &settings);
|
||||
user_interactions(&input);
|
||||
timeout_time = 5;
|
||||
} else {
|
||||
timeout_time += 10;
|
||||
|
Reference in New Issue
Block a user