Fix compile errors with latest libogc(2)

Fix unmounting FAT devices on Wii
This commit is contained in:
Extrems 2024-11-14 21:03:38 -05:00
parent 378aa209c6
commit ccabd03683
5 changed files with 13 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 4.1 MiB

View File

@ -82,13 +82,13 @@ static u8 dvdInited = 0;
static u8 dvdMounted = 0;
#ifndef HW_RVL
static bool dvdStartup()
static bool dvdStartup(DISC_INTERFACE *disc)
{
DVD_Mount();
return true;
}
static bool dvdIsInserted()
static bool dvdIsInserted(DISC_INTERFACE *disc)
{
return true;
}
@ -112,8 +112,8 @@ static int MountDVD(void)
DVD_Init();
/* patch libogc DVD interface which appears to be broken on Gamecube */
dvd->startup = (FN_MEDIUM_STARTUP)dvdStartup;
dvd->isInserted = (FN_MEDIUM_ISINSERTED)dvdIsInserted;
*(FN_MEDIUM_STARTUP *)&dvd->startup = dvdStartup;
*(FN_MEDIUM_ISINSERTED *)&dvd->isInserted = dvdIsInserted;
#endif
dvdInited = 1;
}
@ -127,7 +127,11 @@ static int MountDVD(void)
}
/* check if disc is found */
#ifdef HW_RVL
if(!dvd->isInserted())
#else
if(!dvd->isInserted(dvd))
#endif
{
GUI_WaitPrompt("Error","No Disc inserted !");
return 0;

View File

@ -47,6 +47,9 @@
/**
* libOGC CARD System Work Area
*/
#ifndef CARD_WORKAREA
#define CARD_WORKAREA CARD_WORKAREA_SIZE
#endif
static u8 SysArea[CARD_WORKAREA] ATTRIBUTE_ALIGN (32);
/* Mega CD backup RAM stuff */

View File

@ -319,8 +319,8 @@ void shutdown(void)
#ifdef HW_RVL
/* unmount all devices */
ISO9660_Unmount("dvd:");
fatUnmount("sd");
fatUnmount("usb");
fatUnmount("sd:");
fatUnmount("usb:");
/* shutdown all devices */
DI_Close();