/* Returns information for an available graphics mode that the graphics device and the set of active video output devices supports. */
EFI_STATUS EFIAPI EmuGopQuerytMode(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber, OUT UINTN *SizeOfInfo, OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info)
/* Returns information for an available graphics mode that the graphics device and the set of active video output devices supports. */
EFI_STATUS EFIAPI EmuGopQuerytMode(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber, OUT UINTN *SizeOfInfo, OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info)
{
  GOP_PRIVATE_DATA  *Private;
  Private = GOP_PRIVATE_DATA_FROM_THIS (This);
  if ((Info == NULL) || (SizeOfInfo == NULL) || ((UINTN)ModeNumber >= This->Mode->MaxMode)) {
    return EFI_INVALID_PARAMETER;
  }
  *Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
  if (*Info == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
  (*Info)->Version              = 0;
  (*Info)->HorizontalResolution = Private->ModeData[ModeNumber].HorizontalResolution;
  (*Info)->VerticalResolution   = Private->ModeData[ModeNumber].VerticalResolution;
  (*Info)->PixelFormat          = PixelBltOnly;
  (*Info)->PixelsPerScanLine    = (*Info)->HorizontalResolution;
  return EFI_SUCCESS;
}