home *** CD-ROM | disk | FTP | other *** search
- /* vhardwar.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */
-
- #include <stdlib.h>
- #include <dos.h>
- #define INCL_VIO
- #include <os2emx.h>
- #include <sys/video.h>
- #include "video2.h"
-
- int v_hardware (void)
- {
- static VIOMODEINFO info;
-
- if (_osmode == OS2_MODE)
- {
- info.cb = sizeof (info);
- VioGetMode (&info, 0);
- if (!(info.fbType & VGMT_OTHER))
- return (V_MONOCHROME);
- if (info.vres / info.row < 10)
- return (V_COLOR_8);
- else
- return (V_COLOR_12);
- }
- else
- {
- union REGS r;
-
- _int86 (0x11, &r, &r);
- if ((r.h.al & 0x30) == 0x30)
- return (V_MONOCHROME);
- else
- return (V_COLOR_8);
- }
- }
-