Changeset 37165 in vbox for trunk/src/VBox
- Timestamp:
- May 20, 2011 1:22:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPVidModes.cpp
r37127 r37165 869 869 { 870 870 VBoxFillVidModeInfo(&g_CustomVideoModes[VidPnTargetId], xres, yres, bpp, 1/*index*/, 0); 871 Assert(g_CustomVideoModes[VidPnTargetId].ModeIndex == 1); 871 872 } 872 873 } … … 875 876 if (g_CustomVideoModes[VidPnTargetId].ModeIndex) 876 877 { 877 if (RT_ELEMENTS(pModes->aModes) ==pModes->cModes)878 if (RT_ELEMENTS(pModes->aModes) > pModes->cModes) 878 879 { 879 880 g_CustomVideoModes[VidPnTargetId].ModeIndex = pModes->cModes; … … 903 904 { 904 905 WARN(("table full, can't add other bpp for specail mode!")); 906 #ifdef DEBUG_misha 907 /* this is definitely something we do not expect */ 908 AssertFailed(); 909 #endif 905 910 break; 906 911 } 912 913 AssertRelease(RT_ELEMENTS(pModes->aModes) > pModes->cModes); /* if not - the driver state is screwed up, @todo: better do KeBugCheckEx here */ 907 914 908 915 if (pModes->aModes[pModes->iPreferredMode].BitsPerPlane != bpp) … … 912 919 pModes->aModes[pModes->iPreferredMode].VisScreenHeight, 913 920 bpp, pModes->cModes, 0); 914 if ( !VBoxMPFindVideoMode(pModes->aModes, pModes->cModes, &pModes->aModes[pModes->cModes]))921 if (VBoxMPFindVideoMode(pModes->aModes, pModes->cModes, &pModes->aModes[pModes->cModes]) < 0) 915 922 { 916 923 ++pModes->cModes; … … 921 928 else 922 929 { 930 AssertRelease(RT_ELEMENTS(pModes->aModes) == pModes->cModes); /* if not - the driver state is screwed up, @todo: better do KeBugCheckEx here */ 923 931 WARN(("table full, can't add video mode for a host request!")); 932 #ifdef DEBUG_misha 933 /* this is definitely something we do not expect */ 934 AssertFailed(); 935 #endif 924 936 } 925 937 } … … 931 943 { 932 944 WARN(("table full, can't add addl modes!")); 945 #ifdef DEBUG_misha 946 /* this is definitely something we do not expect */ 947 AssertFailed(); 948 #endif 933 949 break; 934 950 } 951 952 AssertRelease(RT_ELEMENTS(pModes->aModes) > pModes->cModes); /* if not - the driver state is screwed up, @todo: better do KeBugCheckEx here */ 935 953 936 954 if (!pExt->fAnyX)
Note:
See TracChangeset
for help on using the changeset viewer.