mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 10:29:35 +03:00
windows: Fix Zed
freezing when resuming from sleep (#11589)
It seems that on the first frame after the system resumes from sleep, `dcomp_vsync_fn` mistakenly detects the `timer_stop_event` triggering and exits the loop. Release Notes: - N/A
This commit is contained in:
parent
2e0811e113
commit
9772b7ac33
@ -813,8 +813,8 @@ unsafe fn show_savefile_dialog(directory: PathBuf) -> Result<IFileSaveDialog> {
|
||||
|
||||
fn begin_vsync_timer(vsync_event: HANDLE, timer_stop_event: OwnedHandle) {
|
||||
let vsync_fn = select_vsync_fn();
|
||||
std::thread::spawn(move || {
|
||||
while vsync_fn(timer_stop_event.to_raw()) {
|
||||
std::thread::spawn(move || loop {
|
||||
if vsync_fn(timer_stop_event.to_raw()) {
|
||||
if unsafe { SetEvent(vsync_event) }.log_err().is_none() {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user