diff options
Diffstat (limited to 'src/block/screendescriptor.rs')
-rw-r--r-- | src/block/screendescriptor.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/block/screendescriptor.rs b/src/block/screendescriptor.rs index ff70896..444b44f 100644 --- a/src/block/screendescriptor.rs +++ b/src/block/screendescriptor.rs @@ -9,6 +9,16 @@ pub struct ScreenDescriptor { } impl ScreenDescriptor { + pub fn new(width: u16, height: u16) -> Self { + Self { + width, + height, + packed: 0, + background_color_index: 0, + pixel_aspect_ratio: 0, + } + } + pub fn set_color_table_present(&mut self, is_present: bool) { if is_present { self.packed |= 0b1000_0000; |