]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/EmuGopDxe/GopScreen.c
ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob
[mirror_edk2.git] / EmulatorPkg / EmuGopDxe / GopScreen.c
index 7f4333d1693a49e0710c4d8b2ef0d643dfd2f991..aa21fa68def6c043d6316970ba965b22834330be 100644 (file)
@@ -1,6 +1,6 @@
 /*++ @file
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
 Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -88,7 +88,7 @@ EmuGopQuerytMode (
 
 
 /**
-  Set the video device into the specified mode and clears the visible portions of 
+  Set the video device into the specified mode and clears the visible portions of
   the output display to black.
 
   @param  This              The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
@@ -137,8 +137,8 @@ EmuGopSetMode (
 
     Private->HardwareNeedsStarting = FALSE;
   }
-  
-  
+
+
   Status = Private->EmuGraphicsWindow->Size(
                             Private->EmuGraphicsWindow,
                             ModeData->HorizontalResolution,
@@ -168,7 +168,7 @@ EmuGopSetMode (
 
 /**
   Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer.
-  
+
   @param  This         Protocol instance pointer.
   @param  BltBuffer    Buffer containing data to blit into video buffer. This
                        buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
@@ -208,7 +208,7 @@ EmuGopBlt (
 
   Private = GOP_PRIVATE_DATA_FROM_THIS (This);
 
-  if ((BltOperation < 0) || (BltOperation >= EfiGraphicsOutputBltOperationMax)) {
+  if ((UINT32)BltOperation >= EfiGraphicsOutputBltOperationMax) {
     return EFI_INVALID_PARAMETER;
   }
 
@@ -302,12 +302,12 @@ EmuGopStartWindow (
   Status = Private->EmuIoThunk->Open (Private->EmuIoThunk);
   if (!EFI_ERROR (Status)) {
     Private->EmuGraphicsWindow = Private->EmuIoThunk->Interface;
-    
+
     // Register callback to support RegisterKeyNotify()
     Status  = Private->EmuGraphicsWindow->RegisterKeyNotify (
-                                            Private->EmuGraphicsWindow, 
-                                            GopPrivateMakeCallbackFunction, 
-                                            GopPrivateBreakCallbackFunction, 
+                                            Private->EmuGraphicsWindow,
+                                            GopPrivateMakeCallbackFunction,
+                                            GopPrivateBreakCallbackFunction,
                                             Private
                                             );
     ASSERT_EFI_ERROR (Status);
@@ -368,11 +368,8 @@ EmuGopDestructor (
   GOP_PRIVATE_DATA     *Private
   )
 {
-  EFI_STATUS  Status;
-  
-  Status = EFI_SUCCESS;
   if (!Private->HardwareNeedsStarting) {
-    Status = Private->EmuIoThunk->Close (Private->EmuIoThunk);
+    Private->EmuIoThunk->Close (Private->EmuIoThunk);
     Private->EmuGraphicsWindow = NULL;
   }
 
@@ -414,7 +411,6 @@ Returns:
 
 **/
 {
-  EFI_STATUS  Status;
-  Status = EmuGopDestructor (Context);
+  EmuGopDestructor (Context);
 }