Skip to content

Commit 927a0da

Browse files
committed
Fix compile errors with latest libogc(2)
Fix unmounting FAT devices on Wii
1 parent 5f752b4 commit 927a0da

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

builds/genplus_cube.dol

69.7 KB
Binary file not shown.

builds/genplus_wii.dol

53.2 KB
Binary file not shown.

gx/fileio/file_load.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ static u8 dvdInited = 0;
8282
static u8 dvdMounted = 0;
8383

8484
#ifndef HW_RVL
85-
static bool dvdStartup()
85+
static bool dvdStartup(DISC_INTERFACE *disc)
8686
{
8787
DVD_Mount();
8888
return true;
8989
}
9090

91-
static bool dvdIsInserted()
91+
static bool dvdIsInserted(DISC_INTERFACE *disc)
9292
{
9393
return true;
9494
}
@@ -112,8 +112,8 @@ static int MountDVD(void)
112112
DVD_Init();
113113

114114
/* patch libogc DVD interface which appears to be broken on Gamecube */
115-
dvd->startup = (FN_MEDIUM_STARTUP)dvdStartup;
116-
dvd->isInserted = (FN_MEDIUM_ISINSERTED)dvdIsInserted;
115+
*(FN_MEDIUM_STARTUP *)&dvd->startup = dvdStartup;
116+
*(FN_MEDIUM_ISINSERTED *)&dvd->isInserted = dvdIsInserted;
117117
#endif
118118
dvdInited = 1;
119119
}
@@ -127,7 +127,11 @@ static int MountDVD(void)
127127
}
128128

129129
/* check if disc is found */
130+
#ifdef HW_RVL
130131
if(!dvd->isInserted())
132+
#else
133+
if(!dvd->isInserted(dvd))
134+
#endif
131135
{
132136
GUI_WaitPrompt("Error","No Disc inserted !");
133137
return 0;

gx/fileio/file_slot.c

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
/**
4848
* libOGC CARD System Work Area
4949
*/
50+
#ifndef CARD_WORKAREA
51+
#define CARD_WORKAREA CARD_WORKAREA_SIZE
52+
#endif
5053
static u8 SysArea[CARD_WORKAREA] ATTRIBUTE_ALIGN (32);
5154

5255
/* Mega CD backup RAM stuff */

gx/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ void shutdown(void)
319319
#ifdef HW_RVL
320320
/* unmount all devices */
321321
ISO9660_Unmount("dvd:");
322-
fatUnmount("sd");
323-
fatUnmount("usb");
322+
fatUnmount("sd:");
323+
fatUnmount("usb:");
324324

325325
/* shutdown all devices */
326326
DI_Close();

0 commit comments

Comments
 (0)