[COMMENTED] Make inotify monitor new per-app config file or if delete, the main config file again

Needs to be triggered by main config file change.
FIXME what if there's no config file?
pull/208/head
jackun 4 years ago
parent 2220cb9d74
commit 31f9cce720
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -21,9 +21,14 @@ static void fileChanged(void *params_void) {
struct inotify_event *event =
(struct inotify_event *) &buffer[i];
i += EVENT_SIZE + event->len;
if (event->mask & IN_MODIFY) {
if (event->mask & IN_MODIFY /*|| event->mask & IN_IGNORED*/) {
parse_overlay_config(&local_params, getenv("MANGOHUD_CONFIG"));
std::lock_guard<std::mutex> lk(nt->mutex);
/*if (nt->params->config_file_path != local_params.config_file_path) {
fprintf(stderr, "MANGOHUD: watching config file: %s\n", local_params.config_file_path.c_str());
inotify_rm_watch(nt->fd, nt->wd);
nt->wd = inotify_add_watch(nt->fd, local_params.config_file_path.c_str(), IN_MODIFY | IN_DELETE | IN_DELETE_SELF);
}*/
*nt->params = local_params;
}
}

Loading…
Cancel
Save