Skip to content

Commit

Permalink
Fix sd card mountpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mad-ady committed Dec 13, 2018
1 parent 7eda7b6 commit c19c455
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/prboom-esp32-compat/i_system.c
Expand Up @@ -274,7 +274,7 @@ int I_Open(const char *wad, int flags) {

if(x == 31 && fds[x].file!=NULL)
{
lprintf(LO_INFO, "I_Open: Too many hanfdles open\n");
lprintf(LO_INFO, "I_Open: Too many handles open\n");
return -1;
}

Expand All @@ -288,9 +288,11 @@ int I_Open(const char *wad, int flags) {
}

if (strcmp(fname, fileName)==0) {
printf("Trying to load %s\n", fileName);
char filepath[256];
strcpy(filepath, I_DoomExeDir());
strcat(filepath, "/doom.wad");
printf("Looking at path %s\n", filepath);
xSemaphoreTake(dispLock, portMAX_DELAY);
fds[x].file=fopen(filepath, "rb");
xSemaphoreGive(dispLock);
Expand Down Expand Up @@ -500,12 +502,12 @@ void I_Read(int ifd, void* vbuf, size_t sz)

const char *I_DoomExeDir(void)
{
return "/sd/odroid/data/doom";
return "/sdcard/odroid/data/doom";
}

const char *I_DoomSaveDir(void)
{
return "/sd/roms/doom";
return "/sdcard/roms/doom";
}


Expand Down

0 comments on commit c19c455

Please sign in to comment.