Skip to content

Commit 4cfc67b

Browse files
committed
Smoother drag/resize on Windows/Linux
1 parent ba34813 commit 4cfc67b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ fn main() {
7070
};
7171

7272
let mut options = eframe::NativeOptions::default();
73+
// Smoother drag/resize on Windows/Linux
74+
#[cfg(any(target_os = "windows", target_os = "linux"))]
75+
{
76+
options.vsync = false;
77+
options.run_and_return = false;
78+
options.wgpu_options.present_mode = wgpu::PresentMode::AutoNoVsync;
79+
}
7380

7481
// Prefer GL only on macOS Intel
7582
#[cfg(all(target_os = "macos", target_arch = "x86_64"))]

0 commit comments

Comments
 (0)