Changeset 44844 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 27, 2013 1:30:51 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83988
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r44528 r44844 3717 3717 3718 3718 default: 3719 AssertMsgFailed(("Unsupported bitmap header.\n")); 3719 AssertLogRelMsgFailedReturn(("Unsupported bitmap header size %u.\n", pWinHdr->Size), 3720 VERR_INVALID_PARAMETER); 3720 3721 break; 3721 3722 } 3722 3723 3723 if (pThis->cxLogo > LOGO_MAX_WIDTH || pThis->cyLogo > LOGO_MAX_HEIGHT) 3724 { 3725 AssertMsgFailed(("Bitmap %ux%u is too big.\n", pThis->cxLogo, pThis->cyLogo)); 3726 return VERR_INVALID_PARAMETER; 3727 } 3728 3729 if (pThis->cLogoPlanes != 1) 3730 { 3731 AssertMsgFailed(("Bitmap planes %u != 1.\n", pThis->cLogoPlanes)); 3732 return VERR_INVALID_PARAMETER; 3733 } 3734 3735 if (pThis->cLogoBits != 4 && pThis->cLogoBits != 8 && pThis->cLogoBits != 24) 3736 { 3737 AssertMsgFailed(("Unsupported %u depth.\n", pThis->cLogoBits)); 3738 return VERR_INVALID_PARAMETER; 3739 } 3740 3741 if (pThis->cLogoUsedColors > 256) 3742 { 3743 AssertMsgFailed(("Unsupported %u colors.\n", pThis->cLogoUsedColors)); 3744 return VERR_INVALID_PARAMETER; 3745 } 3746 3747 if (pThis->LogoCompression != BMP_COMPRESS_NONE) 3748 { 3749 AssertMsgFailed(("Unsupported %u compression.\n", pThis->LogoCompression)); 3750 return VERR_INVALID_PARAMETER; 3751 } 3724 AssertLogRelMsgReturn(pThis->cxLogo <= LOGO_MAX_WIDTH && pThis->cyLogo <= LOGO_MAX_HEIGHT, 3725 ("Bitmap %ux%u is too big.\n", pThis->cxLogo, pThis->cyLogo), 3726 VERR_INVALID_PARAMETER); 3727 3728 AssertLogRelMsgReturn(pThis->cLogoPlanes == 1, 3729 ("Bitmap planes %u != 1.\n", pThis->cLogoPlanes), 3730 VERR_INVALID_PARAMETER); 3731 3732 AssertLogRelMsgReturn(pThis->cLogoBits == 4 || pThis->cLogoBits == 8 || pThis->cLogoBits == 24, 3733 ("Unsupported %u depth.\n", pThis->cLogoBits), 3734 VERR_INVALID_PARAMETER); 3735 3736 AssertLogRelMsgReturn(pThis->cLogoUsedColors <= 256, 3737 ("Unsupported %u colors.\n", pThis->cLogoUsedColors), 3738 VERR_INVALID_PARAMETER); 3739 3740 AssertLogRelMsgReturn(pThis->LogoCompression == BMP_COMPRESS_NONE, 3741 ("Unsupported %u compression.\n", pThis->LogoCompression), 3742 VERR_INVALID_PARAMETER); 3752 3743 3753 3744 /* … … 6571 6562 * Write the logo bitmap. 6572 6563 */ 6564 rc = VINF_SUCCESS; 6573 6565 if (pThis->pszLogoFile) 6566 rc = RTFileRead(FileLogo, pLogoHdr + 1, LogoHdr.cbLogo, NULL); 6567 6568 if (RT_SUCCESS(rc)) 6569 rc = vbeParseBitmap(pThis); 6570 6571 if ( RT_FAILURE(rc) 6572 && pThis->pszLogoFile) 6574 6573 { 6575 rc = RTFileRead(FileLogo, pLogoHdr + 1, LogoHdr.cbLogo, NULL); 6576 if (RT_FAILURE(rc)) 6577 { 6578 AssertMsgFailed(("RTFileRead(,,%d,NULL) -> %Rrc\n", LogoHdr.cbLogo, rc)); 6579 pLogoHdr->cbLogo = LogoHdr.cbLogo = g_cbVgaDefBiosLogo; 6580 memcpy(pLogoHdr + 1, g_abVgaDefBiosLogo, LogoHdr.cbLogo); 6581 } 6582 } 6583 else 6584 memcpy(pLogoHdr + 1, g_abVgaDefBiosLogo, LogoHdr.cbLogo); 6585 6586 rc = vbeParseBitmap(pThis); 6587 if (RT_FAILURE(rc)) 6588 { 6589 AssertMsgFailed(("vbeParseBitmap() -> %Rrc\n", rc)); 6574 LogRel(("Error %Rrc reading logo file '%s', using internal logo\n", 6575 rc, pThis->pszLogoFile)); 6590 6576 pLogoHdr->cbLogo = LogoHdr.cbLogo = g_cbVgaDefBiosLogo; 6591 6577 memcpy(pLogoHdr + 1, g_abVgaDefBiosLogo, LogoHdr.cbLogo); 6592 }6593 6594 rc = vbeParseBitmap(pThis); 6578 rc = vbeParseBitmap(pThis); 6579 } 6580 6595 6581 if (RT_FAILURE(rc)) 6596 AssertReleaseMsgFailed((" Internal bitmap failed! vbeParseBitmap() -> %Rrc\n", rc));6582 AssertReleaseMsgFailed(("Parsing of internal bitmap failed! vbeParseBitmap() -> %Rrc\n", rc)); 6597 6583 6598 6584 rc = VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.