updated on Fri Jan 20 20:16:25 UTC 2012
[aur-mirror.git] / acpi-eee1000 / acpi-eee1000_asusosd-1.patch
bloba7a0c7ab2d34203e56adb1397f5b54bf11790680
1 --- src/asus_osd/asusosd_orig.c 2009-01-08 17:15:59.000000000 -0500
2 +++ src/asus_osd/asusosd.c 2009-01-08 17:19:06.000000000 -0500
3 @@ -165,12 +165,12 @@
5 if(data == IMG_AUDIO_MUTE)
7 - sprintf(cmd, "%s off", VOLUME_CONTROL);
8 - system(cmd);
9 - }
10 - else if(data == IMG_AUDIO_ON)
11 + if(getvol(1) == 0) //off
13 sprintf(cmd, "%s on", VOLUME_CONTROL);
14 + }
15 + else
16 + sprintf(cmd, "%s off", VOLUME_CONTROL);
17 system(cmd);
20 @@ -304,18 +304,6 @@
21 hotkey = atoi(data);
22 switch(hotkey)
24 - case 13:printf("@@ audio mute %d\n", hotkey);
25 - //audio mute
26 - if(getvol(1)) //get volume status: 1=on 0=off
27 - {
28 - hotkey = 16;
29 - printf("Volume on\n");
30 - }else{
31 - hotkey = 13;
32 - printf("Volume off\n");
33 - }
34 - printf("@@ audio mute %d\n", hotkey);
35 - break;
36 case 14: //volume down
37 case 15: //volume up
38 getvol(0);
39 @@ -346,9 +334,12 @@
40 else if ((img_data&IMAGE_MASK) == IMG_DISP_LCD_CRT)
41 sprintf(filename, "%s", "/usr/share/asus_osd/crt_lcd.png");
42 else if ((img_data&IMAGE_MASK) == IMG_AUDIO_MUTE)
43 - sprintf(filename, "%s", "/usr/share/asus_osd/VolumeMute.png");
44 - else if ((img_data&IMAGE_MASK) == IMG_AUDIO_ON)
45 + {
46 + if(getvol(1) == 0) //off
47 sprintf(filename, "%s", "/usr/share/asus_osd/VolumeOn.png");
48 + else
49 + sprintf(filename, "%s", "/usr/share/asus_osd/VolumeMute.png");
50 + }
51 else if ((img_data&IMAGE_MASK) == IMG_BRN_DN)
52 sprintf(filename, "%s%d%s", "/usr/share/asus_osd/BrightnessDown",val,".png");
53 else if ((img_data&IMAGE_MASK) == IMG_BRN_UP)