Compiling under latest libogc, libfat and devkitppc

This commit is contained in:
sulokutdcmago
2012-08-28 00:16:53 +00:00
parent 90051e8d46
commit 9697319aed
7 changed files with 18 additions and 23 deletions

View File

@@ -1,4 +0,0 @@
echo cp Makefile.gc Makefile
cp Makefile.gc Makefile
echo cp ./source/gcmm-bk.gc ./source/gcmm-bk.s
cp ./source/gcmm-bk.gc ./source/gcmm-bk.s

View File

@@ -100,12 +100,12 @@ export OUTPUT := $(CURDIR)/$(TARGET)
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.gc
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol $(SOURCES)/gcmm-bk.s
#---------------------------------------------------------------------------------
run:

View File

@@ -100,12 +100,12 @@ export OUTPUT := $(CURDIR)/$(TARGET)
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol $(SOURCES)/gcmm-bk.s
#---------------------------------------------------------------------------------
run:

View File

@@ -1,4 +0,0 @@
echo cp Makefile.wii Makefile
cp Makefile.wii Makefile
echo cp ./source/gcmm-bk.wii ./source/gcmm-bk.s
cp ./source/gcmm-bk.wii ./source/gcmm-bk.s

View File

@@ -117,7 +117,7 @@ Initialise (void)
// 576 lines (PAL 50Hz)
// display should be centered vertically (borders)
//Make all video modes the same size so menus doesn't screw up
vmode = &TVPal574IntDfScale;
vmode = &TVPal576IntDfScale;
vmode->xfbHeight = 480;
vmode->viYOrigin = (VI_MAX_HEIGHT_PAL - 480)/2;
vmode->viHeight = 480;

View File

@@ -15,6 +15,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "mcard.h"
#include "gci.h"
#include "freetype.h"
@@ -65,7 +67,7 @@ int MountCard(int cslot)
char msg[64];
// Mount the card, try several times as they are tricky
while ( tries < 10 && ret !< 0)
while ( (tries < 10) && (ret < 0))
{
/*** We already initialized the Memory Card subsystem with CARD_Init() in select_memcard_slot(). Let's reset the
EXI subsystem, just to make sure we have no problems mounting the card ***/
@@ -73,13 +75,13 @@ int MountCard(int cslot)
/*** Mount the card ***/
ret = CARD_Mount (cslot, SysArea, card_removed);
if (ret !<0) break;
if (ret >= 0) break;
VIDEO_WaitVSync ();
tries++;
}
/*** Make sure the card is really mounted ***/
isMounted = CARD_ProbeEx(cslot, memzise, sectsize);
isMounted = CARD_ProbeEx(cslot, &memsize, &sectsize);
if (memsize > 0 && sectsize > 0)//then we really mounted de card
{
/*** It was a false positive. Weird ***/
@@ -88,7 +90,7 @@ int MountCard(int cslot)
sprintf(msg, "%d blocks (%d sectorsize)", memsize, sectsize);
writeStatusBar("Card mounted",msg);
ShowScreen();
sleep(1)
sleep(1);
writeStatusBar("","");
/*** If this point is reached, everything went fine ***/
return ret;

View File

@@ -33,12 +33,13 @@ extern int OFFSET;
bool file_exists(const char * filename)
{
if (FILE * file = fopen(filename, "r"))
{
fclose(file);
return true;
}
return false;
FILE * file = fopen(filename, "r");
if (file)
{
fclose(file);
return true;
}
return false;
}
int SDSaveMCImage ()