mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-30 15:14:18 +01:00
-added full DML v1.2+ support, you can use all options
like no disc patch and NMM again directly from wiiflow, also launching of new GCReEx format works fine
This commit is contained in:
parent
b34145054e
commit
5881ce5c8c
@ -117,7 +117,7 @@ void GC_SetLanguage(u8 lang)
|
|||||||
while(!__SYS_SyncSram());
|
while(!__SYS_SyncSram());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir)
|
int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir)
|
||||||
{
|
{
|
||||||
char folder[50];
|
char folder[50];
|
||||||
char source[300];
|
char source[300];
|
||||||
@ -129,7 +129,7 @@ bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgame
|
|||||||
{
|
{
|
||||||
gprintf("Found on %s: %s\n", partition, source);
|
gprintf("Found on %s: %s\n", partition, source);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -139,10 +139,10 @@ bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgame
|
|||||||
{
|
{
|
||||||
gprintf("Found on %s: %s\n", partition, source);
|
gprintf("Found on %s: %s\n", partition, source);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return true;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc) //, u8 DMLvideoMode)
|
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc) //, u8 DMLvideoMode)
|
||||||
@ -162,7 +162,10 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
|
|||||||
|
|
||||||
if(GamePath != NULL)
|
if(GamePath != NULL)
|
||||||
{
|
{
|
||||||
snprintf(DMLCfg->GamePath, sizeof(DMLCfg->GamePath), "/games/%s/game.iso", GamePath);
|
if(GC_GameIsInstalled(GamePath, "sd", "%s:/games") == 2)
|
||||||
|
snprintf(DMLCfg->GamePath, sizeof(DMLCfg->GamePath), "/games/%s/", GamePath);
|
||||||
|
else
|
||||||
|
snprintf(DMLCfg->GamePath, sizeof(DMLCfg->GamePath), "/games/%s/game.iso", GamePath);
|
||||||
DMLCfg->Config |= DML_CFG_GAME_PATH;
|
DMLCfg->Config |= DML_CFG_GAME_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +207,10 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
|
|||||||
|
|
||||||
//Write options into memory
|
//Write options into memory
|
||||||
memcpy((void *)0xC0001700, DMLCfg, sizeof(DML_CFG));
|
memcpy((void *)0xC0001700, DMLCfg, sizeof(DML_CFG));
|
||||||
|
|
||||||
|
//DML v1.2+
|
||||||
|
memcpy((void *)0xC1200000, DMLCfg, sizeof(DML_CFG));
|
||||||
|
|
||||||
MEM2_free(DMLCfg);
|
MEM2_free(DMLCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ enum dmlconfig
|
|||||||
DML_CFG_ACTIVITY_LED= (1<<7),
|
DML_CFG_ACTIVITY_LED= (1<<7),
|
||||||
DML_CFG_PADHOOK = (1<<8),
|
DML_CFG_PADHOOK = (1<<8),
|
||||||
DML_CFG_NODISC = (1<<9),
|
DML_CFG_NODISC = (1<<9),
|
||||||
|
DML_CFG_BOOT_DISC = (1<<10),
|
||||||
|
DML_CFG_BOOT_DOL = (1<<11),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum dmlvideomode
|
enum dmlvideomode
|
||||||
@ -40,11 +42,12 @@ enum dmlvideomode
|
|||||||
DML_VID_FORCE_PAL60 = (1<<1),
|
DML_VID_FORCE_PAL60 = (1<<1),
|
||||||
DML_VID_FORCE_NTSC = (1<<2),
|
DML_VID_FORCE_NTSC = (1<<2),
|
||||||
DML_VID_FORCE_PROG = (1<<3),
|
DML_VID_FORCE_PROG = (1<<3),
|
||||||
|
DML_VID_PROG_PATCH = (1<<4),
|
||||||
};
|
};
|
||||||
|
|
||||||
void GC_SetVideoMode(u8 videomode);
|
void GC_SetVideoMode(u8 videomode);
|
||||||
void GC_SetLanguage(u8 lang);
|
void GC_SetLanguage(u8 lang);
|
||||||
bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
|
int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
|
||||||
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc); //, u8 DMLvideoMode);
|
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc); //, u8 DMLvideoMode);
|
||||||
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats);
|
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats);
|
||||||
#endif //GC_H_
|
#endif //GC_H_
|
||||||
|
Loading…
Reference in New Issue
Block a user