rendering improvements
This commit is contained in:
@@ -133,10 +133,6 @@ int main(){
|
||||
|
||||
void render_pass(){
|
||||
|
||||
if (status & STATUS_UPDATE_SCREEN_CLEAR) {
|
||||
clear();
|
||||
status &= ~STATUS_UPDATE_SCREEN_CLEAR;
|
||||
}
|
||||
if (status & STATUS_UPDATE_SCREEN_RESIZE) {
|
||||
|
||||
wresize(win_t, 1, terminal_width);
|
||||
@@ -151,12 +147,23 @@ void render_pass(){
|
||||
mvwin(win_m, 1, (terminal_width/8));
|
||||
mvwin(win_r, 1, ((terminal_width/2)));
|
||||
mvwin(win_b, terminal_height-1, 0);
|
||||
status |= STATUS_UPDATE_SCREEN_CLEAR;
|
||||
status &= ~STATUS_UPDATE_SCREEN_RESIZE;
|
||||
|
||||
}
|
||||
if (pthread_mutex_lock(&mutex_render) == 0) {
|
||||
if (status & STATUS_UPDATE_SCREEN_CLEAR) {
|
||||
clear();
|
||||
pthread_mutex_lock(&mutex_render);
|
||||
refresh();
|
||||
status &= ~STATUS_UPDATE_SCREEN_CLEAR;
|
||||
pthread_mutex_unlock(&mutex_render);
|
||||
}
|
||||
/*
|
||||
if (pthread_mutex_trylock(&mutex_render) == 0) {
|
||||
doupdate();
|
||||
pthread_mutex_unlock(&mutex_render);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/*this function exists for things done at startup (initialization, reading config, etc)*/
|
||||
void init() {
|
||||
|
||||
Reference in New Issue
Block a user