1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-21 10:20:15 -04:00

delta time no longer reloading images

This commit is contained in:
nova
2025-10-13 23:09:57 +02:00
parent 140457e4b7
commit df726e2f32
3 changed files with 4 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
#define STATUS_UPDATE_SCREEN_RELOAD_FULL 32 #define STATUS_UPDATE_SCREEN_RELOAD_FULL 32
#define STATUS_USER_ROOT 64 #define STATUS_USER_ROOT 64
#define STATUS_INPUT_MATCH 128 #define STATUS_INPUT_MATCH 128
#define STATUS_DELTA_TIME 256
#define SETTINGS_HAS_COLOR 1 #define SETTINGS_HAS_COLOR 1

4
main.c
View File

@@ -81,7 +81,7 @@ int main(){
temp_heigth = terminal_height; temp_heigth = terminal_height;
} }
if (threading) { if (threading) {
status &= ~(STATUS_RELOAD_DIRECTORY); status &= ~(STATUS_RELOAD_DIRECTORY | STATUS_DELTA_TIME);
threading = 0; threading = 0;
} }
if (status & STATUS_RUN_BACKEND) { if (status & STATUS_RUN_BACKEND) {
@@ -101,7 +101,7 @@ int main(){
time(&dt); time(&dt);
if (dt - t >= SETTINGS_RELOAD_DIR_DELTA) { if (dt - t >= SETTINGS_RELOAD_DIR_DELTA) {
time(&t); time(&t);
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY); status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY | STATUS_DELTA_TIME);
} }
#endif #endif

View File

@@ -183,7 +183,7 @@ void *thread_rgt(){
free(rgt_buffer); free(rgt_buffer);
rgt_buffer = malloc(sizeof(char)); rgt_buffer = malloc(sizeof(char));
rgt_buffer[0] = '\0'; rgt_buffer[0] = '\0';
} else { } else if ((status & STATUS_DELTA_TIME) != STATUS_DELTA_TIME) {
unsigned long i = 0; unsigned long i = 0;
for (i = 0; i < rgt_file_count; i++) { for (i = 0; i < rgt_file_count; i++) {