Search
lxdream.org :: lxdream :: r695:2bb59940ff35
lxdream 0.9.1
released Jun 29
Download Now
changeset695:2bb59940ff35
parent694:771cef7af62a
child696:3b224db916e3
authornkeynes
dateSun Jun 22 03:58:24 2008 +0000 (11 years ago)
Avoid double notifications on gdrom disc change (unmount/mount)
src/gdrom/gdrom.c
1.1 --- a/src/gdrom/gdrom.c Sun Jun 22 03:52:56 2008 +0000
1.2 +++ b/src/gdrom/gdrom.c Sun Jun 22 03:58:24 2008 +0000
1.3 @@ -57,7 +57,7 @@
1.4 gdrom_image_class_t extclz = NULL;
1.5
1.6 if( fd == -1 ) {
1.7 - return NULL;
1.8 + return NULL;
1.9 }
1.10
1.11 f = fdopen(fd, "ro");
1.12 @@ -99,7 +99,9 @@
1.13 void gdrom_mount_disc( gdrom_disc_t disc )
1.14 {
1.15 if( disc != gdrom_disc ) {
1.16 - gdrom_unmount_disc();
1.17 + if( gdrom_disc != NULL ) {
1.18 + gdrom_disc->close(gdrom_disc);
1.19 + }
1.20 gdrom_disc = disc;
1.21 gdrom_image_dump_info( disc );
1.22 gdrom_fire_disc_changed( disc );
1.23 @@ -109,7 +111,7 @@
1.24 gboolean gdrom_mount_image( const gchar *filename )
1.25 {
1.26 gdrom_disc_t disc = gdrom_image_open(filename);
1.27 - if( disc != NULL ) {
1.28 + if( disc != NULL ) {
1.29 gdrom_mount_disc( disc );
1.30 return TRUE;
1.31 }
.