Implement directory monitoring using septag/dmon

Use a notification based directory monitoring based on the
septag/dmon lirbary instead of periodically rescan the whole
project's tree.
This commit is contained in:
Francesco Abbate
2021-10-08 21:31:22 +02:00
parent 92362586df
commit 9c43727ebc
14 changed files with 2333 additions and 171 deletions
+5
View File
@@ -14,6 +14,8 @@
#include <mach-o/dyld.h>
#endif
#include "dirmonitor.h"
SDL_Window *window;
@@ -107,6 +109,8 @@ int main(int argc, char **argv) {
SDL_DisplayMode dm;
SDL_GetCurrentDisplayMode(0, &dm);
dirmonitor_init();
window = SDL_CreateWindow(
"", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, dm.w * 0.8, dm.h * 0.8,
SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_HIDDEN);
@@ -189,6 +193,7 @@ init_lua:
lua_close(L);
ren_free_window_resources();
dirmonitor_deinit();
return EXIT_SUCCESS;
}