aboutsummaryrefslogtreecommitdiff
path: root/audio/tcd
diff options
context:
space:
mode:
Diffstat (limited to 'audio/tcd')
-rw-r--r--audio/tcd/Makefile2
-rw-r--r--audio/tcd/files/patch-tcd.c32
2 files changed, 19 insertions, 15 deletions
diff --git a/audio/tcd/Makefile b/audio/tcd/Makefile
index dcd385d48778..998473194a4c 100644
--- a/audio/tcd/Makefile
+++ b/audio/tcd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= tcd
PORTVERSION= 2.2.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/audio/tcd/files/patch-tcd.c b/audio/tcd/files/patch-tcd.c
index 5d583d476f58..fd04f4640526 100644
--- a/audio/tcd/files/patch-tcd.c
+++ b/audio/tcd/files/patch-tcd.c
@@ -1,5 +1,5 @@
---- src/tcd.c.orig 2004-06-15 22:32:31.000000000 +0200
-+++ src/tcd.c 2008-07-04 20:09:09.000000000 +0200
+--- src/tcd.c.orig 2008-07-16 00:27:33.000000000 +0200
++++ src/tcd.c 2008-07-16 00:27:33.000000000 +0200
@@ -33,6 +33,7 @@
#include <unistd.h>
@@ -28,7 +28,7 @@
+{
+ struct ioc_vol arg;
+ if(ioctl(state.cdrom->id, CDIOCGETVOL, &arg) == -1)
-+ return;
++ return;
+ arg.vol[0] += arg.vol[0] > 250 ? 255 - arg.vol[0] : 5;
+ arg.vol[1] += arg.vol[1] > 250 ? 255 - arg.vol[1] : 5;
+ ioctl(state.cdrom->id, CDIOCSETVOL, &arg);
@@ -38,7 +38,7 @@
+{
+ struct ioc_vol arg;
+ if(ioctl(state.cdrom->id, CDIOCGETVOL, &arg) == -1)
-+ return;
++ return;
+ arg.vol[0] -= arg.vol[0] < 5 ? arg.vol[0] : 5;
+ arg.vol[1] -= arg.vol[1] < 5 ? arg.vol[1] : 5;
+ ioctl(state.cdrom->id, CDIOCSETVOL, &arg);
@@ -47,21 +47,23 @@
static void init_SDL(int cdrom_num)
{
int err = SDL_Init(SDL_INIT_CDROM);
-@@ -217,11 +233,11 @@
- static void detect_disc_change(void)
+@@ -218,10 +234,12 @@
{
unsigned long discid = cddb_discid(state.cdrom);
-- if (discid != state.current_discid) {
-+ if (CD_INDRIVE(state.cdrom->status) && discid != state.current_discid) {
- if (state.cd_info.modified) {
+ if (discid != state.current_discid) {
+- if (state.cd_info.modified) {
++ if (state.cd_info.modified)
tcd_writediskinfo(&state.cd_info, state.cdrom);
- }
+- }
- tcd_readdiskinfo(&state.cd_info, state.cdrom);
-+ tcd_readdiskinfo(&state, state.cdrom);
++ if (CD_INDRIVE(state.cdrom->status))
++ tcd_readdiskinfo(&state, state.cdrom);
++ else
++ bzero(&state.cd_info, sizeof(state.cd_info));
state.current_discid = discid;
}
}
-@@ -237,7 +253,7 @@
+@@ -237,7 +255,7 @@
state.play_method = NORMAL;
init_SDL((argc > 1) ? strtol(argv[1], NULL, 0) : 0);
@@ -70,7 +72,7 @@
tcd_ui_init();
tcd_ui_update(&state);
state.current_discid = cddb_discid(state.cdrom);
-@@ -255,13 +271,16 @@
+@@ -255,14 +273,17 @@
case '-': case '_': handle_prev_track(); break;
case 'g': case 'G': handle_goto(); break;
case 'c': case 'C': state.play_method = REPEAT_CD; break;
@@ -84,8 +86,10 @@
+ handle_stop(); break;
case ']': handle_skip_forward(); break;
case '[': handle_skip_back(); break;
+- }
+ case '*': inc_volume(); break;
+ case '/': dec_volume(); break;
- }
++ }
}
tcd_ui_shutdown();
+ if (state.cd_info.modified) {