/* vhardwar.c (emx+gcc) -- Copyright (c) 1987-1995 by Eberhard Mattes */

#include <stdlib.h>
#include <sys/video.h>
#include "video2.h"
#include "video3.h"

#if defined (IF_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif

int v_hardware (void)
{
#if defined (IF_WIN32)
  IF_WIN32
    {
      return V_COLOR_8;
    }
#endif
#if defined (IF_DOS)
  IF_DOS
    {
      union REGS r;

      _int86 (0x11, &r, &r);
      if ((r.h.al & 0x30) == 0x30)
	return V_MONOCHROME;
      else
	return V_COLOR_8;
    }
#endif
}
