Fix live reload on windows
This commit is contained in:
+5
-5
@@ -556,9 +556,9 @@ impl App {
|
|||||||
Ok(event) => {
|
Ok(event) => {
|
||||||
//info!("event: {:?}", event);
|
//info!("event: {:?}", event);
|
||||||
match event.kind {
|
match event.kind {
|
||||||
notify::EventKind::Modify(notify::event::ModifyKind::Data(_)) => {
|
notify::EventKind::Modify(_) => {
|
||||||
info!("event: {:?}", event);
|
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),
|
Err(e) => error!("watch error: {:?}", e),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
.inspect_err(|err| error!("Could not create watcher: {}", err))
|
||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
if watcher.is_some()
|
if watcher.is_some()
|
||||||
@@ -1734,10 +1735,9 @@ impl App {
|
|||||||
|
|
||||||
rcx.render_start = Instant::now();
|
rcx.render_start = Instant::now();
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
if self.glsl_changed.load(std::sync::atomic::Ordering::Relaxed) {
|
||||||
if self.glsl_changed.load(std::sync::atomic::Ordering::SeqCst) {
|
|
||||||
self.glsl_changed
|
self.glsl_changed
|
||||||
.store(false, std::sync::atomic::Ordering::SeqCst);
|
.store(false, std::sync::atomic::Ordering::Relaxed);
|
||||||
if std::process::Command::new("python")
|
if std::process::Command::new("python")
|
||||||
.arg("assemble_trace.py")
|
.arg("assemble_trace.py")
|
||||||
.status()
|
.status()
|
||||||
|
|||||||
Reference in New Issue
Block a user