Fix live reload on windows

This commit is contained in:
2025-12-20 00:31:38 +00:00
parent 75bc063c8f
commit 8fcd512c36
+5 -5
View File
@@ -556,9 +556,9 @@ impl App {
Ok(event) => {
//info!("event: {:?}", event);
match event.kind {
notify::EventKind::Modify(notify::event::ModifyKind::Data(_)) => {
notify::EventKind::Modify(_) => {
info!("event: {:?}", event);
watcher_glsl_changed.store(true, std::sync::atomic::Ordering::SeqCst);
watcher_glsl_changed.store(true, std::sync::atomic::Ordering::Relaxed);
}
_ => {}
}
@@ -566,6 +566,7 @@ impl App {
Err(e) => error!("watch error: {:?}", e),
},
)
.inspect_err(|err| error!("Could not create watcher: {}", err))
.ok();
if watcher.is_some()
@@ -1734,10 +1735,9 @@ impl App {
rcx.render_start = Instant::now();
#[cfg(target_os = "linux")]
if self.glsl_changed.load(std::sync::atomic::Ordering::SeqCst) {
if self.glsl_changed.load(std::sync::atomic::Ordering::Relaxed) {
self.glsl_changed
.store(false, std::sync::atomic::Ordering::SeqCst);
.store(false, std::sync::atomic::Ordering::Relaxed);
if std::process::Command::new("python")
.arg("assemble_trace.py")
.status()