Skip to content

Commit

Permalink
atari: cdrom: Return an empty list of drives, instead of error if no …
Browse files Browse the repository at this point in the history
…driver present.
  • Loading branch information
pmandin committed Mar 27, 2015
1 parent 9d7b5b7 commit 84e079c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cdrom/mint/SDL_syscdrom.c
Expand Up @@ -20,6 +20,7 @@
slouken@libsdl.org
*/
#include "SDL_config.h"
#include "SDL_stdinc.h"

#ifdef SDL_CDROM_MINT

Expand Down Expand Up @@ -75,23 +76,24 @@ int SDL_SYS_CDInit(void)
int i, handle;
struct cdrom_subchnl info;

SDL_numcds = 0;
SDL_memset(metados_drives, 0, sizeof(metados_drives));

Metainit(&metainit);
if (metainit.version == NULL) {
#ifdef DEBUG_CDROM
fprintf(stderr, "MetaDOS not installed\n");
#endif
return -1;
return 0;
}

if (metainit.drives_map == 0) {
#ifdef DEBUG_CDROM
fprintf(stderr, "No MetaDOS devices present\n");
#endif
return -1;
return 0;
}

SDL_numcds = 0;

for (i='A'; i<='Z'; i++) {
metados_drives[SDL_numcds].device[0] = 0;
metados_drives[SDL_numcds].device[1] = ':';
Expand Down

0 comments on commit 84e079c

Please sign in to comment.