diff -NpuBr -Xexclude.txt main/libdvdnav/remap.c sherpya/libdvdnav/remap.c --- main/libdvdnav/remap.c 2010-01-06 18:05:06.703125000 +0100 +++ sherpya/libdvdnav/remap.c 2010-07-29 15:31:11.515625000 +0200 @@ -199,12 +199,28 @@ remap_t* remap_loadmap( char *title) { memset(&tmp, 0, sizeof(tmp)); /* Build the map filename */ +#ifdef __MINGW32__ + { + char exedir[MAX_PATH + 1]; + if (GetModuleFileNameA(NULL, exedir, MAX_PATH) && (home = strrchr(exedir, '\\'))) + { + *home = 0; + snprintf(fname, sizeof(fname) - 1, "%s\\dvdnav\\%s.map", exedir, title); + } + else + { + fprintf(MSG_OUT, "libdvdnav: Unable to find executable directory\n" ); + return NULL; + } + } +#else home = getenv("HOME"); if(!home) { - fprintf(MSG_OUT, "libdvdnav: Unable to find home directory" ); + fprintf(MSG_OUT, "libdvdnav: Unable to find home directory\n" ); return NULL; } snprintf(fname, sizeof(fname), "%s/.dvdnav/%s.map", home, title); +#endif /* Open the map file */ fp = fopen( fname, "r"); diff -NpuBr -Xexclude.txt main/libdvdread4/dvd_reader.c sherpya/libdvdread4/dvd_reader.c --- main/libdvdread4/dvd_reader.c 2010-07-29 14:54:57.593750000 +0200 +++ sherpya/libdvdread4/dvd_reader.c 2010-07-29 15:31:11.531250000 +0200 @@ -181,14 +181,14 @@ static int initAllCSSKeys( dvd_reader_t start = UDFFindFile( dvd, filename, &len ); if( start != 0 && len != 0 ) { /* Perform CSS key cracking for this title. */ - fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n", - filename, start ); + //fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n", + // filename, start ); if( dvdinput_title( dvd->dev, (int)start ) < 0 ) { fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%08x)\n", filename, start); } gettimeofday( &t_e, NULL ); - fprintf( stderr, "libdvdread: Elapsed time %ld\n", - (long int) t_e.tv_sec - t_s.tv_sec ); + //fprintf( stderr, "libdvdread: Elapsed time %ld\n", + // (long int) t_e.tv_sec - t_s.tv_sec ); } if( title == 0 ) continue; @@ -199,14 +199,14 @@ static int initAllCSSKeys( dvd_reader_t if( start == 0 || len == 0 ) break; /* Perform CSS key cracking for this title. */ - fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n", - filename, start ); + //fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n", + // filename, start ); if( dvdinput_title( dvd->dev, (int)start ) < 0 ) { fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%08x)!!\n", filename, start); } gettimeofday( &t_e, NULL ); - fprintf( stderr, "libdvdread: Elapsed time %ld\n", - (long int) t_e.tv_sec - t_s.tv_sec ); + //fprintf( stderr, "libdvdread: Elapsed time %ld\n", + // (long int) t_e.tv_sec - t_s.tv_sec ); } title--;