remove noise when device lost
This commit is contained in:
parent
275d84d566
commit
b5377c56f2
1 changed files with 3 additions and 2 deletions
|
@ -851,8 +851,9 @@ fn begin_vsync(vsync_event: HANDLE) {
|
|||
let event: SafeHandle = vsync_event.into();
|
||||
std::thread::spawn(move || unsafe {
|
||||
loop {
|
||||
windows::Win32::Graphics::Dwm::DwmFlush().log_err();
|
||||
SetEvent(*event).log_err();
|
||||
if windows::Win32::Graphics::Dwm::DwmFlush().is_ok() {
|
||||
SetEvent(*event).log_err();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue