@@ -17,9 +17,9 @@ use std::time::{Duration, Instant};
17
17
use url:: Url ;
18
18
use winit:: dpi:: { LogicalSize , PhysicalPosition , PhysicalSize , Size } ;
19
19
use winit:: event:: { ElementState , KeyEvent , Modifiers , WindowEvent } ;
20
- use winit:: event_loop:: { ControlFlow , EventLoop , EventLoopBuilder } ;
20
+ use winit:: event_loop:: { ActiveEventLoop , ControlFlow , EventLoop } ;
21
21
use winit:: keyboard:: { Key , NamedKey } ;
22
- use winit:: window:: { Fullscreen , Icon , Window , WindowBuilder } ;
22
+ use winit:: window:: { Fullscreen , Icon , Window , WindowAttributes } ;
23
23
24
24
pub struct App {
25
25
preferences : GlobalPreferences ,
@@ -43,7 +43,7 @@ impl App {
43
43
let icon =
44
44
Icon :: from_rgba ( icon_bytes. to_vec ( ) , 32 , 32 ) . context ( "Couldn't load app icon" ) ?;
45
45
46
- let event_loop = EventLoopBuilder :: with_user_event ( ) . build ( ) ?;
46
+ let event_loop = EventLoop :: with_user_event ( ) . build ( ) ?;
47
47
48
48
let no_gui = preferences. cli . no_gui ;
49
49
let min_window_size = ( 16 , if no_gui { 16 } else { MENU_HEIGHT + 16 } ) . into ( ) ;
@@ -52,13 +52,14 @@ impl App {
52
52
let preferred_height = preferences. cli . height ;
53
53
let start_fullscreen = preferences. cli . fullscreen ;
54
54
55
- let window = WindowBuilder :: new ( )
55
+ let window_attributes = WindowAttributes :: default ( )
56
56
. with_visible ( false )
57
57
. with_title ( "Ruffle" )
58
58
. with_window_icon ( Some ( icon) )
59
59
. with_min_inner_size ( min_window_size)
60
- . with_max_inner_size ( max_window_size)
61
- . build ( & event_loop) ?;
60
+ . with_max_inner_size ( max_window_size) ;
61
+
62
+ let window = event_loop. create_window ( window_attributes) ?;
62
63
let window = Arc :: new ( window) ;
63
64
64
65
let mut font_database = fontdb:: Database :: default ( ) ;
0 commit comments