* little changes

* remove using of rev.txt
This commit is contained in:
ardi@ist-einmalig.de 2009-06-13 12:56:24 +00:00
parent 33eaefe81e
commit fd4b98714f
7 changed files with 25 additions and 47 deletions

View File

@ -8,7 +8,6 @@ $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>dev
endif
include $(DEVKITPPC)/wii_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
@ -27,8 +26,8 @@ SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"'
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O2 -Wall $(SVNDEV) $(MACHDEP) $(INCLUDE)
CXXFLAGS = -save-temps -Xassembler -aln=$@.lst $(CFLAGS)
CFLAGS = -g -O2 -save-temps -Wall $(SVNDEV) $(MACHDEP) $(INCLUDE)
CXXFLAGS = -Xassembler -aln=$@.lst $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80a00100
#---------------------------------------------------------------------------------

View File

@ -160,13 +160,6 @@ int USBDevice_Init()
}
return -1;
}
void USBDevice_ReInit()
{
__io_usbstorage.shutdown();
__io_wiiums.shutdown();
if(__io_usbstorage.startup()) return;
else __io_wiiums.startup();
}
void USBDevice_deInit()
{

View File

@ -8,7 +8,6 @@ extern "C"
int USBDevice_Init();
void USBDevice_deInit();
void USBDevice_ReInit();
int isSdInserted();
int isInserted(const char *path);
int SDCard_Init();

View File

@ -35,6 +35,7 @@
#include "wpad.h"
#include "fat.h"
//#define SPECIAL_FOR_ARDI // Fix Problem with Trekstor Classic 250GB
/* Constants */
#define CONSOLE_XCOORD 260
@ -48,8 +49,20 @@ FreeTypeGX *fontClock=0;
int
main(int argc, char *argv[])
{
s32 ret2;
u8 preloaded_ios = 0;
#ifdef SPECIAL_FOR_ARDI
if( (ret2 = IOS_ReloadIOS(249)) >=0 )
preloaded_ios = 249;
else
{
if( (ret2 = IOS_ReloadIOS(222)) >=0 )
{
load_ehc_module();
preloaded_ios = 222;
}
}
#endif
SDCard_Init(); // mount SD for loading cfg's
USBDevice_Init(); // and mount USB:/
@ -78,14 +91,14 @@ main(int argc, char *argv[])
USBDevice_deInit();// unmount USB for reloading IOS
/* Load Custom IOS */
if(Settings.cios == ios222) {
if(Settings.cios == ios222 && preloaded_ios != 222) {
ret2 = IOS_ReloadIOS(222);
load_ehc_module();
if (ret2 < 0) {
Settings.cios = ios249;
ret2 = IOS_ReloadIOS(249);
}
} else {
} else if(preloaded_ios != 249) {
ret2 = IOS_ReloadIOS(249);
}

View File

@ -681,7 +681,6 @@ static int MenuDiscList()
else if(sdcardBtn.GetState() == STATE_CLICKED)
{
USBDevice_ReInit();
SDCard_deInit();
SDCard_Init();
if (Settings.gameDisplay==list){

View File

@ -2294,32 +2294,11 @@ ProgressUpdateWindow()
if(file.data != NULL)
{
char revtxt[10];
char rev_txt[14];
sprintf(rev_txt, "%srev.txt", Settings.update_path);
pfile = fopen(rev_txt, "w");
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
//has to be repeated or it isnt working (first file download bug)
pfile = fopen(rev_txt, "w");
fwrite(file.data,1,file.size,pfile);
fclose(pfile);
//"w+" doesnt work, needs to be reopened as "r"
pfile = fopen(rev_txt, "r");
int c = 0, i = 0;
while(c != EOF || i < 10) {
c = fgetc(pfile);
if (c != EOF) {
revtxt[i] = c;
} else {
revtxt[i] = 0x00;
break;
}
i++;
}
fclose(pfile);
u8 i;
for(i=0; i<9 || i<file.size; i++)
revtxt[i] = file.data[i];
revtxt[i] = 0;
revnumber = atoi(revtxt);
remove(rev_txt);
free(file.data);
}
if(revnumber > currentrev) {

View File

@ -19,10 +19,10 @@ enum {
/* Prototypes */
s32 WBFS_Init(u32);
s32 WBFS_Init(u32);
s32 WBFS_Open();
s32 WBFS_Open2(int partition);
s32 GetPartition();
s32 WBFS_Open2(int partition);
s32 GetPartition();
s32 WBFS_Close(void);
s32 WBFS_Format(u32, u32);
s32 WBFS_GetCount(u32 *);
@ -37,10 +37,6 @@ s32 WBFS_DiskSpace(f32 *, f32 *);
s32 WBFS_RenameGame(u8 *, const void *);
f32 WBFS_EstimeGameSize(void);
s32 __WBFS_ReadUSB(void *fp, u32 lba, u32 count, void *iobuf);
s32 __WBFS_WriteUSB(void *fp, u32 lba, u32 count, void *iobuf);
#ifdef __cplusplus
}
#endif