1
0
Fork 0
forked from wry/wry

metal: make post_commit_margin configurable

This commit is contained in:
Julian Orth 2024-09-14 13:56:22 +02:00
parent 76b0f2f734
commit 02ece60909
24 changed files with 224 additions and 55 deletions

View file

@ -2,7 +2,7 @@ use {
crate::{
config::{
context::Context,
extractor::{flt, opt, s32, Extractor, ExtractorError},
extractor::{fltorint, opt, s32, Extractor, ExtractorError},
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
Mode,
},
@ -37,7 +37,7 @@ impl<'a> Parser for ModeParser<'a> {
) -> ParseResult<Self> {
let mut ext = Extractor::new(self.0, span, table);
let (width, height, refresh_rate) =
ext.extract((s32("width"), s32("height"), opt(flt("refresh-rate"))))?;
ext.extract((s32("width"), s32("height"), opt(fltorint("refresh-rate"))))?;
Ok(Mode {
width: width.value,
height: height.value,