Detecting Colour and Monochrome Monitors: Difference between revisions

m
Standardised code to C99.
[unchecked revision][unchecked revision]
m (Fixed syntax, formatted page.)
m (Standardised code to C99.)
Line 4:
<pre>
/*
videoVideo card mono/colour detection by Dark Fiber.
returnsReturn 0=mono,values: 1 false=colourmono
true=colour
*/
int_Bool detect_video_typedetectVideoType(void)
{
int_Bool rctype;
char c=(*(volatile USHORT*)0x410)&0x30;
 
//c can be 0x00 or 0x20 for colour, 0x30 for mono.
if(c==0x30){
rc=0return(true); //Monochrome monitor.
} else {
rc=1return(false); //Colour monitor.
}
return rc;
}
</pre>
Anonymous user