@@ -163,11 +163,11 @@ impl crate::fake::SyscallDriver for Screen {
163163 }
164164
165165 GET_RESOLUTION_WIDTH_HEIGHT => {
166- self . share_ref
167- . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
168- . expect ( "Unable to schedule upcall {}" ) ;
169166 if argument0 < self . screen_resolution_width_height . len ( ) as u32 {
170167 if Option :: is_some ( & self . screen_setup ) {
168+ self . share_ref
169+ . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
170+ . expect ( "Unable to schedule upcall {}" ) ;
171171 crate :: command_return:: success_2_u32 (
172172 self . screen_resolution_width_height [ argument0 as usize ]
173173 . unwrap ( )
@@ -193,11 +193,11 @@ impl crate::fake::SyscallDriver for Screen {
193193 }
194194
195195 PIXEL_FORMAT => {
196- self . share_ref
197- . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
198- . expect ( "Unable to schedule upcall {}" ) ;
199196 if argument0 < self . screen_pixel_format . len ( ) as u32 {
200197 if Option :: is_some ( & self . screen_setup ) {
198+ self . share_ref
199+ . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
200+ . expect ( "Unable to schedule upcall {}" ) ;
201201 crate :: command_return:: success_u32 (
202202 self . screen_pixel_format [ argument0 as usize ] as u32 ,
203203 )
@@ -217,13 +217,13 @@ impl crate::fake::SyscallDriver for Screen {
217217 }
218218
219219 SET_ROTATION => {
220- self . share_ref
221- . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
222- . expect ( "Unable to schedule upcall {}" ) ;
223220 if argument0 > 359 {
224221 command_return:: failure ( ErrorCode :: Invalid )
225222 } else {
226223 self . rotation . set ( argument0 as u16 ) ;
224+ self . share_ref
225+ . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
226+ . expect ( "Unable to schedule upcall {}" ) ;
227227 command_return:: success ( )
228228 }
229229 }
@@ -245,11 +245,11 @@ impl crate::fake::SyscallDriver for Screen {
245245 GET_PIXEL_FORMAT => command_return:: success_u32 ( self . pixel_format . get ( ) ) ,
246246
247247 SET_PIXEL_FORMAT => {
248- self . share_ref
249- . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
250- . expect ( "Unable to schedule upcall {}" ) ;
251248 if argument0 < self . pixel_modes . unwrap ( ) as u32 {
252249 self . pixel_format . set ( argument0) ;
250+ self . share_ref
251+ . schedule_upcall ( 0 , ( 0 , 0 , 0 ) )
252+ . expect ( "Unable to schedule upcall {}" ) ;
253253 command_return:: success ( )
254254 } else {
255255 command_return:: failure ( ErrorCode :: Invalid )
0 commit comments