Search
lxdream.org :: lxdream/src/gdrom/gdrom.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/gdrom.c
changeset 1109:700c5ab26a63
prev1101:78e762cec843
next1296:30ecee61f811
author nkeynes
date Thu Jun 10 22:13:16 2010 +1000 (12 years ago)
permissions -rw-r--r--
last change Integrate executable wrapping into the user interface
- command-line now loads wrapped by default, -e <bin> to run binary
- add support for .bin executables
- Add useful (internal) error codes
file annotate diff log raw
1.1 --- a/src/gdrom/gdrom.c Tue Feb 16 09:29:39 2010 +1000
1.2 +++ b/src/gdrom/gdrom.c Thu Jun 10 22:13:16 2010 +1000
1.3 @@ -28,6 +28,7 @@
1.4 #include "gdrom/gdrom.h"
1.5 #include "gdrom/packet.h"
1.6 #include "bootstrap.h"
1.7 +#include "loader.h"
1.8 #include "drivers/cdrom/cdrom.h"
1.9
1.10 #define GDROM_LBA_OFFSET 150
1.11 @@ -58,9 +59,12 @@
1.12 }
1.13 }
1.14
1.15 -gboolean gdrom_mount_image( const gchar *filename )
1.16 +gboolean gdrom_mount_image( const gchar *filename, ERROR *err )
1.17 {
1.18 - cdrom_disc_t disc = cdrom_disc_open(filename, NULL);
1.19 + cdrom_disc_t disc = cdrom_disc_open(filename, err);
1.20 + if( disc == NULL && err->code == LX_ERR_FILE_UNKNOWN ) {
1.21 + disc = cdrom_wrap_magic( CDROM_DISC_XA, filename, err );
1.22 + }
1.23 if( disc != NULL ) {
1.24 gdrom_mount_disc( disc );
1.25 return TRUE;
.