Search
lxdream.org :: lxdream/src/loader.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/loader.c
changeset 294:a5beff9b2b85
prev180:e6dcf9b65658
next427:00270806b4cf
author nkeynes
date Thu Oct 04 10:49:41 2007 +0000 (16 years ago)
permissions -rw-r--r--
last change Reinstate xlat invalidation calls
file annotate diff log raw
1.1 --- a/src/loader.c Sun Jul 02 04:59:00 2006 +0000
1.2 +++ b/src/loader.c Thu Oct 04 10:49:41 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: loader.c,v 1.14 2006-07-02 04:59:00 nkeynes Exp $
1.6 + * $Id: loader.c,v 1.15 2007-01-16 09:18:32 nkeynes Exp $
1.7 *
1.8 * File loading routines, mostly for loading demos without going through the
1.9 * whole procedure of making a CD image for them.
1.10 @@ -58,13 +58,6 @@
1.11 }
1.12
1.13 fstat( fd, &st );
1.14 - /*
1.15 - if( st.st_size < 32768 ) {
1.16 - ERROR( "File '%s' too small to be a dreamcast image", filename );
1.17 - close(fd);
1.18 - return FALSE;
1.19 - }
1.20 - */
1.21
1.22 /* begin magic */
1.23 if( read( fd, buf, 32 ) != 32 ) {
1.24 @@ -94,6 +87,9 @@
1.25 } else if( memcmp( buf, "PK\x03\x04", 4 ) == 0 ) {
1.26 /* ZIP file, aka SBI file */
1.27 WARN( "SBI files not supported yet" );
1.28 + } else if( memcmp( buf, DREAMCAST_SAVE_MAGIC, 16 ) == 0 ) {
1.29 + /* Save state */
1.30 + dreamcast_load_state( filename );
1.31 } else if( buf[0] == 0x7F && buf[1] == 'E' &&
1.32 buf[2] == 'L' && buf[3] == 'F' ) {
1.33 /* ELF binary */
.