@@ -10,6 +10,7 @@ use wasmer_wasi::{
10
10
WasiInodes ,
11
11
} ;
12
12
use wasmer_wasi:: { Fd , VirtualFile , WasiFs , WasiFsError , ALL_RIGHTS , VIRTUAL_ROOT_FD } ;
13
+ use wasmer_wasi_types:: wasi:: { Fdflags } ;
13
14
14
15
use minifb:: { Key , KeyRepeat , MouseButton , Scale , Window , WindowOptions } ;
15
16
@@ -96,7 +97,7 @@ impl FrameBufferState {
96
97
return None ;
97
98
}
98
99
self . x_size = x;
99
- self . y_size = x ;
100
+ self . y_size = y ;
100
101
101
102
self . data_1 . resize ( ( x * y) as usize , 0 ) ;
102
103
self . data_2 . resize ( ( x * y) as usize , 0 ) ;
@@ -126,7 +127,7 @@ impl FrameBufferState {
126
127
self . push_input_event ( InputEvent :: KeyRelease ( key) ) ?;
127
128
}
128
129
}
129
- let keys = self . window . get_keys_pressed ( KeyRepeat :: No ) ? ;
130
+ let keys = self . window . get_keys_pressed ( KeyRepeat :: No ) ;
130
131
for key in keys {
131
132
self . keys_pressed . insert ( key) ;
132
133
self . push_input_event ( InputEvent :: KeyPress ( key) ) ?;
@@ -456,7 +457,7 @@ pub fn initialize(inodes: &mut WasiInodes, fs: &mut WasiFs) -> Result<(), String
456
457
"_wasmer/dev/fb0" . to_string ( ) ,
457
458
ALL_RIGHTS ,
458
459
ALL_RIGHTS ,
459
- 0 ,
460
+ Fdflags :: empty ( ) ,
460
461
)
461
462
. map_err ( |e| format ! ( "fb: Failed to create dev folder {:?}" , e) ) ?
462
463
} ;
@@ -470,7 +471,7 @@ pub fn initialize(inodes: &mut WasiInodes, fs: &mut WasiFs) -> Result<(), String
470
471
"input" . to_string ( ) ,
471
472
ALL_RIGHTS ,
472
473
ALL_RIGHTS ,
473
- 0 ,
474
+ Fdflags :: empty ( ) ,
474
475
)
475
476
. map_err ( |e| format ! ( "fb: Failed to init framebuffer {:?}" , e) ) ?;
476
477
@@ -485,7 +486,7 @@ pub fn initialize(inodes: &mut WasiInodes, fs: &mut WasiFs) -> Result<(), String
485
486
"fb" . to_string ( ) ,
486
487
ALL_RIGHTS ,
487
488
ALL_RIGHTS ,
488
- 0 ,
489
+ Fdflags :: empty ( ) ,
489
490
)
490
491
. map_err ( |e| format ! ( "fb: Failed to init framebuffer {:?}" , e) ) ?;
491
492
@@ -500,7 +501,7 @@ pub fn initialize(inodes: &mut WasiInodes, fs: &mut WasiFs) -> Result<(), String
500
501
"virtual_size" . to_string ( ) ,
501
502
ALL_RIGHTS ,
502
503
ALL_RIGHTS ,
503
- 0 ,
504
+ Fdflags :: empty ( ) ,
504
505
)
505
506
. map_err ( |e| format ! ( "fb_resolution: Failed to init framebuffer {:?}" , e) ) ?;
506
507
@@ -515,7 +516,7 @@ pub fn initialize(inodes: &mut WasiInodes, fs: &mut WasiFs) -> Result<(), String
515
516
"draw" . to_string ( ) ,
516
517
ALL_RIGHTS ,
517
518
ALL_RIGHTS ,
518
- 0 ,
519
+ Fdflags :: empty ( ) ,
519
520
)
520
521
. map_err ( |e| format ! ( "fb_index_display: Failed to init framebuffer {:?}" , e) ) ?;
521
522
0 commit comments