|
|
@ -32,13 +32,13 @@ fn parse_changed_setting(name: &str, value: Option<Value>) -> Value {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn initialize_settings() {
|
|
|
|
pub fn initialize_settings() {
|
|
|
|
SETTINGS.set(&RedrawSettings { extra_buffer_frames: 60 });
|
|
|
|
SETTINGS.set(&RedrawSettings {
|
|
|
|
|
|
|
|
extra_buffer_frames: 60,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
SETTINGS.add_listener("extra_buffer_frames", parse_changed_setting);
|
|
|
|
SETTINGS.add_listener("extra_buffer_frames", parse_changed_setting);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub struct RedrawScheduler {
|
|
|
|
pub struct RedrawScheduler {
|
|
|
|
frames_queued: AtomicU16,
|
|
|
|
frames_queued: AtomicU16,
|
|
|
|
scheduled_frame: Mutex<Option<Instant>>
|
|
|
|
scheduled_frame: Mutex<Option<Instant>>
|
|
|
|