changeset 7095:fad0147bd3aa

- add dxr3 equ patch from "Szombathelyi [iso-8859-2] Gy«Órgy" <gyurco@freemail.hu> - add cosmetic patch from uh ... don't know :)
author pontscho
date Tue, 27 Aug 2002 08:33:05 +0000
parents 208e6b23b038
children 6746866a94c6
files Gui/wm/wsxdnd.c libvo/vo_dxr3.c
diffstat 2 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/wm/wsxdnd.c	Tue Aug 27 08:12:58 2002 +0000
+++ b/Gui/wm/wsxdnd.c	Tue Aug 27 08:33:05 2002 +0000
@@ -5,6 +5,7 @@
 #include "ws.h"
 #include "wsxdnd.h"
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -158,7 +159,9 @@
       int offset = 0;
       Atom* ret_buff;
       Atom ret_type;
-      unsigned long ret_format,ret_items;
+      int ret_format;
+      unsigned long ret_items;
+
       /* while there is data left...*/
       while(ret_left){
 	XGetWindowProperty(wsDisplay,event->data.l[0],_XA_XdndTypeList,
--- a/libvo/vo_dxr3.c	Tue Aug 27 08:12:58 2002 +0000
+++ b/libvo/vo_dxr3.c	Tue Aug 27 08:33:05 2002 +0000
@@ -199,12 +199,13 @@
 		if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0)
 		    return VO_FALSE;
 		if (!strcasecmp(data, "brightness"))
-		    bcs.brightness = value;
+		    bcs.brightness = (value+100)*5;
 		else if (!strcasecmp(data, "contrast"))
-		    bcs.contrast = value;
+		    bcs.contrast = (value+100)*5;
 		else if (!strcasecmp(data, "saturation"))
-		    bcs.saturation = value;
-		
+		    bcs.saturation = (value+100)*5;
+		else return VO_FALSE;
+        
 		if (ioctl(fd_control, EM8300_IOCTL_SETBCS, &bcs) < 0)
 		    return VO_FALSE;
 		return VO_TRUE;
@@ -223,11 +224,13 @@
 		    return VO_FALSE;
 		
 		if (!strcasecmp(data, "brightness"))
-		    *value = bcs.brightness;
+		    *value = (bcs.brightness/5)-100;
 		else if (!strcasecmp(data, "contrast"))
-		    *value = bcs.contrast;
+		    *value = (bcs.contrast/5)-100;
 		else if (!strcasecmp(data, "saturation"))
-		    *value = bcs.saturation;
+		    *value = (bcs.saturation/5)-100;
+		else return VO_FALSE;
+        
 		return VO_TRUE;
 	    }
 	}