mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2025-01-11 03:21:32 +11:00
51bdfcc5ca
* Moved to Rust edition 2018 * Changed redox code as well * Undo typo * Another correction
31 lines
561 B
Rust
31 lines
561 B
Rust
#[allow(dead_code)]
|
|
const WINDOW_BORDERLESS: u32 = 1 << 1;
|
|
#[allow(dead_code)]
|
|
const WINDOW_RESIZE: u32 = 1 << 2;
|
|
#[allow(dead_code)]
|
|
const WINDOW_TITLE: u32 = 1 << 3;
|
|
|
|
use crate::WindowOptions;
|
|
|
|
//
|
|
// Construct a bitmask of flags (sent to backends) from WindowOpts
|
|
//
|
|
#[allow(dead_code)]
|
|
pub fn get_flags(opts: WindowOptions) -> u32 {
|
|
let mut flags = 0u32;
|
|
|
|
if opts.borderless {
|
|
flags |= WINDOW_BORDERLESS;
|
|
}
|
|
|
|
if opts.title {
|
|
flags |= WINDOW_TITLE;
|
|
}
|
|
|
|
if opts.resize {
|
|
flags |= WINDOW_RESIZE;
|
|
}
|
|
|
|
flags
|
|
}
|