cap size to work around loop resize bug
This commit is contained in:
parent
9800992b67
commit
375bbd4aa5
@ -34,8 +34,8 @@ pub fn new(
|
||||
Instruction::Resize(size,user_settings)=>{
|
||||
println!("Resizing to {:?}",size);
|
||||
//let t0=std::time::Instant::now();
|
||||
config.width=size.width.max(1);
|
||||
config.height=size.height.max(1);
|
||||
config.width=size.width.clamp(1,1920/2);
|
||||
config.height=size.height.clamp(1,1080/2);
|
||||
surface.configure(&device,&config);
|
||||
graphics.resize(&device,&config,&user_settings);
|
||||
//println!("Resize took {:?}",t0.elapsed());
|
||||
|
Loading…
x
Reference in New Issue
Block a user