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
|
|
@ -44,6 +44,11 @@ impl Default for Settings {
|
|||
impl From<graphics::Settings> for Settings {
|
||||
fn from(settings: graphics::Settings) -> Self {
|
||||
Self {
|
||||
present_mode: if settings.vsync {
|
||||
wgpu::PresentMode::AutoVsync
|
||||
} else {
|
||||
wgpu::PresentMode::AutoNoVsync
|
||||
},
|
||||
default_font: settings.default_font,
|
||||
default_text_size: settings.default_text_size,
|
||||
antialiasing: settings.antialiasing,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue