- Timestamp:
- 06/04/04 19:44:56 (21 years ago)
- Location:
- ps/trunk/source/lib/res
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/lib/res/res.cpp
r353 r400 2 2 3 3 #include "res.h" 4 5 #ifdef _WIN32 6 #include "sysdep/win/wfam.h" 7 #else 8 #include <fam.h> 9 #endif 10 4 11 5 12 int res_reload(const char* const fn) … … 9 16 10 17 18 static FAMConnection fc; 19 static bool initialized; 11 20 21 22 int res_watch_dir(const char* const dir) 23 { 24 if(!initialized) 25 { 26 CHECK_ERR(FAMOpen2(&fc, "lib_res")); 27 atexit2(FAMClose, (uintptr_t)&fc); 28 initialized = true; 29 } 30 31 // 32 33 return 0; 34 } 35 36 37 int res_reload_changed_files() 38 { 39 if(!initialized) 40 return -1; 41 42 FAMEvent e; 43 while(FAMPending(&fc) > 0) 44 if(FAMNextEvent(&fc, &e) == 0) 45 { 46 const char* sys_fn = e.filename; 47 } 48 49 return 0; 50 } 12 51 13 52 -
ps/trunk/source/lib/res/res.h
r353 r400 4 4 #include "res/mem.h" 5 5 #include "res/font.h" 6 #include "res/file.h" 7 #include "res/zip.h" 6 8 7 9 8 extern int res_reload(const char* fn); 9 10 extern int res_watch_dir(const char* dir); 11 12 extern int res_reload_changed_files();
Note:
See TracChangeset
for help on using the changeset viewer.
