X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fmain.rs;h=256cc3cef0effcd7bde40624535a67ece479b90f;hb=77034de98f1182979c74c6ccc81944ef74db35b4;hp=877d367becfe2520751991f789e777eb2ba22fa3;hpb=0b5024d131d93cf4073479cd31506be826c1a4b2;p=kaka%2Frust-sdl-test.git diff --git a/src/main.rs b/src/main.rs index 877d367..256cc3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,14 +10,14 @@ mod common; mod boll; mod sprites; -const SCREEN_WIDTH: u32 = 1280; -const SCREEN_HEIGHT: u32 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u32; +const SCREEN_WIDTH: u16 = 1280; +const SCREEN_HEIGHT: u16 = (SCREEN_WIDTH as f64 * (1440.0 / 2560.0)) as u16; fn main() { println!("starting..."); let mut app = App::new() - .with_resolution(SCREEN_WIDTH as u16, SCREEN_HEIGHT as u16) - .with_state(Box::new(ActiveState::new())) + .with_resolution(SCREEN_WIDTH, SCREEN_HEIGHT) + .with_state(Box::new(ActiveState::new((SCREEN_WIDTH as u32, SCREEN_HEIGHT as u32)))) .with_title("SDL test") .build() .unwrap();