Index: [thread] [date] [subject] [author]
  From: James A Simmons <jsimmons@acsu.buffalo.edu>
  To  : ggi-develop <ggi-develop@eskimo.com>
  Date: Mon, 7 Sep 1998 12:01:33 -0400 (EDT)

Oops heres the diffs.

--- generic.c.orig	Mon Sep  7 10:23:40 1998
+++ generic.c	Mon Sep  7 11:16:43 1998
@@ -19,13 +19,13 @@
 #define DRIVER_REV	"$Revision: 1.1 $"
 
 #include <kgi/module.h>
+#include <kgi/kgi.h>
 #include "generic.h"
 #include "default.h"
 
 /* Local variables */
 static struct kgi_monitor monitor              = DEF_MONITOR;
 static struct kgi_preset  timing[MAX_TIMINGS]  = DEF_TIMING;
-static kgi_montype        montype              = DEF_MONTYPE;;
 static int (*cur_check_mode)(struct kgi_display *, struct kgi_mode *,
 			     enum kgi_tm_cmd *);
 
@@ -558,14 +558,14 @@
 	update_params();
 	card->monitor = &monitor;
 
-	switch (montype) {
-	case montyp_monosync:
+	switch (monitor.montype) {
+	case MONOSYNC:
 		cur_check_mode = monosync_check_mode;
 		break;
-	case montyp_timelist:
+	case TIMELIST:
 		cur_check_mode = timelist_check_mode;
 		break;
-	case montyp_multisync:
+	case MULTISYNC:
 		cur_check_mode = multisync_check_mode;
 		break;
 	default:
@@ -590,6 +590,7 @@
 int
 kgim_monitor_command(struct kgi_graphic *state, ggi_uint cmd, ggi_uint arg)
 {
+#if 0
 	int i, result;
 	
 	switch(cmd) {
@@ -609,18 +610,18 @@
 		if (!suser()) {
 			return -EPERM;
 		}
-		if (arg == montype) return EOK;
+		if (arg == monitor->montype) return EOK;
 
 		switch (arg) {
-		case montyp_monosync:
+		case MONOSYNC:
 			cur_check_mode = monosync_check_mode;
 			memset(&timing, 0, sizeof(timing));
 			break;
-		case montyp_timelist:
+		case TIMELIST:
 			cur_check_mode = timelist_check_mode;
 			memset(&timing, 0, sizeof(timing));
 			break;
-		case montyp_multisync:
+		case MULTISYNC:
 			cur_check_mode = multisync_check_mode;
 			break;
 		default:
@@ -633,7 +634,7 @@
 		return montype;
 	}
 
-	if (montype == montyp_timelist) {
+	if (montype == TIMELIST) {
 		switch (cmd) {
 		case MONITOR_GETNUMPRESET:
 			return MAX_TIMINGS;
@@ -660,6 +661,7 @@
 			
 		}
 	}
+#endif
 	return -E(MONITOR, UNKNOWN);
 }






--- default.h.orig	Sun Sep  6 19:41:51 1998
+++ default.h	Mon Sep  7 11:10:30 1998
@@ -6,6 +6,7 @@
 	{ 1024, 768 },		/* Maximum resolution	*/ \
 	{  280, 180 },		/* Max. picture size	*/ \
 	VGA_COLOR,		/* VGA color monitor	*/ \
+        TIMELIST,               /* Standard VGA Monitor */ \
 	SYNC_NORMAL,		/* Normal syncing	*/ \
 	{ 25000000, 66000000 },	/* DCLK range		*/ \
 	{    31000,    48800 },	/* hfreq range		*/ \
@@ -38,14 +39,10 @@
 #define DEF_MONITOR { \
  "Samsung", "SyncMaster 15GL", GM_ALL, \
  FL_MON_POWERSAVE|FL_MON_PROPSIZE, { 1024, 768 }, { 260, 195 }, \
- VGA_COLOR, SYNC_SEPARATE|SYNC_COMPOSITE|SYNC_MULTISYNC, \
+ VGA_COLOR, MULTISYNC , SYNC_SEPARATE|SYNC_COMPOSITE|SYNC_MULTISYNC, \
  {0, 80000000}, {30000, 62000}, {50, 100} };
 #endif
 
 #ifndef DEF_TIMING
 #define DEF_TIMING { {0, } };
-#endif
-
-#ifndef DEF_MONTYPE
-#define DEF_MONTYPE montyp_multisync;
 #endif


 	
--- kgi.h.orig	Mon Sep  7 10:46:25 1998
+++ kgi.h	Mon Sep  7 10:59:59 1998
@@ -133,6 +133,8 @@
 
 #define	MONITORVERSION	02
 
+        enum    kgi_montype { MONOSYNC, TIMELIST, MULTISYNC };
+
 	enum	kgi_display_type
 	{
 		MONO_DISPLAY	= 0x00000000,	/* b&w or grayscale	*/
@@ -188,6 +190,7 @@
 
 		ggi_coord	size;		/* physical size in mm	*/
 	   enum kgi_display_type disptype;	/* display type		*/
+	   enum kgi_montype     montype;        /* monitor type         */
 	   enum kgi_sync	synctype;	/* type of syncing	*/
 		ggi_range	dclk;		/* bandwidth		*/
 		ggi_range	hfreq;		/* horizontal frequency	*/




Index: [thread] [date] [subject] [author]