Merge pull request #2837 from dtzxporter/Expose-setting-to-toggle-vsync-on/off-
Expose setting to disable vsync if requested.
This commit is contained in:
commit
a81f0a2459
3 changed files with 20 additions and 0 deletions
|
|
@ -33,6 +33,13 @@ pub struct Settings {
|
|||
///
|
||||
/// By default, it is enabled.
|
||||
pub antialiasing: bool,
|
||||
|
||||
/// Whether or not to attempt to synchronize rendering when possible.
|
||||
///
|
||||
/// Disabling it can improve rendering performance on some platforms.
|
||||
///
|
||||
/// By default, it is enabled.
|
||||
pub vsync: bool,
|
||||
}
|
||||
|
||||
impl Default for Settings {
|
||||
|
|
@ -43,6 +50,7 @@ impl Default for Settings {
|
|||
default_font: Font::default(),
|
||||
default_text_size: Pixels(16.0),
|
||||
antialiasing: true,
|
||||
vsync: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue