78 lines
2.6 KiB
Text
78 lines
2.6 KiB
Text
$NetBSD: patch-ad,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $
|
|
|
|
--- radio_file_info.c.orig Sun Jan 6 02:36:53 2002
|
|
+++ radio_file_info.c Sun Jan 6 02:38:25 2002
|
|
@@ -163,7 +163,7 @@
|
|
tuned = ((v.signal != 0) ? TRUE : FALSE);
|
|
close(radio_fd);
|
|
radio_fd = -2;
|
|
-#elif defined __OpenBSD__
|
|
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
|
ri.freq = freq;
|
|
ri.volume = volume * (255 / (FMR_VOL_MAX - FMR_VOL_MIN));
|
|
ri.mute = is_paused ? 1 : 0;
|
|
@@ -171,7 +171,7 @@
|
|
usleep(50000);
|
|
SetGetRadioInfo(GET_INFO);
|
|
tuned = ri.info ? TRUE : FALSE;
|
|
-#endif /* linux || __OpenBSD__ */
|
|
+#endif /* linux || __OpenBSD__ || __NetBSD__ */
|
|
}
|
|
|
|
static void scan_cb(GtkWidget * sb, gpointer data){
|
|
@@ -205,12 +205,12 @@
|
|
va.flags = VIDEO_AUDIO_VOLUME|(is_paused ? VIDEO_AUDIO_MUTE : 0);
|
|
ioctl (radio_fd, VIDIOCSFREQ, &xl_freq);
|
|
ioctl (radio_fd, VIDIOCSAUDIO, &va);
|
|
-#elif defined __OpenBSD__
|
|
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
|
ri.freq = fr;
|
|
ri.volume = volume * (255/(FMR_VOL_MAX-FMR_VOL_MIN));
|
|
ri.mute = is_paused ? 1 : 0;
|
|
SetGetRadioInfo(SET_INFO);
|
|
-#endif /* linux || __OpenBSD__ */
|
|
+#endif /* linux || __OpenBSD__ || __NetBSD__ */
|
|
|
|
for(i=0;(i<tries)&&(tuned);i++){
|
|
usleep (10000);
|
|
@@ -218,10 +218,10 @@
|
|
v.tuner = 0;
|
|
ioctl (radio_fd, VIDIOCGTUNER, &v);
|
|
tuned = ((v.signal != 0) ? TRUE : FALSE);
|
|
-#elif defined __OpenBSD__
|
|
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
|
SetGetRadioInfo(GET_INFO);
|
|
tuned = ri.info & (RADIO_INFO_SIGNAL | RADIO_INFO_STEREO) ? 1 : 0;
|
|
-#endif /* linux || __OpenBSD__ */
|
|
+#endif /* linux || __OpenBSD__ || __NetBSD__ */
|
|
}
|
|
}
|
|
|
|
@@ -236,12 +236,12 @@
|
|
va.flags = VIDEO_AUDIO_VOLUME|(is_paused ? VIDEO_AUDIO_MUTE : 0);
|
|
ioctl (radio_fd, VIDIOCSFREQ, &xl_freq);
|
|
ioctl (radio_fd, VIDIOCSAUDIO, &va);
|
|
-#elif defined __OpenBSD__
|
|
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
|
ri.freq = fr;
|
|
ri.volume = volume * (255/(FMR_VOL_MAX-FMR_VOL_MIN));
|
|
ri.mute = is_paused ? 1 : 0;
|
|
SetGetRadioInfo(SET_INFO);
|
|
-#endif /* linux || __OpenBSD__ */
|
|
+#endif /* linux || __OpenBSD__ || __NetBSD__ */
|
|
|
|
for(i=0;(i<tries)&&(!tuned);i++){
|
|
usleep (10000);
|
|
@@ -249,10 +249,10 @@
|
|
v.tuner = 0;
|
|
ioctl (radio_fd, VIDIOCGTUNER, &v);
|
|
tuned = ((v.signal != 0) ? TRUE : FALSE);
|
|
-#elif defined __OpenBSD__
|
|
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
|
SetGetRadioInfo(GET_INFO);
|
|
tuned = ri.info & (RADIO_INFO_SIGNAL | RADIO_INFO_STEREO) ? 1 : 0;
|
|
-#endif /* linux || __OpenBSD__ */
|
|
+#endif /* linux || __OpenBSD__ || __NetBSD__ */
|
|
}
|
|
}
|
|
}
|