libeg/screen.c
static VOID egDetermineScreenSize(VOID) {
    EFI_STATUS Status = EFI_SUCCESS;
    UINT32 UGAWidth, UGAHeight, UGADepth, UGARefreshRate;

    // get screen size
    egHasGraphics = FALSE;
    if (GraphicsOutput != NULL) {
        egScreenWidth = GraphicsOutput->Mode->Info->HorizontalResolution;
        egScreenHeight = GraphicsOutput->Mode->Info->VerticalResolution;
        egHasGraphics = TRUE;
    } else if (UgaDraw != NULL) {
        Status = refit_call5_wrapper(UgaDraw->GetMode, UgaDraw, &UGAWidth, &UGAHeight, &UGADepth, &UGARefreshRate);
        if (EFI_ERROR(Status)) {
            UgaDraw = NULL; // graphics not available
        } else {
            egScreenWidth = UGAWidth;
            egScreenHeight = UGAHeight;
            egHasGraphics = TRUE;
        }
    }
}
// Make the necessary system calls to identify the current graphics mode.
// Stores the results in the file-global variables egScreenWidth,
// egScreenHeight, and egHasGraphics. The first two of these will be
// unchanged if neither GraphicsOutput nor UgaDraw is a valid pointer.
Make the necessary system calls to identify the current graphics mode.
Stores the results in the file-global variables egScreenWidth,
egScreenHeight, and egHasGraphics. The first two of these will be
unchanged if neither GraphicsOutput nor UgaDraw is a valid pointer.
Make the necessary system calls to identify the current graphics mode . Stores the results in the file - global variables egScreenWidth egScreenHeight and egHasGraphics . The first two of these will be unchanged if neither GraphicsOutput nor UgaDraw is a valid pointer .
static VOID egDetermineScreenSize(VOID) {
    EFI_STATUS Status = EFI_SUCCESS;
    UINT32 UGAWidth, UGAHeight, UGADepth, UGARefreshRate;
    egHasGraphics = FALSE;
    if (GraphicsOutput != NULL) {
        egScreenWidth = GraphicsOutput->Mode->Info->HorizontalResolution;
        egScreenHeight = GraphicsOutput->Mode->Info->VerticalResolution;
        egHasGraphics = TRUE;
    } else if (UgaDraw != NULL) {
        Status = refit_call5_wrapper(UgaDraw->GetMode, UgaDraw, &UGAWidth, &UGAHeight, &UGADepth, &UGARefreshRate);
        if (EFI_ERROR(Status)) {
            UgaDraw = NULL; 
        } else {
            egScreenWidth = UGAWidth;
            egScreenHeight = UGAHeight;
            egHasGraphics = TRUE;
        }
    }
}
static VOID egDetermineScreenSize ( VOID ) { EFI_STATUS Status = EFI_SUCCESS ; UINT32 UGAWidth , UGAHeight , UGADepth , UGARefreshRate ; egHasGraphics = FALSE ; if ( GraphicsOutput != NULL ) { egScreenWidth = GraphicsOutput -> Mode -> Info -> HorizontalResolution ; egScreenHeight = GraphicsOutput -> Mode -> Info -> VerticalResolution ; egHasGraphics = TRUE ; } else if ( UgaDraw != NULL ) { Status = refit_call5_wrapper ( UgaDraw -> GetMode , UgaDraw , & UGAWidth , & UGAHeight , & UGADepth , & UGARefreshRate ) ; if ( EFI_ERROR ( Status ) ) { UgaDraw = NULL ; } else { egScreenWidth = UGAWidth ; egScreenHeight = UGAHeight ; egHasGraphics = TRUE ; } } }
Make the necessary system calls to identify the current graphics mode.
Make the necessary system calls to identify the current graphics mode .
// get screen size // graphics not available