mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Style/visuals tweaks
This commit is contained in:
@@ -88,10 +88,10 @@ fn main() {
|
||||
|
||||
while running {
|
||||
{
|
||||
// Keep smooth frame rate. TODO: proper vsync
|
||||
// Keep smooth frame rate because vsync doesn't work on mac
|
||||
let frame_duration = frame_start.elapsed();
|
||||
if frame_duration < Duration::from_millis(33) {
|
||||
std::thread::sleep(Duration::from_millis(33) - frame_duration);
|
||||
if frame_duration < Duration::from_millis(16) {
|
||||
std::thread::sleep(Duration::from_millis(16) - frame_duration);
|
||||
}
|
||||
frame_start = Instant::now();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user