if fps is adjusted below 30, not set fps to 30 when changing image quality (#8468)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-06-25 17:25:50 +08:00
committed by GitHub
parent 245f08055f
commit 93133b9a6c
3 changed files with 12 additions and 9 deletions

View File

@@ -410,9 +410,12 @@ impl<T: InvokeUiSession> Session<T> {
self.send(Data::Message(msg));
}
if value != "custom" {
// non custom quality use 30 fps
let msg = self.lc.write().unwrap().set_custom_fps(30, false);
self.send(Data::Message(msg));
let last_auto_fps = self.lc.read().unwrap().last_auto_fps;
if last_auto_fps.unwrap_or(usize::MAX) >= 30 {
// non custom quality use 30 fps
let msg = self.lc.write().unwrap().set_custom_fps(30, false);
self.send(Data::Message(msg));
}
}
}