USHORT ModeIndex = 0; 
if(!(VBFlags2 & VB2_SISVGA2BRIDGE)) return 0; 
SiS_GetModeID_VGA2(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth){   USHORT ModeIndex = 0;   if(!(VBFlags & (VB_301|VB_301B|VB_301C|VB_302B))) return 0;   switch(HDisplay)   {	case 320:     	  	if(VDisplay == 200)      ModeIndex = ModeIndex_320x200[Depth];	  	else if(VDisplay == 240) ModeIndex = ModeIndex_320x240[Depth];          	break;     	case 400:          	if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];          	break;  	case 512:		if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];		break;	case 640:		if(VDisplay == 480)      ModeIndex = ModeIndex_640x480[Depth];		else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];		break;	case 720:		if(VDisplay == 480)      ModeIndex = ModeIndex_720x480[Depth];		else if(VDisplay == 576) ModeIndex = ModeIndex_720x576[Depth];		break;	case 768:          	if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];	  	break;	case 800:		if(VDisplay == 600)      ModeIndex = ModeIndex_800x600[Depth];   	        else if(VDisplay == 480) ModeIndex = ModeIndex_800x480[Depth];		break;	case 848:		if(VDisplay == 480) ModeIndex = ModeIndex_848x480[Depth];		break;	case 856:		if(VDisplay == 480) ModeIndex = ModeIndex_856x480[Depth];		break;	case 960:		if(VGAEngine == SIS_315_VGA) {		   if(VDisplay == 540)      ModeIndex = ModeIndex_960x540[Depth];		   else if(VDisplay == 600) ModeIndex = ModeIndex_960x600[Depth];		}		break;	case 1024:		if(VDisplay == 768)      ModeIndex = ModeIndex_1024x768[Depth];		else if(VDisplay == 576) ModeIndex = ModeIndex_1024x576[Depth];		break;	case 1152:	        if(VDisplay == 864)    ModeIndex = ModeIndex_1152x864[Depth];		else if(VGAEngine == SIS_300_VGA) {		   if(VDisplay == 768) ModeIndex = ModeIndex_1152x768[Depth];		}		break;	case 1280:	        if(VDisplay == 768) {		   if(VGAEngine == SIS_300_VGA) {		      ModeIndex = ModeIndex_300_1280x768[Depth];		   } else {		      ModeIndex = ModeIndex_310_1280x768[Depth];		   }		} else if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];		else if(VDisplay == 720)    ModeIndex = ModeIndex_1280x720[Depth];		else if(VDisplay == 800)    ModeIndex = ModeIndex_1280x800[Depth];		else if(VDisplay == 960)    ModeIndex = ModeIndex_1280x960[Depth];		break;        case 1360:	        if(VDisplay == 768) ModeIndex = ModeIndex_1360x768[Depth];                break;        case 1400:		if(VGAEngine == SIS_315_VGA) {	           if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];		}		break;	case 1600:		if(VGAEngine == SIS_315_VGA) {		   if(VBFlags & (VB_301B|VB_301C|VB_302B)) {	              if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];		   }		}		break;	case 1680:		if(VGAEngine == SIS_315_VGA) {		   if(VBFlags & (VB_301B|VB_301C|VB_302B)) {	              if(VDisplay == 1050) ModeIndex = ModeIndex_1680x1050[Depth];		   }		}		break;   }   return ModeIndex;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/544393fe584d333480659a4bed30f5295355df11/init.c/clean/drivers/video/sis/init.c