rewrite it in rust #1
			
				
			
		
		
		
	| 
						 | 
					@ -3,13 +3,14 @@ use imgui_wgpu::{Renderer, RendererConfig};
 | 
				
			||||||
use imgui_winit_support::WinitPlatform;
 | 
					use imgui_winit_support::WinitPlatform;
 | 
				
			||||||
use pollster::block_on;
 | 
					use pollster::block_on;
 | 
				
			||||||
use std::{num::NonZero, sync::Arc, time::Instant};
 | 
					use std::{num::NonZero, sync::Arc, time::Instant};
 | 
				
			||||||
 | 
					#[cfg(target_os = "windows")]
 | 
				
			||||||
 | 
					use winit::platform::windows::{CornerPreference, WindowAttributesExtWindows as _};
 | 
				
			||||||
use winit::{
 | 
					use winit::{
 | 
				
			||||||
    application::ApplicationHandler,
 | 
					    application::ApplicationHandler,
 | 
				
			||||||
    dpi::LogicalSize,
 | 
					    dpi::LogicalSize,
 | 
				
			||||||
    event::{ElementState, Event, WindowEvent},
 | 
					    event::{ElementState, Event, WindowEvent},
 | 
				
			||||||
    event_loop::ActiveEventLoop,
 | 
					    event_loop::ActiveEventLoop,
 | 
				
			||||||
    keyboard::Key,
 | 
					    keyboard::Key,
 | 
				
			||||||
    platform::windows::{CornerPreference, WindowAttributesExtWindows},
 | 
					 | 
				
			||||||
    window::Window,
 | 
					    window::Window,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,8 +52,9 @@ impl AppWindow {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            let attributes = Window::default_attributes()
 | 
					            let attributes = Window::default_attributes()
 | 
				
			||||||
                .with_inner_size(size)
 | 
					                .with_inner_size(size)
 | 
				
			||||||
                .with_title("Shrooms VB")
 | 
					                .with_title("Shrooms VB");
 | 
				
			||||||
                .with_corner_preference(CornerPreference::DoNotRound);
 | 
					            #[cfg(target_os = "windows")]
 | 
				
			||||||
 | 
					            let attributes = attributes.with_corner_preference(CornerPreference::DoNotRound);
 | 
				
			||||||
            Arc::new(event_loop.create_window(attributes).unwrap())
 | 
					            Arc::new(event_loop.create_window(attributes).unwrap())
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue