mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
* Added Abz's 1076 mod patch with code cleanup by me. His patch includes:
- private server - sicksaxis to be able to a ps3 controller in wiiflow - support for the latest nintendont with argsboot - other minor changes that i may or may not change soon. - credit to Abz, Airline38, and anyone else who helped with coding.
This commit is contained in:
parent
549061586a
commit
7bad8c3fd3
@ -41,7 +41,7 @@ SOURCES := source \
|
|||||||
source/unzip \
|
source/unzip \
|
||||||
source/xml \
|
source/xml \
|
||||||
source/wstringEx
|
source/wstringEx
|
||||||
|
SOURCES += source/sicksaxis-wrapper
|
||||||
DATA := data \
|
DATA := data \
|
||||||
data/images \
|
data/images \
|
||||||
data/help \
|
data/help \
|
||||||
@ -67,7 +67,7 @@ endif
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# any extra libraries we wish to link with the project
|
# any extra libraries we wish to link with the project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBS := -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lwupc -lbte -lasnd -logc -lfreetype -lvorbisidec -lmad
|
LIBS := -lcustomfat -lcustomntfs -lcustomext2fs -lpng -lturbojpeg -lm -lz -lwiiuse -lwupc -lbte -lasnd -logc -lfreetype -lvorbisidec -lmad -lsicksaxis
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
|
1
out/bins/ReadMe.txt
Normal file
1
out/bins/ReadMe.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Folder needed for app_booter.bin, ext_booter.bin, and ext_loader.bin
|
@ -32,6 +32,7 @@ struct the_CFG {
|
|||||||
u32 wip_count;
|
u32 wip_count;
|
||||||
bool use_led;
|
bool use_led;
|
||||||
bool patchregion;
|
bool patchregion;
|
||||||
|
bool private_server;
|
||||||
/* needed for channels */
|
/* needed for channels */
|
||||||
u64 title;
|
u64 title;
|
||||||
bool use_dol;
|
bool use_dol;
|
||||||
|
@ -29,7 +29,7 @@ static const char *GameID = (const char*)0x80000000;
|
|||||||
#define APPLDR_CODE 0x918
|
#define APPLDR_CODE 0x918
|
||||||
|
|
||||||
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch,
|
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch,
|
||||||
bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion);
|
bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion, bool private_server);
|
||||||
static void patch_NoDiscinDrive(void *buffer, u32 len);
|
static void patch_NoDiscinDrive(void *buffer, u32 len);
|
||||||
static void Anti_002_fix(void *Address, int Size);
|
static void Anti_002_fix(void *Address, int Size);
|
||||||
static bool Remove_001_Protection(void *Address, int Size);
|
static bool Remove_001_Protection(void *Address, int Size);
|
||||||
@ -47,7 +47,7 @@ static struct
|
|||||||
s32 padding;
|
s32 padding;
|
||||||
} apploader_hdr ATTRIBUTE_ALIGN(32);
|
} apploader_hdr ATTRIBUTE_ALIGN(32);
|
||||||
|
|
||||||
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion)
|
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion , bool private_server)
|
||||||
{
|
{
|
||||||
PrinceOfPersiaPatch();
|
PrinceOfPersiaPatch();
|
||||||
NewSuperMarioBrosPatch();
|
NewSuperMarioBrosPatch();
|
||||||
@ -94,7 +94,7 @@ u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
|
|||||||
/* Read data from DVD */
|
/* Read data from DVD */
|
||||||
WDVD_Read(dst, len, offset);
|
WDVD_Read(dst, len, offset);
|
||||||
maindolpatches(dst, len, vidMode, vmode, vipatch, countryString,
|
maindolpatches(dst, len, vidMode, vmode, vipatch, countryString,
|
||||||
patchVidModes, aspectRatio, returnTo, patchregion);
|
patchVidModes, aspectRatio, returnTo, patchregion, private_server);
|
||||||
DCFlushRange(dst, len);
|
DCFlushRange(dst, len);
|
||||||
ICInvalidateRange(dst, len);
|
ICInvalidateRange(dst, len);
|
||||||
prog(20);
|
prog(20);
|
||||||
@ -107,7 +107,7 @@ u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
|
|||||||
return (u32)appldr_final();
|
return (u32)appldr_final();
|
||||||
}
|
}
|
||||||
|
|
||||||
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion)
|
void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion , bool private_server)
|
||||||
{
|
{
|
||||||
do_wip_code((u8 *)dst, len);
|
do_wip_code((u8 *)dst, len);
|
||||||
Remove_001_Protection(dst, len);
|
Remove_001_Protection(dst, len);
|
||||||
@ -135,6 +135,8 @@ void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipa
|
|||||||
PatchReturnTo(dst, len, returnTo);
|
PatchReturnTo(dst, len, returnTo);
|
||||||
if(patchregion)
|
if(patchregion)
|
||||||
PatchRegion(dst, len);
|
PatchRegion(dst, len);
|
||||||
|
if(private_server)
|
||||||
|
PrivateServerPatcher(dst,len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void patch_NoDiscinDrive(void *buffer, u32 len)
|
static void patch_NoDiscinDrive(void *buffer, u32 len)
|
||||||
|
@ -7,7 +7,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString,
|
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString,
|
||||||
u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion);
|
u8 patchVidModes, int aspectRatio, u32 returnTo, bool patchregion, bool private_server);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ int main()
|
|||||||
WDVD_OpenPartition(offset, &GameIOS);
|
WDVD_OpenPartition(offset, &GameIOS);
|
||||||
vmode = Disc_SelectVMode(normalCFG.vidMode, &vmode_reg);
|
vmode = Disc_SelectVMode(normalCFG.vidMode, &vmode_reg);
|
||||||
AppEntrypoint = Apploader_Run(normalCFG.vidMode, vmode, normalCFG.vipatch, normalCFG.countryString,
|
AppEntrypoint = Apploader_Run(normalCFG.vidMode, vmode, normalCFG.vipatch, normalCFG.countryString,
|
||||||
normalCFG.patchVidMode, normalCFG.aspectRatio, normalCFG.returnTo, normalCFG.patchregion);
|
normalCFG.patchVidMode, normalCFG.aspectRatio, normalCFG.returnTo, normalCFG.patchregion, normalCFG.private_server);
|
||||||
WDVD_Close();
|
WDVD_Close();
|
||||||
}
|
}
|
||||||
else if(normalCFG.BootType == TYPE_CHANNEL)
|
else if(normalCFG.BootType == TYPE_CHANNEL)
|
||||||
|
@ -640,3 +640,47 @@ void PatchRegion(void *Address, int Size)
|
|||||||
addr_start += 4;
|
addr_start += 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Patch URLs for private Servers - Thanks to ULGX **/
|
||||||
|
void PrivateServerPatcher(void *addr, u32 len)
|
||||||
|
{
|
||||||
|
// Patch protocol https -> http
|
||||||
|
char *cur = (char *)addr;
|
||||||
|
const char *end = cur + len - 8;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (memcmp(cur, "https://", 8) == 0 && cur[8] != 0)
|
||||||
|
{
|
||||||
|
int len = strlen(cur);
|
||||||
|
memmove(cur + 4, cur + 5, len - 5);
|
||||||
|
cur[len - 1] = 0;
|
||||||
|
cur += len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (++cur < end);
|
||||||
|
domainpatcher(addr, len, "wiimmfi.de");
|
||||||
|
}
|
||||||
|
|
||||||
|
void domainpatcher(void *addr, u32 len, const char* domain)
|
||||||
|
{
|
||||||
|
if(strlen("nintendowifi.net") < strlen(domain))
|
||||||
|
return;
|
||||||
|
|
||||||
|
char *cur = (char *)addr;
|
||||||
|
const char *end = cur + len - 16;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (memcmp(cur, "nintendowifi.net", 16) == 0)
|
||||||
|
{
|
||||||
|
int len = strlen(cur);
|
||||||
|
u8 i;
|
||||||
|
memcpy(cur, domain, strlen(domain));
|
||||||
|
memmove(cur + strlen(domain), cur + 16, len - 16);
|
||||||
|
for(i = 16 - strlen(domain); i > 0 ; i--)
|
||||||
|
cur[len - i ] = 0;
|
||||||
|
cur += len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (++cur < end);
|
||||||
|
}
|
||||||
|
@ -40,6 +40,8 @@ bool PatchReturnTo(void *Address, int Size, u32 id);
|
|||||||
void Patch_fwrite(void *Address, int Size);
|
void Patch_fwrite(void *Address, int Size);
|
||||||
s32 BlockIOSReload(void);
|
s32 BlockIOSReload(void);
|
||||||
void PatchRegion(void *Address, int Size);
|
void PatchRegion(void *Address, int Size);
|
||||||
|
void PrivateServerPatcher(void *addr, u32 len);
|
||||||
|
void domainpatcher(void *addr, u32 len, const char* domain);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ struct the_CFG {
|
|||||||
u32 wip_count;
|
u32 wip_count;
|
||||||
bool use_led;
|
bool use_led;
|
||||||
bool patchregion;
|
bool patchregion;
|
||||||
|
bool private_server;
|
||||||
/* needed for channels */
|
/* needed for channels */
|
||||||
u64 title;
|
u64 title;
|
||||||
bool use_dol;
|
bool use_dol;
|
||||||
|
@ -126,7 +126,7 @@ bool ExternalBooter_LoadBins(const char *binDir)
|
|||||||
extern FragList *frag_list;
|
extern FragList *frag_list;
|
||||||
extern s32 wbfsDev;
|
extern s32 wbfsDev;
|
||||||
extern u32 wbfs_part_idx;
|
extern u32 wbfs_part_idx;
|
||||||
void ExternalBooter_WiiGameSetup(bool wbfs, bool dvd, bool patchregion, const char *ID)
|
void ExternalBooter_WiiGameSetup(bool wbfs, bool dvd, bool patchregion, bool private_server, const char *ID)
|
||||||
{
|
{
|
||||||
memset(&normalCFG, 0, sizeof(the_CFG));
|
memset(&normalCFG, 0, sizeof(the_CFG));
|
||||||
normalCFG.GameBootType = dvd ? TYPE_WII_DISC : (wbfs ? TYPE_WII_WBFS : TYPE_WII_WBFS_EXT);
|
normalCFG.GameBootType = dvd ? TYPE_WII_DISC : (wbfs ? TYPE_WII_WBFS : TYPE_WII_WBFS_EXT);
|
||||||
@ -135,6 +135,7 @@ void ExternalBooter_WiiGameSetup(bool wbfs, bool dvd, bool patchregion, const ch
|
|||||||
normalCFG.wbfsDevice = wbfsDev;
|
normalCFG.wbfsDevice = wbfsDev;
|
||||||
normalCFG.wbfsPart = wbfs_part_idx;
|
normalCFG.wbfsPart = wbfs_part_idx;
|
||||||
normalCFG.patchregion = patchregion;
|
normalCFG.patchregion = patchregion;
|
||||||
|
normalCFG.private_server = private_server;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExternalBooter_ChannelSetup(u64 title, bool dol)
|
void ExternalBooter_ChannelSetup(u64 title, bool dol)
|
||||||
|
@ -32,7 +32,7 @@ void WiiFlow_ExternalBooter(u8 vidMode, bool vipatch, bool countryString, u8 pat
|
|||||||
int aspectRatio, u32 returnTo, u8 BootType, bool use_led);
|
int aspectRatio, u32 returnTo, u8 BootType, bool use_led);
|
||||||
bool ExternalBooter_LoadBins(const char *binDir);
|
bool ExternalBooter_LoadBins(const char *binDir);
|
||||||
void ExternalBooter_ChannelSetup(u64 title, bool dol);
|
void ExternalBooter_ChannelSetup(u64 title, bool dol);
|
||||||
void ExternalBooter_WiiGameSetup(bool wbfs, bool dvd, bool patchregion, const char *ID);
|
void ExternalBooter_WiiGameSetup(bool wbfs, bool dvd, bool patchregion, bool private_server, const char *ID);
|
||||||
void ShutdownBeforeExit(void);
|
void ShutdownBeforeExit(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,27 +85,63 @@
|
|||||||
#define GBTN_1_HELD (gc_btnsHeld & GBTN_1)
|
#define GBTN_1_HELD (gc_btnsHeld & GBTN_1)
|
||||||
#define GBTN_2_HELD (gc_btnsHeld & GBTN_2)
|
#define GBTN_2_HELD (gc_btnsHeld & GBTN_2)
|
||||||
|
|
||||||
#define BTN_UP_PRESSED (WBTN_UP_PRESSED || GBTN_UP_PRESSED)
|
#define DBTN_PS (DS3_BUTTON_PS)
|
||||||
#define BTN_DOWN_PRESSED (WBTN_DOWN_PRESSED || GBTN_DOWN_PRESSED)
|
#define DBTN_START (DS3_BUTTON_START)
|
||||||
#define BTN_LEFT_PRESSED (WBTN_LEFT_PRESSED || GBTN_LEFT_PRESSED)
|
#define DBTN_SELECT (DS3_BUTTON_SELECT)
|
||||||
#define BTN_RIGHT_PRESSED (WBTN_RIGHT_PRESSED || GBTN_RIGHT_PRESSED)
|
#define DBTN_Y (DS3_BUTTON_TRIANGLE)
|
||||||
#define BTN_HOME_PRESSED (WBTN_HOME_PRESSED || GBTN_START_PRESSED)
|
#define DBTN_Z (DS3_BUTTON_CIRCLE)
|
||||||
#define BTN_MINUS_PRESSED (WBTN_MINUS_PRESSED || GBTN_L_PRESSED)
|
#define DBTN_B (DS3_BUTTON_CROSS)
|
||||||
#define BTN_PLUS_PRESSED (WBTN_PLUS_PRESSED || GBTN_R_PRESSED)
|
#define DBTN_A (DS3_BUTTON_SQUARE)
|
||||||
#define BTN_A_PRESSED (WBTN_A_PRESSED || GBTN_A_PRESSED)
|
#define DBTN_UP (DS3_BUTTON_UP)
|
||||||
#define BTN_B_PRESSED (WBTN_B_PRESSED || GBTN_B_PRESSED)
|
#define DBTN_RIGHT (DS3_BUTTON_RIGHT)
|
||||||
#define BTN_1_PRESSED (WBTN_1_PRESSED || GBTN_1_PRESSED)
|
#define DBTN_DOWN (DS3_BUTTON_DOWN)
|
||||||
#define BTN_2_PRESSED (WBTN_2_PRESSED || GBTN_2_PRESSED)
|
#define DBTN_LEFT (DS3_BUTTON_LEFT)
|
||||||
|
#define DBTN_L1 (DS3_BUTTON_L1)
|
||||||
|
#define DBTN_L2 (DS3_BUTTON_L2)
|
||||||
|
#define DBTN_L3 (DS3_BUTTON_L3)
|
||||||
|
#define DBTN_R1 (DS3_BUTTON_R1)
|
||||||
|
#define DBTN_R2 (DS3_BUTTON_R2)
|
||||||
|
#define DBTN_R3 (DS3_BUTTON_R3)
|
||||||
|
|
||||||
|
#define DBTN_PS_PRESSED (ds3_btnsPressed & DS3_BUTTON_PS)
|
||||||
|
#define DBTN_START_PRESSED (ds3_btnsPressed & DS3_BUTTON_START)
|
||||||
|
#define DBTN_SELECT_PRESSED (ds3_btnsPressed & DS3_BUTTON_SELECT)
|
||||||
|
#define DBTN_Y_PRESSED (ds3_btnsPressed & DS3_BUTTON_TRIANGLE)
|
||||||
|
#define DBTN_Z_PRESSED (ds3_btnsPressed & DS3_BUTTON_CIRCLE)
|
||||||
|
#define DBTN_B_PRESSED (ds3_btnsPressed & DS3_BUTTON_CROSS)
|
||||||
|
#define DBTN_A_PRESSED (ds3_btnsPressed & DS3_BUTTON_SQUARE)
|
||||||
|
#define DBTN_UP_PRESSED (ds3_btnsPressed & DS3_BUTTON_UP)
|
||||||
|
#define DBTN_RIGHT_PRESSED (ds3_btnsPressed & DS3_BUTTON_RIGHT)
|
||||||
|
#define DBTN_DOWN_PRESSED (ds3_btnsPressed & DS3_BUTTON_DOWN)
|
||||||
|
#define DBTN_LEFT_PRESSED (ds3_btnsPressed & DS3_BUTTON_LEFT)
|
||||||
|
#define DBTN_L1_PRESSED (ds3_btnsPressed & DS3_BUTTON_L1)
|
||||||
|
#define DBTN_L2_PRESSED (ds3_btnsPressed & DS3_BUTTON_L2)
|
||||||
|
#define DBTN_L3_PRESSED (ds3_btnsPressed & DS3_BUTTON_L3)
|
||||||
|
#define DBTN_R1_PRESSED (ds3_btnsPressed & DS3_BUTTON_R1)
|
||||||
|
#define DBTN_R2_PRESSED (ds3_btnsPressed & DS3_BUTTON_R2)
|
||||||
|
#define DBTN_R3_PRESSED (ds3_btnsPressed & DS3_BUTTON_R3)
|
||||||
|
|
||||||
|
#define BTN_UP_PRESSED (WBTN_UP_PRESSED || GBTN_UP_PRESSED || DBTN_UP_PRESSED)
|
||||||
|
#define BTN_DOWN_PRESSED (WBTN_DOWN_PRESSED || GBTN_DOWN_PRESSED || DBTN_DOWN_PRESSED)
|
||||||
|
#define BTN_LEFT_PRESSED (WBTN_LEFT_PRESSED || GBTN_LEFT_PRESSED || DBTN_LEFT_PRESSED)
|
||||||
|
#define BTN_RIGHT_PRESSED (WBTN_RIGHT_PRESSED || GBTN_RIGHT_PRESSED || DBTN_RIGHT_PRESSED)
|
||||||
|
#define BTN_HOME_PRESSED (WBTN_HOME_PRESSED || GBTN_START_PRESSED || DBTN_START_PRESSED)
|
||||||
|
#define BTN_MINUS_PRESSED (WBTN_MINUS_PRESSED || GBTN_L_PRESSED || DBTN_L2_PRESSED)
|
||||||
|
#define BTN_PLUS_PRESSED (WBTN_PLUS_PRESSED || GBTN_R_PRESSED || DBTN_R2_PRESSED)
|
||||||
|
#define BTN_A_PRESSED (WBTN_A_PRESSED || GBTN_A_PRESSED || DBTN_A_PRESSED || DBTN_Z_PRESSED)
|
||||||
|
#define BTN_B_PRESSED (WBTN_B_PRESSED || GBTN_B_PRESSED || DBTN_B_PRESSED)
|
||||||
|
#define BTN_1_PRESSED (WBTN_1_PRESSED || GBTN_1_PRESSED || DBTN_L1_PRESSED)
|
||||||
|
#define BTN_2_PRESSED (WBTN_2_PRESSED || GBTN_2_PRESSED || DBTN_R1_PRESSED)
|
||||||
|
|
||||||
#define BTN_UP_HELD (WBTN_UP_HELD || GBTN_UP_HELD)
|
#define BTN_UP_HELD (WBTN_UP_HELD || GBTN_UP_HELD)
|
||||||
#define BTN_DOWN_HELD (WBTN_DOWN_HELD || GBTN_DOWN_HELD)
|
#define BTN_DOWN_HELD (WBTN_DOWN_HELD || GBTN_DOWN_HELD)
|
||||||
#define BTN_LEFT_HELD (WBTN_LEFT_HELD || GBTN_LEFT_HELD)
|
#define BTN_LEFT_HELD (WBTN_LEFT_HELD || GBTN_LEFT_HELD )
|
||||||
#define BTN_RIGHT_HELD (WBTN_RIGHT_HELD || GBTN_RIGHT_HELD)
|
#define BTN_RIGHT_HELD (WBTN_RIGHT_HELD || GBTN_RIGHT_HELD)
|
||||||
#define BTN_HOME_HELD (WBTN_HOME_HELD || GBTN_START_HELD)
|
#define BTN_HOME_HELD (WBTN_HOME_HELD || GBTN_START_HELD)
|
||||||
#define BTN_MINUS_HELD (WBTN_MINUS_HELD || GBTN_L_HELD)
|
#define BTN_MINUS_HELD (WBTN_MINUS_HELD || GBTN_L_HELD)
|
||||||
#define BTN_PLUS_HELD (WBTN_PLUS_HELD || GBTN_R_HELD)
|
#define BTN_PLUS_HELD (WBTN_PLUS_HELD || GBTN_R_HELD)
|
||||||
#define BTN_A_HELD (WBTN_A_HELD || GBTN_A_HELD)
|
#define BTN_A_HELD (WBTN_A_HELD || GBTN_A_HELD)
|
||||||
#define BTN_B_HELD (WBTN_B_HELD || GBTN_B_HELD)
|
#define BTN_B_HELD (WBTN_B_HELD || GBTN_B_HELD || DBTN_B_PRESSED || DBTN_Y_PRESSED)
|
||||||
#define BTN_1_HELD (WBTN_1_HELD || GBTN_1_HELD)
|
#define BTN_1_HELD (WBTN_1_HELD || GBTN_1_HELD)
|
||||||
#define BTN_2_HELD (WBTN_2_HELD || GBTN_2_HELD)
|
#define BTN_2_HELD (WBTN_2_HELD || GBTN_2_HELD)
|
||||||
|
|
||||||
@ -118,11 +154,11 @@ enum
|
|||||||
WBTN_A,
|
WBTN_A,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BTN_UP_REPEAT (wii_btnRepeat(WBTN_UP) || gc_btnRepeat(GBTN_UP))
|
#define BTN_UP_REPEAT (wii_btnRepeat(WBTN_UP) || gc_btnRepeat(GBTN_UP) || ds3_btnRepeat(DBTN_UP))
|
||||||
#define BTN_DOWN_REPEAT (wii_btnRepeat(WBTN_DOWN) || gc_btnRepeat(GBTN_DOWN))
|
#define BTN_DOWN_REPEAT (wii_btnRepeat(WBTN_DOWN) || gc_btnRepeat(GBTN_DOWN) || ds3_btnRepeat(DBTN_DOWN))
|
||||||
#define BTN_LEFT_REPEAT (wii_btnRepeat(WBTN_LEFT) || gc_btnRepeat(GBTN_LEFT))
|
#define BTN_LEFT_REPEAT (wii_btnRepeat(WBTN_LEFT) || gc_btnRepeat(GBTN_LEFT) || ds3_btnRepeat(DBTN_LEFT))
|
||||||
#define BTN_RIGHT_REPEAT (wii_btnRepeat(WBTN_RIGHT) || gc_btnRepeat(GBTN_RIGHT))
|
#define BTN_RIGHT_REPEAT (wii_btnRepeat(WBTN_RIGHT) || gc_btnRepeat(GBTN_RIGHT) || ds3_btnRepeat(DBTN_RIGHT))
|
||||||
#define BTN_A_REPEAT (wii_btnRepeat(WBTN_A) || gc_btnRepeat(GBTN_A))
|
#define BTN_A_REPEAT (wii_btnRepeat(WBTN_A) || gc_btnRepeat(GBTN_A) || ds3_btnRepeat(DBTN_A))
|
||||||
|
|
||||||
#define LEFT_STICK_UP lStick_Up()
|
#define LEFT_STICK_UP lStick_Up()
|
||||||
#define LEFT_STICK_DOWN lStick_Down()
|
#define LEFT_STICK_DOWN lStick_Down()
|
||||||
|
201
source/gc/gc.cpp
201
source/gc/gc.cpp
@ -25,7 +25,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include "menu/menu.hpp"
|
||||||
#include "gc/gc.hpp"
|
#include "gc/gc.hpp"
|
||||||
#include "gui/text.hpp"
|
#include "gui/text.hpp"
|
||||||
#include "devicemounter/DeviceHandler.hpp"
|
#include "devicemounter/DeviceHandler.hpp"
|
||||||
@ -147,40 +147,132 @@ void DML_New_WriteOptions()
|
|||||||
DCFlushRange((void *)(0x81200000), sizeof(DML_CFG));
|
DCFlushRange((void *)(0x81200000), sizeof(DML_CFG));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Nintendont
|
// Nintendont
|
||||||
NIN_CFG NinCfg;
|
NIN_CFG NinCfg;
|
||||||
u8 NinDevice = 0;
|
u8 NinDevice = 0;
|
||||||
bool NinArgsboot = false;
|
bool NinArgsboot = false;
|
||||||
void Nintendont_SetOptions(const char *game, const char *gameID, u8 NMM, u8 videoSetting, bool widescreen)
|
|
||||||
|
void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath,char *NewCheatPath, const char *partition,
|
||||||
|
bool cheats, u8 NMM, u8 videomode, u8 videoSetting, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker, bool screenshot, bool NIN_Debugger)
|
||||||
{
|
{
|
||||||
NinDevice = DeviceHandle.PathToDriveType(game);
|
NinDevice = DeviceHandle.PathToDriveType(game);
|
||||||
memset(&NinCfg, 0, sizeof(NIN_CFG));
|
memset(&NinCfg, 0, sizeof(NIN_CFG));
|
||||||
NinCfg.Magicbytes = 0x01070CF6;
|
NinCfg.Magicbytes = 0x01070CF6;
|
||||||
NinCfg.Version = NIN_CFG_VERSION;
|
NinCfg.MemCardBlocks = 0x2;//251 blocks
|
||||||
NinCfg.MaxPads = NIN_CFG_MAXPAD;
|
|
||||||
|
//check version
|
||||||
|
u32 NIN_cfg_version = NIN_CFG_VERSION;
|
||||||
|
for(u8 i = SD; i < MAXDEVICES; ++i)
|
||||||
|
{
|
||||||
|
const char *dol_path = fmt(NIN_LOADER_PATH, DeviceName[i]);
|
||||||
|
if(!fsop_FileExist(dol_path))
|
||||||
|
continue;
|
||||||
|
u32 filesize = 0;
|
||||||
|
u8 *buffer = fsop_ReadFile(dol_path, &filesize);
|
||||||
|
char NINversion[21];
|
||||||
|
for(u32 i = 0; i < filesize-60; ++i)
|
||||||
|
{
|
||||||
|
// Nintendont Loader..Built : %s %s..Jan 10 2014.11:21:01
|
||||||
|
if((*(vu32*)(buffer+i+2)) == 0x6e74656e && (*(vu32*)(buffer+i+6)) == 0x646f6e74
|
||||||
|
&& (*(vu32*)(buffer+i+11)) == 0x4c6f6164) //'nten' 'dont' 'Load'
|
||||||
|
{
|
||||||
|
for(int k= 30; k <50; ++k)
|
||||||
|
{
|
||||||
|
if((*(vu32*)(buffer+i+k)) == 0x4A616E20 || (*(vu32*)(buffer+i+k)) == 0x46656220 ||
|
||||||
|
(*(vu32*)(buffer+i+k)) == 0x4D617220 || (*(vu32*)(buffer+i+k)) == 0x41707220 ||
|
||||||
|
(*(vu32*)(buffer+i+k)) == 0x4D617920 || (*(vu32*)(buffer+i+k)) == 0x4A756E20 ||
|
||||||
|
(*(vu32*)(buffer+i+k)) == 0x4A756C20 || (*(vu32*)(buffer+i+k)) == 0x41756720 ||
|
||||||
|
(*(vu32*)(buffer+i+k)) == 0x53657020 || (*(vu32*)(buffer+i+k)) == 0x4F637420 ||
|
||||||
|
(*(vu32*)(buffer+i+k)) == 0x4E6F7620 || (*(vu32*)(buffer+i+k)) == 0x44656320 ) // find Month
|
||||||
|
{
|
||||||
|
for(int j = 0 ; j < 20 ; j++)
|
||||||
|
NINversion[j] = *(u8*)(buffer+i+k+j);
|
||||||
|
|
||||||
|
NINversion[11] = ' '; // replace \0 between year and time with a space.
|
||||||
|
NINversion[20] = 0;
|
||||||
|
struct tm time;
|
||||||
|
strptime(NINversion, "%b %d %Y %H:%M:%S", &time);
|
||||||
|
|
||||||
|
const time_t NINLoaderTime = mktime(&time);
|
||||||
|
const time_t v135time = 1407167999;// v1.135
|
||||||
|
|
||||||
|
if(difftime(NINLoaderTime,v135time) > 0)
|
||||||
|
NIN_cfg_version = 3;
|
||||||
|
else
|
||||||
|
NIN_cfg_version = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(buffer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
NinCfg.Version = NIN_cfg_version;
|
||||||
|
|
||||||
|
if(memcmp("0x474851",gameID,3)==0)
|
||||||
|
NinCfg.MaxPads = 1;
|
||||||
|
else
|
||||||
|
NinCfg.MaxPads = 4;
|
||||||
|
|
||||||
NinCfg.Config |= NIN_CFG_AUTO_BOOT;
|
NinCfg.Config |= NIN_CFG_AUTO_BOOT;
|
||||||
|
|
||||||
if(NinDevice != SD)
|
if(NinDevice != SD)
|
||||||
NinCfg.Config |= NIN_CFG_USB;
|
NinCfg.Config |= NIN_CFG_USB;
|
||||||
|
|
||||||
if(IsOnWiiU() == true)
|
if(IsOnWiiU() == true)
|
||||||
{
|
|
||||||
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
|
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
|
||||||
NinCfg.Config |= NIN_CFG_HID;
|
|
||||||
}
|
videoSetting = 2;
|
||||||
if(videoSetting == 0)
|
if(videoSetting == 2)
|
||||||
NinCfg.VideoMode |= NIN_VID_NONE;
|
|
||||||
else if(videoSetting == 1)
|
|
||||||
NinCfg.VideoMode |= NIN_VID_AUTO;
|
|
||||||
else
|
|
||||||
NinCfg.VideoMode |= NIN_VID_FORCE;
|
NinCfg.VideoMode |= NIN_VID_FORCE;
|
||||||
|
|
||||||
|
if((videomode > 3) && (videomode != 6))
|
||||||
|
NinCfg.Config |= NIN_CFG_FORCE_PROG;
|
||||||
|
|
||||||
|
if(usb_hid)
|
||||||
|
NinCfg.Config |= NIN_CFG_HID;
|
||||||
|
|
||||||
|
if(NIN_Debugger)
|
||||||
|
NinCfg.Config |= NIN_CFG_OSREPORT;
|
||||||
|
|
||||||
|
if(native_ctl)
|
||||||
|
NinCfg.Config |= NIN_CFG_NATIVE_SI;
|
||||||
|
|
||||||
|
if(deflicker)
|
||||||
|
NinCfg.VideoMode |= NIN_VID_FORCE_DF;
|
||||||
|
|
||||||
|
if(screenshot)
|
||||||
|
NinCfg.Config |= NIN_CFG_WIIU_WIDE;
|
||||||
|
|
||||||
if(widescreen)
|
if(widescreen)
|
||||||
NinCfg.Config |= NIN_CFG_FORCE_WIDE;
|
NinCfg.Config |= NIN_CFG_FORCE_WIDE;
|
||||||
|
|
||||||
if(NMM > 0)
|
if(NMM > 0)
|
||||||
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
|
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
|
||||||
|
|
||||||
|
if(NMM > 1)
|
||||||
|
{
|
||||||
|
NinCfg.Config |= NIN_CFG_MC_MULTI;
|
||||||
|
NinCfg.MemCardBlocks = 0x4;//1019 blocks (8MB)
|
||||||
|
}
|
||||||
|
if(CheatPath != NULL && NewCheatPath != NULL && cheats)
|
||||||
|
{
|
||||||
|
const char *ptr = NULL;
|
||||||
|
if(strncasecmp(CheatPath, partition, strlen(partition)) != 0)
|
||||||
|
{
|
||||||
|
fsop_CopyFile(CheatPath, NewCheatPath, NULL, NULL);
|
||||||
|
ptr = strchr(NewCheatPath, '/');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ptr = strchr(CheatPath, '/');
|
||||||
|
snprintf(NinCfg.CheatPath,sizeof(NinCfg.CheatPath),ptr);
|
||||||
|
NinCfg.Config |= NIN_CFG_CHEAT_PATH;
|
||||||
|
}
|
||||||
|
if(cheats)
|
||||||
|
NinCfg.Config |= NIN_CFG_CHEATS;
|
||||||
|
|
||||||
strncpy(NinCfg.GamePath, strchr(game, '/'), 254);
|
strncpy(NinCfg.GamePath, strchr(game, '/'), 254);
|
||||||
if(strstr(NinCfg.GamePath, "boot.bin") != NULL)
|
if(strstr(NinCfg.GamePath, "boot.bin") != NULL)
|
||||||
{
|
{
|
||||||
@ -191,11 +283,50 @@ void Nintendont_SetOptions(const char *game, const char *gameID, u8 NMM, u8 vide
|
|||||||
gprintf("Nintendont Game Path: %s, ID: %08x\n", NinCfg.GamePath, NinCfg.GameID);
|
gprintf("Nintendont Game Path: %s, ID: %08x\n", NinCfg.GamePath, NinCfg.GameID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Nintendont_BootDisc(u8 NMM, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker)
|
||||||
|
{
|
||||||
|
memset(&NinCfg, 0, sizeof(NIN_CFG));
|
||||||
|
NinCfg.Magicbytes = 0x01070CF6;
|
||||||
|
FILE * location = fopen("sd:/nincfg.bin", "r");
|
||||||
|
if(location == NULL)
|
||||||
|
{
|
||||||
|
NinCfg.Config |= NIN_CFG_USB;
|
||||||
|
fclose(location);
|
||||||
|
location = NULL;
|
||||||
|
}
|
||||||
|
NinCfg.Version = NIN_CFG_VERSION;
|
||||||
|
NinCfg.Config |= NIN_CFG_AUTO_BOOT;
|
||||||
|
NinCfg.VideoMode |= NIN_VID_AUTO;
|
||||||
|
|
||||||
|
if(usb_hid)
|
||||||
|
NinCfg.Config |= NIN_CFG_HID;
|
||||||
|
if(NMM == 1)
|
||||||
|
{
|
||||||
|
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
|
||||||
|
NinCfg.MemCardBlocks = 0x2;//251 blocks (2MB)
|
||||||
|
}
|
||||||
|
else if(NMM == 2)
|
||||||
|
{
|
||||||
|
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
|
||||||
|
NinCfg.Config |= NIN_CFG_MC_MULTI;
|
||||||
|
NinCfg.MemCardBlocks = 0x4;//1019 blocks (8MB)
|
||||||
|
|
||||||
|
}
|
||||||
|
if(native_ctl)
|
||||||
|
NinCfg.Config |= NIN_CFG_NATIVE_SI;
|
||||||
|
if(deflicker)
|
||||||
|
NinCfg.VideoMode |= NIN_VID_FORCE_DF;
|
||||||
|
if(widescreen)
|
||||||
|
NinCfg.Config |= NIN_CFG_FORCE_WIDE;
|
||||||
|
snprintf(NinCfg.GamePath,sizeof(NinCfg.GamePath),"di");
|
||||||
|
}
|
||||||
|
|
||||||
void Nintendont_WriteOptions()
|
void Nintendont_WriteOptions()
|
||||||
{
|
{
|
||||||
/* Newer Nintendont versions */
|
/* Newer Nintendont versions */
|
||||||
if(NinArgsboot == true)
|
if(NinArgsboot == true)
|
||||||
{
|
{
|
||||||
|
gprintf("Writing Arguments\n");
|
||||||
AddBootArgument((char*)&NinCfg, sizeof(NIN_CFG));
|
AddBootArgument((char*)&NinCfg, sizeof(NIN_CFG));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -226,6 +357,7 @@ bool Nintendont_Installed()
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Nintendont_GetLoader()
|
bool Nintendont_GetLoader()
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
@ -431,12 +563,15 @@ void GC_SetVideoMode(u8 videomode, u8 videoSetting, u8 loader)
|
|||||||
GXRModeObj *vmode = VIDEO_GetPreferredMode(0);
|
GXRModeObj *vmode = VIDEO_GetPreferredMode(0);
|
||||||
int vmode_reg = 0;
|
int vmode_reg = 0;
|
||||||
|
|
||||||
if((VIDEO_HaveComponentCable() && (CONF_GetProgressiveScan() > 0)) || videomode > 3)
|
if(loader == 2)
|
||||||
|
videoSetting = 2;
|
||||||
|
|
||||||
|
if((VIDEO_HaveComponentCable() && (CONF_GetProgressiveScan() > 0)) || ((videomode > 3) && (videomode != 6)))
|
||||||
sram->flags |= 0x80; //set progressive flag
|
sram->flags |= 0x80; //set progressive flag
|
||||||
else
|
else
|
||||||
sram->flags &= 0x7F; //clear progressive flag
|
sram->flags &= 0x7F; //clear progressive flag
|
||||||
|
|
||||||
if(videomode == 1 || videomode == 3 || videomode == 5)
|
if(videomode == 1 || videomode == 3 || videomode == 5 || videomode == 6 || videomode == 7)
|
||||||
{
|
{
|
||||||
vmode_reg = 1;
|
vmode_reg = 1;
|
||||||
sram->flags |= 0x01; // Set bit 0 to set the video mode to PAL
|
sram->flags |= 0x01; // Set bit 0 to set the video mode to PAL
|
||||||
@ -482,27 +617,51 @@ void GC_SetVideoMode(u8 videomode, u8 videoSetting, u8 loader)
|
|||||||
vmode = &TVEurgb60Hz480IntDf;
|
vmode = &TVEurgb60Hz480IntDf;
|
||||||
vmode_reg = 5;
|
vmode_reg = 5;
|
||||||
}
|
}
|
||||||
else if(videomode == 4 ||videomode == 6)
|
else if(videomode == 4)
|
||||||
{
|
{
|
||||||
if(videoSetting == 2)
|
if(videoSetting == 2)
|
||||||
{
|
{
|
||||||
if(loader == 0)
|
if(loader == 0)
|
||||||
DMLCfg.VideoMode |= DML_VID_FORCE_PROG;
|
DMLCfg.VideoMode |= DML_VID_FORCE_PROG;
|
||||||
else if(loader == 2)
|
else if(loader == 2)
|
||||||
NinCfg.Config |= NIN_CFG_FORCE_PROG;
|
NinCfg.VideoMode |= NIN_VID_FORCE_NTSC;
|
||||||
}
|
}
|
||||||
vmode = &TVNtsc480Prog;
|
vmode = &TVNtsc480IntDf;// shouldn't this be vmode = &TVNtsc480Prog
|
||||||
}
|
}
|
||||||
else if(videomode == 5 || videomode == 7)
|
else if(videomode == 5)
|
||||||
{
|
{
|
||||||
if(videoSetting == 2)
|
if(videoSetting == 2)
|
||||||
{
|
{
|
||||||
if(loader == 0)
|
if(loader == 0)
|
||||||
DMLCfg.VideoMode |= DML_VID_FORCE_PROG;
|
DMLCfg.VideoMode |= DML_VID_FORCE_PROG;
|
||||||
else if(loader == 2)
|
else if(loader == 2)
|
||||||
NinCfg.Config |= NIN_CFG_FORCE_PROG;
|
NinCfg.VideoMode |= NIN_VID_FORCE_PAL60;
|
||||||
}
|
}
|
||||||
vmode = &TVNtsc480Prog;
|
vmode = &TVEurgb60Hz480IntDf;
|
||||||
|
vmode_reg = 5;
|
||||||
|
}
|
||||||
|
else if(videomode == 6)
|
||||||
|
{
|
||||||
|
if(videoSetting == 2)
|
||||||
|
{
|
||||||
|
if(loader == 0)
|
||||||
|
DMLCfg.VideoMode |= DML_VID_FORCE_PAL60;
|
||||||
|
else if(loader == 2)
|
||||||
|
NinCfg.VideoMode |= NIN_VID_FORCE_MPAL;
|
||||||
|
}
|
||||||
|
vmode = &TVEurgb60Hz480IntDf;
|
||||||
|
vmode_reg = 5;
|
||||||
|
}
|
||||||
|
else if(videomode == 7)
|
||||||
|
{
|
||||||
|
if(videoSetting == 2)
|
||||||
|
{
|
||||||
|
if(loader == 0)
|
||||||
|
DMLCfg.VideoMode |= DML_VID_FORCE_PROG;
|
||||||
|
else if(loader == 2)
|
||||||
|
NinCfg.VideoMode |= NIN_VID_FORCE_MPAL;
|
||||||
|
}
|
||||||
|
vmode = &TVEurgb60Hz480IntDf;
|
||||||
vmode_reg = 5;
|
vmode_reg = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,11 +76,14 @@ void DML_New_WriteOptions();
|
|||||||
// Nintendont
|
// Nintendont
|
||||||
#include "nin_cfg.h"
|
#include "nin_cfg.h"
|
||||||
#define NIN_CFG_PATH "nincfg.bin"
|
#define NIN_CFG_PATH "nincfg.bin"
|
||||||
#define NIN_LOADER_PATH "%s:/apps/Nintendont/boot.dol"
|
#define NIN_LOADER_PATH "%s:/apps/nintendont/boot.dol"
|
||||||
|
//const char *NINversionDate(NIN_LOADER_PATH);
|
||||||
|
|
||||||
bool Nintendont_Installed();
|
bool Nintendont_Installed();
|
||||||
bool Nintendont_GetLoader();
|
bool Nintendont_GetLoader();
|
||||||
void Nintendont_SetOptions(const char *game, const char *gameID, u8 NMM, u8 videoSetting, bool widescreen);
|
void Nintendont_BootDisc(u8 NMM, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker);
|
||||||
|
void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath, char *NewCheatPath, const char *partition,
|
||||||
|
bool cheats, u8 NMM, u8 videomode, u8 videoSetting, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker, bool screenshot, bool NIN_Debugger);
|
||||||
void Nintendont_WriteOptions();
|
void Nintendont_WriteOptions();
|
||||||
|
|
||||||
// Devolution
|
// Devolution
|
||||||
|
@ -2,9 +2,13 @@
|
|||||||
#ifndef __COMMON_CONFIG_H__
|
#ifndef __COMMON_CONFIG_H__
|
||||||
#define __COMMON_CONFIG_H__
|
#define __COMMON_CONFIG_H__
|
||||||
|
|
||||||
#define NIN_CFG_VERSION 0x00000002
|
#define NIN_CFG_VERSION 0x00000003
|
||||||
|
#define OLD_NIN_CFG_VERSION 0x00000002
|
||||||
#define NIN_CFG_MAXPAD 4
|
#define NIN_CFG_MAXPAD 4
|
||||||
|
#define MEM_CARD_MAX (5)
|
||||||
|
#define MEM_CARD_CODE(x) (1<<(x+2))
|
||||||
|
#define MEM_CARD_SIZE(x) (1<<(x+19))
|
||||||
|
#define MEM_CARD_BLOCKS(x) ((1<<(x+6))-5)
|
||||||
|
|
||||||
typedef struct NIN_CFG
|
typedef struct NIN_CFG
|
||||||
{
|
{
|
||||||
@ -17,6 +21,7 @@ typedef struct NIN_CFG
|
|||||||
char CheatPath[255];
|
char CheatPath[255];
|
||||||
unsigned int MaxPads;
|
unsigned int MaxPads;
|
||||||
unsigned int GameID;
|
unsigned int GameID;
|
||||||
|
unsigned int MemCardBlocks;
|
||||||
} NIN_CFG;
|
} NIN_CFG;
|
||||||
|
|
||||||
enum ninconfig
|
enum ninconfig
|
||||||
@ -32,6 +37,11 @@ enum ninconfig
|
|||||||
NIN_CFG_HID = (1<<8),
|
NIN_CFG_HID = (1<<8),
|
||||||
NIN_CFG_OSREPORT = (1<<9),
|
NIN_CFG_OSREPORT = (1<<9),
|
||||||
NIN_CFG_USB = (1<<10),
|
NIN_CFG_USB = (1<<10),
|
||||||
|
NIN_CFG_LED = (1<<11),
|
||||||
|
NIN_CFG_LOG = (1<<12),
|
||||||
|
NIN_CFG_MC_MULTI = (1<<13),
|
||||||
|
NIN_CFG_NATIVE_SI = (1<<14),
|
||||||
|
NIN_CFG_WIIU_WIDE = (1<<15),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ninvideomode
|
enum ninvideomode
|
||||||
@ -39,8 +49,9 @@ enum ninvideomode
|
|||||||
NIN_VID_AUTO = (0<<16),
|
NIN_VID_AUTO = (0<<16),
|
||||||
NIN_VID_FORCE = (1<<16),
|
NIN_VID_FORCE = (1<<16),
|
||||||
NIN_VID_NONE = (2<<16),
|
NIN_VID_NONE = (2<<16),
|
||||||
|
NIN_VID_FORCE_DF = (4<<16),
|
||||||
|
|
||||||
NIN_VID_MASK = NIN_VID_AUTO|NIN_VID_FORCE|NIN_VID_NONE,
|
NIN_VID_MASK = NIN_VID_AUTO|NIN_VID_FORCE|NIN_VID_NONE|NIN_VID_FORCE_DF,
|
||||||
|
|
||||||
NIN_VID_FORCE_PAL50 = (1<<0),
|
NIN_VID_FORCE_PAL50 = (1<<0),
|
||||||
NIN_VID_FORCE_PAL60 = (1<<1),
|
NIN_VID_FORCE_PAL60 = (1<<1),
|
||||||
@ -75,7 +86,4 @@ enum VideoModes
|
|||||||
GCVideoModePROG = 3,
|
GCVideoModePROG = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NIN_RAW_MEMCARD_SIZE 2*1024*1024 //2MB
|
|
||||||
#define NIN_MEMCARD_BLOCKS 0x00000010 //251 Blocks
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <ogc/pad.h>
|
#include <ogc/pad.h>
|
||||||
#include "wiiuse/wpad.h"
|
#include "wiiuse/wpad.h"
|
||||||
#include "wupc/wupc.h"
|
#include "wupc/wupc.h"
|
||||||
|
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
|
||||||
|
|
||||||
#include "video.hpp"
|
#include "video.hpp"
|
||||||
#include "FreeTypeGX.h"
|
#include "FreeTypeGX.h"
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "memory/memory.h"
|
#include "memory/memory.h"
|
||||||
#include "wiiuse/wpad.h"
|
#include "wiiuse/wpad.h"
|
||||||
#include "wupc/wupc.h"
|
#include "wupc/wupc.h"
|
||||||
|
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
|
||||||
|
|
||||||
/* Variables */
|
/* Variables */
|
||||||
bool reset = false;
|
bool reset = false;
|
||||||
@ -36,6 +37,7 @@ void Open_Inputs(void)
|
|||||||
PAD_Init();
|
PAD_Init();
|
||||||
WUPC_Init();
|
WUPC_Init();
|
||||||
WPAD_Init();
|
WPAD_Init();
|
||||||
|
DS3_Init();
|
||||||
|
|
||||||
/* Set POWER button callback */
|
/* Set POWER button callback */
|
||||||
WPAD_SetPowerButtonCallback(__Wpad_PowerCallback);
|
WPAD_SetPowerButtonCallback(__Wpad_PowerCallback);
|
||||||
@ -55,6 +57,7 @@ void Close_Inputs(void)
|
|||||||
|
|
||||||
/* Shutdown Wiimote subsystem */
|
/* Shutdown Wiimote subsystem */
|
||||||
WPAD_Shutdown();
|
WPAD_Shutdown();
|
||||||
|
DS3_Cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sys_Exiting(void)
|
bool Sys_Exiting(void)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "network/ftp.h"
|
#include "network/ftp.h"
|
||||||
#include "network/gcard.h"
|
#include "network/gcard.h"
|
||||||
#include "unzip/U8Archive.h"
|
#include "unzip/U8Archive.h"
|
||||||
|
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
|
||||||
// Sounds
|
// Sounds
|
||||||
extern const u8 click_wav[];
|
extern const u8 click_wav[];
|
||||||
extern const u32 click_wav_size;
|
extern const u32 click_wav_size;
|
||||||
@ -246,7 +246,7 @@ void CMenu::init()
|
|||||||
m_allow_random = m_cfg.getBool("GENERAL", "allow_b_on_questionmark", true);
|
m_allow_random = m_cfg.getBool("GENERAL", "allow_b_on_questionmark", true);
|
||||||
m_multisource = m_cfg.getBool("GENERAL", "multisource", false);
|
m_multisource = m_cfg.getBool("GENERAL", "multisource", false);
|
||||||
/* DIOS_MIOS stuff */
|
/* DIOS_MIOS stuff */
|
||||||
if(m_cfg.getBool(GC_DOMAIN, "always_show_button", false))
|
if(m_cfg.getBool(GC_DOMAIN, "always_show_button", true))
|
||||||
{
|
{
|
||||||
gprintf("Force enabling DML view\n");
|
gprintf("Force enabling DML view\n");
|
||||||
m_show_dml = true;
|
m_show_dml = true;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "plugin/plugin.hpp"
|
#include "plugin/plugin.hpp"
|
||||||
#include "wiiuse/wpad.h"
|
#include "wiiuse/wpad.h"
|
||||||
#include "wupc/wupc.h"
|
#include "wupc/wupc.h"
|
||||||
|
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -492,6 +493,15 @@ private:
|
|||||||
s16 m_gameSettingsLblDM_Widescreen;
|
s16 m_gameSettingsLblDM_Widescreen;
|
||||||
s16 m_gameSettingsBtnDM_Widescreen;
|
s16 m_gameSettingsBtnDM_Widescreen;
|
||||||
|
|
||||||
|
s16 m_gameSettingsLblUSB_HID;
|
||||||
|
s16 m_gameSettingsBtnUSB_HID;
|
||||||
|
|
||||||
|
s16 m_gameSettingsLblNATIVE_CTL;
|
||||||
|
s16 m_gameSettingsBtnNATIVE_CTL;
|
||||||
|
|
||||||
|
s16 m_gameSettingsLblDeflicker;
|
||||||
|
s16 m_gameSettingsBtnDeflicker;
|
||||||
|
|
||||||
s16 m_gameSettingsLblGCLoader;
|
s16 m_gameSettingsLblGCLoader;
|
||||||
s16 m_gameSettingsLblGCLoader_Val;
|
s16 m_gameSettingsLblGCLoader_Val;
|
||||||
s16 m_gameSettingsBtnGCLoader_P;
|
s16 m_gameSettingsBtnGCLoader_P;
|
||||||
@ -508,6 +518,8 @@ private:
|
|||||||
s16 m_gameSettingsBtnVipatch;
|
s16 m_gameSettingsBtnVipatch;
|
||||||
s16 m_gameSettingsLblCountryPatch;
|
s16 m_gameSettingsLblCountryPatch;
|
||||||
s16 m_gameSettingsBtnCountryPatch;
|
s16 m_gameSettingsBtnCountryPatch;
|
||||||
|
s16 m_gameSettingsLblPrivateServer;
|
||||||
|
s16 m_gameSettingsBtnPrivateServer;
|
||||||
s16 m_gameSettingsLblManage;
|
s16 m_gameSettingsLblManage;
|
||||||
s16 m_gameSettingsBtnManage;
|
s16 m_gameSettingsBtnManage;
|
||||||
s16 m_gameSettingsLblPatchVidModes;
|
s16 m_gameSettingsLblPatchVidModes;
|
||||||
@ -543,7 +555,9 @@ private:
|
|||||||
s16 m_systemBtnBack;
|
s16 m_systemBtnBack;
|
||||||
s16 m_systemLblTitle;
|
s16 m_systemLblTitle;
|
||||||
s16 m_systemLblVersionTxt;
|
s16 m_systemLblVersionTxt;
|
||||||
|
s16 m_systemLblNINverTxt;
|
||||||
s16 m_systemLblVersion;
|
s16 m_systemLblVersion;
|
||||||
|
s16 m_systemLblNINver;
|
||||||
s16 m_systemLblVersionRev;
|
s16 m_systemLblVersionRev;
|
||||||
s16 m_systemLblUser[4];
|
s16 m_systemLblUser[4];
|
||||||
s16 m_systemBtnDownload;
|
s16 m_systemBtnDownload;
|
||||||
@ -609,6 +623,12 @@ private:
|
|||||||
u8 m_wpadUpDelay;
|
u8 m_wpadUpDelay;
|
||||||
u8 m_wpadADelay;
|
u8 m_wpadADelay;
|
||||||
//u8 m_wpadBDelay;
|
//u8 m_wpadBDelay;
|
||||||
|
u8 m_dpadLeftDelay;
|
||||||
|
u8 m_dpadDownDelay;
|
||||||
|
u8 m_dpadRightDelay;
|
||||||
|
u8 m_dpadUpDelay;
|
||||||
|
u8 m_dpadADelay;
|
||||||
|
u8 m_dpadHDelay;
|
||||||
|
|
||||||
u8 m_padLeftDelay;
|
u8 m_padLeftDelay;
|
||||||
u8 m_padDownDelay;
|
u8 m_padDownDelay;
|
||||||
@ -616,7 +636,7 @@ private:
|
|||||||
u8 m_padUpDelay;
|
u8 m_padUpDelay;
|
||||||
u8 m_padADelay;
|
u8 m_padADelay;
|
||||||
//u8 m_padBDelay;
|
//u8 m_padBDelay;
|
||||||
|
u32 ds3_btnsPressed;
|
||||||
u32 wii_btnsPressed[WPAD_MAX_WIIMOTES];
|
u32 wii_btnsPressed[WPAD_MAX_WIIMOTES];
|
||||||
u32 wii_btnsHeld[WPAD_MAX_WIIMOTES];
|
u32 wii_btnsHeld[WPAD_MAX_WIIMOTES];
|
||||||
bool wBtn_Pressed(int btn, u8 ext);
|
bool wBtn_Pressed(int btn, u8 ext);
|
||||||
@ -627,7 +647,7 @@ private:
|
|||||||
u32 gc_btnsHeld;
|
u32 gc_btnsHeld;
|
||||||
u32 wupc_btnsPressed[WPAD_MAX_WIIMOTES];
|
u32 wupc_btnsPressed[WPAD_MAX_WIIMOTES];
|
||||||
u32 wupc_btnsHeld[WPAD_MAX_WIIMOTES];
|
u32 wupc_btnsHeld[WPAD_MAX_WIIMOTES];
|
||||||
|
bool ds3_btnRepeat(s64 btn);
|
||||||
bool m_show_pointer[WPAD_MAX_WIIMOTES];
|
bool m_show_pointer[WPAD_MAX_WIIMOTES];
|
||||||
float left_stick_angle[WPAD_MAX_WIIMOTES];
|
float left_stick_angle[WPAD_MAX_WIIMOTES];
|
||||||
float left_stick_mag[WPAD_MAX_WIIMOTES];
|
float left_stick_mag[WPAD_MAX_WIIMOTES];
|
||||||
@ -1174,16 +1194,16 @@ private:
|
|||||||
static const SOption _GlobalVideoModes[6];
|
static const SOption _GlobalVideoModes[6];
|
||||||
static const SOption _VideoModes[7];
|
static const SOption _VideoModes[7];
|
||||||
|
|
||||||
static const SOption _GlobalDMLvideoModes[6];
|
static const SOption _GlobalDMLvideoModes[8];
|
||||||
static const SOption _GlobalGClanguages[7];
|
static const SOption _GlobalGClanguages[7];
|
||||||
static const SOption _DMLvideoModes[7];
|
static const SOption _DMLvideoModes[9];
|
||||||
static const SOption _GClanguages[8];
|
static const SOption _GClanguages[8];
|
||||||
|
|
||||||
static const SOption _NandEmu[2];
|
static const SOption _NandEmu[2];
|
||||||
static const SOption _SaveEmu[5];
|
static const SOption _SaveEmu[5];
|
||||||
static const SOption _GlobalSaveEmu[4];
|
static const SOption _GlobalSaveEmu[4];
|
||||||
static const SOption _AspectRatio[3];
|
static const SOption _AspectRatio[3];
|
||||||
static const SOption _NMM[4];
|
static const SOption _NMM[5];
|
||||||
static const SOption _NoDVD[3];
|
static const SOption _NoDVD[3];
|
||||||
static const SOption _GlobalGCLoaders[3];
|
static const SOption _GlobalGCLoaders[3];
|
||||||
static const SOption _GCLoader[4];
|
static const SOption _GCLoader[4];
|
||||||
|
@ -100,7 +100,7 @@ void CMenu::_showConfig3(void)
|
|||||||
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "game_language", 0)), (int)ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1);
|
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "game_language", 0)), (int)ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1);
|
||||||
m_btnMgr.setText(m_config3LblDMLLanguage, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
|
m_btnMgr.setText(m_config3LblDMLLanguage, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
|
||||||
}
|
}
|
||||||
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "default_loader", 0)), (int)ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1);
|
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "default_loader", 2)), (int)ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1);
|
||||||
m_btnMgr.setText(m_config3LblDMLLoader, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
|
m_btnMgr.setText(m_config3LblDMLLoader, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
|
||||||
|
|
||||||
m_btnMgr.setText(m_config3BtnOcarina, m_cfg.getBool(_domainFromView(), "cheat", false) ? _t("on", L"On") : _t("off", L"Off"));
|
m_btnMgr.setText(m_config3BtnOcarina, m_cfg.getBool(_domainFromView(), "cheat", false) ? _t("on", L"On") : _t("off", L"Off"));
|
||||||
@ -145,7 +145,7 @@ int CMenu::_config3(void)
|
|||||||
else if (m_btnMgr.selected(m_config3BtnDMLLoaderP) || m_btnMgr.selected(m_config3BtnDMLLoaderM))
|
else if (m_btnMgr.selected(m_config3BtnDMLLoaderP) || m_btnMgr.selected(m_config3BtnDMLLoaderM))
|
||||||
{
|
{
|
||||||
s8 direction = m_btnMgr.selected(m_config3BtnDMLLoaderP) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_config3BtnDMLLoaderP) ? 1 : -1;
|
||||||
m_cfg.setInt(GC_DOMAIN, "default_loader", (int)loopNum((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 0) + direction, ARRAY_SIZE(CMenu::_GlobalGCLoaders)));
|
m_cfg.setInt(GC_DOMAIN, "default_loader", (int)loopNum((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 2) + direction, ARRAY_SIZE(CMenu::_GlobalGCLoaders)));
|
||||||
_showConfig3();
|
_showConfig3();
|
||||||
}
|
}
|
||||||
else if (m_btnMgr.selected(m_config3BtnOcarina))
|
else if (m_btnMgr.selected(m_config3BtnOcarina))
|
||||||
@ -220,8 +220,8 @@ void CMenu::_textConfig3(void)
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_config3LblGameVideo, _t("cfgb3", L"Default video mode"));
|
m_btnMgr.setText(m_config3LblGameVideo, _t("cfgb3", L"Default video mode"));
|
||||||
m_btnMgr.setText(m_config3LblGameLanguage, _t("cfgb4", L"Default game language"));
|
m_btnMgr.setText(m_config3LblGameLanguage, _t("cfgb4", L"Default game language"));
|
||||||
m_btnMgr.setText(m_config3LblDMLGameVideo, _t("cfgb5", L"Default DML video mode"));
|
m_btnMgr.setText(m_config3LblDMLGameVideo, _t("cfgb5", L"Default GC video mode"));
|
||||||
m_btnMgr.setText(m_config3LblDMLGameLanguage, _t("cfgb6", L"Default DML game language"));
|
m_btnMgr.setText(m_config3LblDMLGameLanguage, _t("cfgb6", L"Default GC game language"));
|
||||||
m_btnMgr.setText(m_config3LblDMLGameLoader, _t("cfgb2", L"Default GC game loader"));
|
m_btnMgr.setText(m_config3LblDMLGameLoader, _t("cfgb2", L"Default GC game loader"));
|
||||||
m_btnMgr.setText(m_config3LblOcarina, _t("cfgb1", L"Ocarina"));
|
m_btnMgr.setText(m_config3LblOcarina, _t("cfgb1", L"Ocarina"));
|
||||||
}
|
}
|
||||||
|
@ -72,12 +72,20 @@ void CMenu::_hideGameSettings(bool instant)
|
|||||||
m_btnMgr.hide(m_gameSettingsBtnLaunchNK, instant);
|
m_btnMgr.hide(m_gameSettingsBtnLaunchNK, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsLblOcarina, instant);
|
m_btnMgr.hide(m_gameSettingsLblOcarina, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnOcarina, instant);
|
m_btnMgr.hide(m_gameSettingsBtnOcarina, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblUSB_HID, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnUSB_HID, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblNATIVE_CTL, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnNATIVE_CTL, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblDeflicker, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnDeflicker, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsLblCheat, instant);
|
m_btnMgr.hide(m_gameSettingsLblCheat, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnCheat, instant);
|
m_btnMgr.hide(m_gameSettingsBtnCheat, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsLblVipatch, instant);
|
m_btnMgr.hide(m_gameSettingsLblVipatch, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnVipatch, instant);
|
m_btnMgr.hide(m_gameSettingsBtnVipatch, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsLblCountryPatch, instant);
|
m_btnMgr.hide(m_gameSettingsLblCountryPatch, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnCountryPatch, instant);
|
m_btnMgr.hide(m_gameSettingsBtnCountryPatch, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblPrivateServer, instant);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnPrivateServer, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsLblManage, instant);
|
m_btnMgr.hide(m_gameSettingsLblManage, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnManage, instant);
|
m_btnMgr.hide(m_gameSettingsBtnManage, instant);
|
||||||
m_btnMgr.hide(m_gameSettingsLblPatchVidModes, instant);
|
m_btnMgr.hide(m_gameSettingsLblPatchVidModes, instant);
|
||||||
@ -143,7 +151,7 @@ void CMenu::_showGameSettings(void)
|
|||||||
m_btnMgr.show(m_gameSettingsBtnBack);
|
m_btnMgr.show(m_gameSettingsBtnBack);
|
||||||
m_btnMgr.show(m_gameSettingsLblTitle);
|
m_btnMgr.show(m_gameSettingsLblTitle);
|
||||||
|
|
||||||
if(CoverFlow.getHdr()->type == TYPE_WII_GAME && _checkSave(string((const char *)CoverFlow.getHdr()->id), false))
|
if(CoverFlow.getHdr()->type == TYPE_WII_GAME)
|
||||||
g_numGCfPages = 5;
|
g_numGCfPages = 5;
|
||||||
else
|
else
|
||||||
g_numGCfPages = 4;
|
g_numGCfPages = 4;
|
||||||
@ -228,6 +236,7 @@ void CMenu::_showGameSettings(void)
|
|||||||
m_btnMgr.show(m_gameSettingsLblDebuggerV);
|
m_btnMgr.show(m_gameSettingsLblDebuggerV);
|
||||||
m_btnMgr.show(m_gameSettingsBtnDebuggerP);
|
m_btnMgr.show(m_gameSettingsBtnDebuggerP);
|
||||||
m_btnMgr.show(m_gameSettingsBtnDebuggerM);
|
m_btnMgr.show(m_gameSettingsBtnDebuggerM);
|
||||||
|
|
||||||
if(CoverFlow.getHdr()->type != TYPE_GC_GAME)
|
if(CoverFlow.getHdr()->type != TYPE_GC_GAME)
|
||||||
{
|
{
|
||||||
m_btnMgr.show(m_gameSettingsLblHooktype);
|
m_btnMgr.show(m_gameSettingsLblHooktype);
|
||||||
@ -235,6 +244,12 @@ void CMenu::_showGameSettings(void)
|
|||||||
m_btnMgr.show(m_gameSettingsBtnHooktypeM);
|
m_btnMgr.show(m_gameSettingsBtnHooktypeM);
|
||||||
m_btnMgr.show(m_gameSettingsBtnHooktypeP);
|
m_btnMgr.show(m_gameSettingsBtnHooktypeP);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_btnMgr.show(m_gameSettingsLblDeflicker);
|
||||||
|
m_btnMgr.show(m_gameSettingsBtnDeflicker);
|
||||||
|
}
|
||||||
|
|
||||||
m_btnMgr.show(m_gameSettingsLblOcarina);
|
m_btnMgr.show(m_gameSettingsLblOcarina);
|
||||||
m_btnMgr.show(m_gameSettingsBtnOcarina);
|
m_btnMgr.show(m_gameSettingsBtnOcarina);
|
||||||
|
|
||||||
@ -247,13 +262,15 @@ void CMenu::_showGameSettings(void)
|
|||||||
m_btnMgr.hide(m_gameSettingsLblDebuggerV);
|
m_btnMgr.hide(m_gameSettingsLblDebuggerV);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnDebuggerP);
|
m_btnMgr.hide(m_gameSettingsBtnDebuggerP);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnDebuggerM);
|
m_btnMgr.hide(m_gameSettingsBtnDebuggerM);
|
||||||
if(CoverFlow.getHdr()->type != TYPE_GC_GAME)
|
|
||||||
{
|
m_btnMgr.hide(m_gameSettingsLblHooktype);
|
||||||
m_btnMgr.hide(m_gameSettingsLblHooktype);
|
m_btnMgr.hide(m_gameSettingsLblHooktypeVal);
|
||||||
m_btnMgr.hide(m_gameSettingsLblHooktypeVal);
|
m_btnMgr.hide(m_gameSettingsBtnHooktypeM);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnHooktypeM);
|
m_btnMgr.hide(m_gameSettingsBtnHooktypeP);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnHooktypeP);
|
|
||||||
}
|
m_btnMgr.hide(m_gameSettingsLblDeflicker);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnDeflicker);
|
||||||
|
|
||||||
m_btnMgr.hide(m_gameSettingsLblOcarina);
|
m_btnMgr.hide(m_gameSettingsLblOcarina);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnOcarina);
|
m_btnMgr.hide(m_gameSettingsBtnOcarina);
|
||||||
|
|
||||||
@ -371,6 +388,7 @@ void CMenu::_showGameSettings(void)
|
|||||||
m_btnMgr.show(m_gameSettingsLblEmulation);
|
m_btnMgr.show(m_gameSettingsLblEmulation);
|
||||||
m_btnMgr.show(m_gameSettingsBtnEmulationP);
|
m_btnMgr.show(m_gameSettingsBtnEmulationP);
|
||||||
m_btnMgr.show(m_gameSettingsBtnEmulationM);
|
m_btnMgr.show(m_gameSettingsBtnEmulationM);
|
||||||
|
|
||||||
if(_checkSave(string((const char *)CoverFlow.getHdr()->id), true))
|
if(_checkSave(string((const char *)CoverFlow.getHdr()->id), true))
|
||||||
{
|
{
|
||||||
m_btnMgr.show(m_gameSettingsLblExtractSave);
|
m_btnMgr.show(m_gameSettingsLblExtractSave);
|
||||||
@ -381,6 +399,12 @@ void CMenu::_showGameSettings(void)
|
|||||||
{
|
{
|
||||||
m_btnMgr.show(m_gameSettingsLblScreenshot);
|
m_btnMgr.show(m_gameSettingsLblScreenshot);
|
||||||
m_btnMgr.show(m_gameSettingsBtnScreenshot);
|
m_btnMgr.show(m_gameSettingsBtnScreenshot);
|
||||||
|
|
||||||
|
m_btnMgr.show(m_gameSettingsLblUSB_HID);
|
||||||
|
m_btnMgr.show(m_gameSettingsBtnUSB_HID);
|
||||||
|
|
||||||
|
m_btnMgr.show(m_gameSettingsLblNATIVE_CTL);
|
||||||
|
m_btnMgr.show(m_gameSettingsBtnNATIVE_CTL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -426,16 +450,28 @@ void CMenu::_showGameSettings(void)
|
|||||||
}
|
}
|
||||||
m_btnMgr.hide(m_gameSettingsLblLED);
|
m_btnMgr.hide(m_gameSettingsLblLED);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnLED);
|
m_btnMgr.hide(m_gameSettingsBtnLED);
|
||||||
|
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblUSB_HID);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnUSB_HID);
|
||||||
|
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblNATIVE_CTL);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnNATIVE_CTL);
|
||||||
}
|
}
|
||||||
if(m_gameSettingsPage == 5)
|
if(m_gameSettingsPage == 5)
|
||||||
{
|
{
|
||||||
m_btnMgr.show(m_gameSettingsLblFlashSave);
|
m_btnMgr.show(m_gameSettingsLblFlashSave);
|
||||||
m_btnMgr.show(m_gameSettingsBtnFlashSave);
|
m_btnMgr.show(m_gameSettingsBtnFlashSave);
|
||||||
|
|
||||||
|
m_btnMgr.show(m_gameSettingsLblPrivateServer);
|
||||||
|
m_btnMgr.show(m_gameSettingsBtnPrivateServer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_btnMgr.hide(m_gameSettingsLblFlashSave);
|
m_btnMgr.hide(m_gameSettingsLblFlashSave);
|
||||||
m_btnMgr.hide(m_gameSettingsBtnFlashSave);
|
m_btnMgr.hide(m_gameSettingsBtnFlashSave);
|
||||||
|
|
||||||
|
m_btnMgr.hide(m_gameSettingsLblPrivateServer);
|
||||||
|
m_btnMgr.hide(m_gameSettingsBtnPrivateServer);
|
||||||
}
|
}
|
||||||
u32 i = 0;
|
u32 i = 0;
|
||||||
for(i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i)
|
for(i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i)
|
||||||
@ -451,9 +487,12 @@ void CMenu::_showGameSettings(void)
|
|||||||
m_btnMgr.setText(m_gameSettingsBtnLED, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnLED, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0)));
|
||||||
if(CoverFlow.getHdr()->type == TYPE_GC_GAME)
|
if(CoverFlow.getHdr()->type == TYPE_GC_GAME)
|
||||||
{
|
{
|
||||||
m_btnMgr.setText(m_gameSettingsBtnDM_Widescreen, _optBoolToString(m_gcfg2.getOptBool(id, "dm_widescreen", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnDM_Widescreen, _optBoolToString(m_gcfg2.getOptBool(id, "dm_widescreen", m_cfg.getBool(GC_DOMAIN, "dm_widescreen", 0))));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnDevoMemcardEmu, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnDevoMemcardEmu, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 0)));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnScreenshot, _optBoolToString(m_gcfg2.getOptBool(id, "screenshot", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnScreenshot, _optBoolToString(m_gcfg2.getOptBool(id, "screenshot", m_cfg.getBool(GC_DOMAIN, "screenshot", 0))));
|
||||||
|
m_btnMgr.setText(m_gameSettingsBtnUSB_HID, _optBoolToString(m_gcfg2.getOptBool(id, "USB_HID", m_cfg.getBool(GC_DOMAIN, "USB_HID", 0))));
|
||||||
|
m_btnMgr.setText(m_gameSettingsBtnNATIVE_CTL, _optBoolToString(m_gcfg2.getOptBool(id, "NATIVE_CTL", m_cfg.getBool(GC_DOMAIN, "NATIVE_CTL", 0))));
|
||||||
|
m_btnMgr.setText(m_gameSettingsBtnDeflicker, _optBoolToString(m_gcfg2.getOptBool(id, "Deflicker", m_cfg.getBool(GC_DOMAIN, "Deflicker", 0))));
|
||||||
i = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
|
i = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
|
||||||
m_btnMgr.setText(m_gameSettingsLblDMLVideo, _t(CMenu::_DMLvideoModes[i].id, CMenu::_DMLvideoModes[i].text));
|
m_btnMgr.setText(m_gameSettingsLblDMLVideo, _t(CMenu::_DMLvideoModes[i].id, CMenu::_DMLvideoModes[i].text));
|
||||||
i = min((u32)m_gcfg2.getInt(id, "gc_language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
|
i = min((u32)m_gcfg2.getInt(id, "gc_language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
|
||||||
@ -469,6 +508,7 @@ void CMenu::_showGameSettings(void)
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0)));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0)));
|
||||||
|
m_btnMgr.setText(m_gameSettingsBtnPrivateServer, _optBoolToString(m_gcfg2.getOptBool(id, "private_server", m_cfg.getBool(WII_DOMAIN, "private_server", 0))));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnIOSreloadBlock, _optBoolToString(m_gcfg2.getOptBool(id, "reload_block", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnIOSreloadBlock, _optBoolToString(m_gcfg2.getOptBool(id, "reload_block", 0)));
|
||||||
i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
||||||
m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text));
|
m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text));
|
||||||
@ -477,7 +517,7 @@ void CMenu::_showGameSettings(void)
|
|||||||
i = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u);
|
i = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u);
|
||||||
m_btnMgr.setText(m_gameSettingsLblAspectRatioVal, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text));
|
m_btnMgr.setText(m_gameSettingsLblAspectRatioVal, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnCustom, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnCustom, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0)));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", m_cfg.getBool(CHANNEL_DOMAIN, "useneek", 0))));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnApploader, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0)));
|
m_btnMgr.setText(m_gameSettingsBtnApploader, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,7 +664,7 @@ void CMenu::_gameSettings(void)
|
|||||||
else if(m_btnMgr.selected(m_gameSettingsBtnNMM_P) || m_btnMgr.selected(m_gameSettingsBtnNMM_M))
|
else if(m_btnMgr.selected(m_gameSettingsBtnNMM_P) || m_btnMgr.selected(m_gameSettingsBtnNMM_M))
|
||||||
{
|
{
|
||||||
s8 direction = m_btnMgr.selected(m_gameSettingsBtnNMM_P) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_gameSettingsBtnNMM_P) ? 1 : -1;
|
||||||
m_gcfg2.setInt(id, "dml_nmm", (int)loopNum((u32)m_gcfg2.getInt(id, "dml_nmm", 0) + direction, ARRAY_SIZE(CMenu::_NMM)));
|
m_gcfg2.setInt(id, "dml_nmm", (int)loopNum((u32)m_gcfg2.getInt(id, "dml_nmm", 2) + direction, ARRAY_SIZE(CMenu::_NMM)));
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameSettingsBtnNoDVD_P) || m_btnMgr.selected(m_gameSettingsBtnNoDVD_M))
|
else if(m_btnMgr.selected(m_gameSettingsBtnNoDVD_P) || m_btnMgr.selected(m_gameSettingsBtnNoDVD_M))
|
||||||
@ -710,11 +750,31 @@ void CMenu::_gameSettings(void)
|
|||||||
m_gcfg2.setBool(id, "led", !m_gcfg2.getBool(id, "led", 0));
|
m_gcfg2.setBool(id, "led", !m_gcfg2.getBool(id, "led", 0));
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
}
|
}
|
||||||
|
else if(m_btnMgr.selected(m_gameSettingsBtnNATIVE_CTL))
|
||||||
|
{
|
||||||
|
m_gcfg2.setBool(id, "NATIVE_CTL", !m_gcfg2.getBool(id, "NATIVE_CTL", 0));
|
||||||
|
_showGameSettings();
|
||||||
|
}
|
||||||
|
else if(m_btnMgr.selected(m_gameSettingsBtnDeflicker))
|
||||||
|
{
|
||||||
|
m_gcfg2.setBool(id, "Deflicker", !m_gcfg2.getBool(id, "Deflicker", 0));
|
||||||
|
_showGameSettings();
|
||||||
|
}
|
||||||
else if(m_btnMgr.selected(m_gameSettingsBtnScreenshot))
|
else if(m_btnMgr.selected(m_gameSettingsBtnScreenshot))
|
||||||
{
|
{
|
||||||
m_gcfg2.setBool(id, "screenshot", !m_gcfg2.getBool(id, "screenshot", 0));
|
m_gcfg2.setBool(id, "screenshot", !m_gcfg2.getBool(id, "screenshot", 0));
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
}
|
}
|
||||||
|
else if(m_btnMgr.selected(m_gameSettingsBtnUSB_HID))
|
||||||
|
{
|
||||||
|
m_gcfg2.setBool(id, "USB_HID", !m_gcfg2.getBool(id, "USB_HID", 0));
|
||||||
|
_showGameSettings();
|
||||||
|
}
|
||||||
|
else if(m_btnMgr.selected(m_gameSettingsBtnPrivateServer))
|
||||||
|
{
|
||||||
|
m_gcfg2.setBool(id, "private_server", !m_gcfg2.getBool(id, "private_server", 0));
|
||||||
|
_showGameSettings();
|
||||||
|
}
|
||||||
else if(m_btnMgr.selected(m_gameSettingsBtnCategoryMain) && !m_locked)
|
else if(m_btnMgr.selected(m_gameSettingsBtnCategoryMain) && !m_locked)
|
||||||
{
|
{
|
||||||
_hideGameSettings();
|
_hideGameSettings();
|
||||||
@ -786,6 +846,9 @@ void CMenu::_initGameSettingsMenu()
|
|||||||
m_gameSettingsBtnHooktypeM = _addPicButton("GAME_SETTINGS/HOOKTYPE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
|
m_gameSettingsBtnHooktypeM = _addPicButton("GAME_SETTINGS/HOOKTYPE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
|
||||||
m_gameSettingsBtnHooktypeP = _addPicButton("GAME_SETTINGS/HOOKTYPE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
|
m_gameSettingsBtnHooktypeP = _addPicButton("GAME_SETTINGS/HOOKTYPE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
|
||||||
|
|
||||||
|
m_gameSettingsLblDeflicker = _addLabel("GAME_SETTINGS/DEFLICKER", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
|
m_gameSettingsBtnDeflicker = _addButton("GAME_SETTINGS/DEFLICKER_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
m_gameSettingsLblOcarina = _addLabel("GAME_SETTINGS/OCARINA", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
m_gameSettingsLblOcarina = _addLabel("GAME_SETTINGS/OCARINA", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
m_gameSettingsBtnOcarina = _addButton("GAME_SETTINGS/OCARINA_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
m_gameSettingsBtnOcarina = _addButton("GAME_SETTINGS/OCARINA_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
@ -860,10 +923,20 @@ void CMenu::_initGameSettingsMenu()
|
|||||||
m_gameSettingsLblLED = _addLabel("GAME_SETTINGS/LED", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
m_gameSettingsLblLED = _addLabel("GAME_SETTINGS/LED", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
m_gameSettingsBtnLED = _addButton("GAME_SETTINGS/LED_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
m_gameSettingsBtnLED = _addButton("GAME_SETTINGS/LED_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
|
m_gameSettingsLblUSB_HID = _addLabel("GAME_SETTINGS/USB_HID", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
|
m_gameSettingsBtnUSB_HID = _addButton("GAME_SETTINGS/USB_HID_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
|
m_gameSettingsLblNATIVE_CTL = _addLabel("GAME_SETTINGS/NATIVE_CTL", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
|
m_gameSettingsBtnNATIVE_CTL = _addButton("GAME_SETTINGS/NATIVE_CTL_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
//Page 5
|
//Page 5
|
||||||
m_gameSettingsLblFlashSave = _addLabel("GAME_SETTINGS/FLASH_SAVE", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
m_gameSettingsLblFlashSave = _addLabel("GAME_SETTINGS/FLASH_SAVE", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
m_gameSettingsBtnFlashSave = _addButton("GAME_SETTINGS/FLASH_SAVE_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
m_gameSettingsBtnFlashSave = _addButton("GAME_SETTINGS/FLASH_SAVE_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
|
m_gameSettingsLblPrivateServer = _addLabel("GAME_SETTINGS/PRIVATE_SERVER", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
|
m_gameSettingsBtnPrivateServer = _addButton("GAME_SETTINGS/PRIVATE_SERVER_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||||
|
|
||||||
|
|
||||||
//Footer
|
//Footer
|
||||||
m_gameSettingsLblPage = _addLabel("GAME_SETTINGS/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
m_gameSettingsLblPage = _addLabel("GAME_SETTINGS/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||||
m_gameSettingsBtnPageM = _addPicButton("GAME_SETTINGS/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
|
m_gameSettingsBtnPageM = _addPicButton("GAME_SETTINGS/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
|
||||||
@ -908,6 +981,9 @@ void CMenu::_initGameSettingsMenu()
|
|||||||
_setHideAnim(m_gameSettingsLblCountryPatch, "GAME_SETTINGS/COUNTRY_PATCH", 50, 0, -2.f, 0.f);
|
_setHideAnim(m_gameSettingsLblCountryPatch, "GAME_SETTINGS/COUNTRY_PATCH", 50, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_gameSettingsBtnCountryPatch, "GAME_SETTINGS/COUNTRY_PATCH_BTN", -50, 0, 1.f, 0.f);
|
_setHideAnim(m_gameSettingsBtnCountryPatch, "GAME_SETTINGS/COUNTRY_PATCH_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
|
_setHideAnim(m_gameSettingsLblPrivateServer, "GAME_SETTINGS/PRIVATE_SERVER", 50, 0, -2.f, 0.f);
|
||||||
|
_setHideAnim(m_gameSettingsBtnPrivateServer, "GAME_SETTINGS/PRIVATE_SERVER_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
_setHideAnim(m_gameSettingsLblVipatch, "GAME_SETTINGS/VIPATCH", 50, 0, -2.f, 0.f);
|
_setHideAnim(m_gameSettingsLblVipatch, "GAME_SETTINGS/VIPATCH", 50, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_gameSettingsBtnVipatch, "GAME_SETTINGS/VIPATCH_BTN", -50, 0, 1.f, 0.f);
|
_setHideAnim(m_gameSettingsBtnVipatch, "GAME_SETTINGS/VIPATCH_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
@ -935,6 +1011,15 @@ void CMenu::_initGameSettingsMenu()
|
|||||||
_setHideAnim(m_gameSettingsLblLED, "GAME_SETTINGS/LED", 50, 0, -2.f, 0.f);
|
_setHideAnim(m_gameSettingsLblLED, "GAME_SETTINGS/LED", 50, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_gameSettingsBtnLED, "GAME_SETTINGS/LED_BTN", -50, 0, 1.f, 0.f);
|
_setHideAnim(m_gameSettingsBtnLED, "GAME_SETTINGS/LED_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
|
_setHideAnim(m_gameSettingsLblUSB_HID, "GAME_SETTINGS/USB_HID", 50, 0, -2.f, 0.f);
|
||||||
|
_setHideAnim(m_gameSettingsBtnUSB_HID, "GAME_SETTINGS/USB_HID_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
|
_setHideAnim(m_gameSettingsLblNATIVE_CTL, "GAME_SETTINGS/NATIVE_CTL", 50, 0, -2.f, 0.f);
|
||||||
|
_setHideAnim(m_gameSettingsBtnNATIVE_CTL, "GAME_SETTINGS/NATIVE_CTL_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
|
_setHideAnim(m_gameSettingsLblDeflicker, "GAME_SETTINGS/DEFLICKER", 50, 0, -2.f, 0.f);
|
||||||
|
_setHideAnim(m_gameSettingsBtnDeflicker, "GAME_SETTINGS/DEFLICKER_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
_setHideAnim(m_gameSettingsLblScreenshot, "GAME_SETTINGS/SCREENSHOT", 50, 0, -2.f, 0.f);
|
_setHideAnim(m_gameSettingsLblScreenshot, "GAME_SETTINGS/SCREENSHOT", 50, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_gameSettingsBtnScreenshot, "GAME_SETTINGS/SCREENSHOT_BTN", -50, 0, 1.f, 0.f);
|
_setHideAnim(m_gameSettingsBtnScreenshot, "GAME_SETTINGS/SCREENSHOT_BTN", -50, 0, 1.f, 0.f);
|
||||||
|
|
||||||
@ -1026,7 +1111,14 @@ void CMenu::_textGameSettings(void)
|
|||||||
m_btnMgr.setText(m_gameSettingsLblDM_Widescreen, _t("cfgg36", L"Widescreen Patch"));
|
m_btnMgr.setText(m_gameSettingsLblDM_Widescreen, _t("cfgg36", L"Widescreen Patch"));
|
||||||
m_btnMgr.setText(m_gameSettingsLblApploader, _t("cfgg37", L"Boot Apploader"));
|
m_btnMgr.setText(m_gameSettingsLblApploader, _t("cfgg37", L"Boot Apploader"));
|
||||||
m_btnMgr.setText(m_gameSettingsLblLED, _t("cfgg38", L"Activity LED"));
|
m_btnMgr.setText(m_gameSettingsLblLED, _t("cfgg38", L"Activity LED"));
|
||||||
m_btnMgr.setText(m_gameSettingsLblScreenshot, _t("cfgg39", L"DM Screenshot Feature"));
|
if(IsOnWiiU() == true)
|
||||||
|
m_btnMgr.setText(m_gameSettingsLblScreenshot, _t("cfgg39", L"WiiU Widescreen"));
|
||||||
|
else
|
||||||
|
m_btnMgr.setText(m_gameSettingsLblScreenshot, _t("cfgg39", L"DiosMios ScreenShot"));
|
||||||
m_btnMgr.setText(m_gameSettingsLblManage, _t("cfgg40", L"Manage Cover and Banner"));
|
m_btnMgr.setText(m_gameSettingsLblManage, _t("cfgg40", L"Manage Cover and Banner"));
|
||||||
m_btnMgr.setText(m_gameSettingsBtnManage, _t("cfgg41", L"Manage"));
|
m_btnMgr.setText(m_gameSettingsBtnManage, _t("cfgg41", L"Manage"));
|
||||||
|
m_btnMgr.setText(m_gameSettingsLblUSB_HID, _t("cfgg42", L"Disable HDD Ping"));
|
||||||
|
m_btnMgr.setText(m_gameSettingsLblNATIVE_CTL, _t("cfgg43", L"NATIVE Control"));
|
||||||
|
m_btnMgr.setText(m_gameSettingsLblDeflicker, _t("cfgg44", L"Video Deflicker"));
|
||||||
|
m_btnMgr.setText(m_gameSettingsLblPrivateServer, _t("cfgg45", L"Private Server"));
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ int CMenu::_configScreen(void)
|
|||||||
change = _configCommon();
|
change = _configCommon();
|
||||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||||
break;
|
break;
|
||||||
if (BTN_A_REPEAT)
|
if (BTN_A_REPEAT || BTN_A_PRESSED)
|
||||||
{
|
{
|
||||||
if (m_btnMgr.selected(m_configScreenBtnTVWidthP) || m_btnMgr.selected(m_configScreenBtnTVWidthM)
|
if (m_btnMgr.selected(m_configScreenBtnTVWidthP) || m_btnMgr.selected(m_configScreenBtnTVWidthM)
|
||||||
|| m_btnMgr.selected(m_configScreenBtnTVHeightP) || m_btnMgr.selected(m_configScreenBtnTVHeightM)
|
|| m_btnMgr.selected(m_configScreenBtnTVHeightP) || m_btnMgr.selected(m_configScreenBtnTVHeightM)
|
||||||
|
@ -126,9 +126,9 @@ void CMenu::_CfgSrc(void)
|
|||||||
break;
|
break;
|
||||||
else if (m_btnMgr.selected(m_cfgsrcBtnEnableSM))
|
else if (m_btnMgr.selected(m_cfgsrcBtnEnableSM))
|
||||||
{
|
{
|
||||||
m_cfg.setBool("GENERAL", "use_source", !m_cfg.getBool("GENERAL", "use_source", false));
|
m_cfg.setBool("GENERAL", "use_source", !m_cfg.getBool("GENERAL", "use_source", true));
|
||||||
m_btnMgr.setText(m_cfgsrcBtnEnableSM, m_cfg.getBool("GENERAL", "use_source", false) ? _t("on", L"On") : _t("off", L"Off"));
|
m_btnMgr.setText(m_cfgsrcBtnEnableSM, m_cfg.getBool("GENERAL", "use_source", true) ? _t("on", L"On") : _t("off", L"Off"));
|
||||||
m_use_source = m_cfg.getBool("GENERAL", "use_source", false);
|
m_use_source = m_cfg.getBool("GENERAL", "use_source", true);
|
||||||
}
|
}
|
||||||
else if (m_btnMgr.selected(m_cfgsrcBtnSourceOnBoot))
|
else if (m_btnMgr.selected(m_cfgsrcBtnSourceOnBoot))
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ int CMenu::_configSnd(void)
|
|||||||
change = _configCommon();
|
change = _configCommon();
|
||||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||||
break;
|
break;
|
||||||
if (BTN_A_REPEAT)
|
if (BTN_A_REPEAT || BTN_A_PRESSED)
|
||||||
{
|
{
|
||||||
if (m_btnMgr.selected(m_configSndBtnBnrVolP))
|
if (m_btnMgr.selected(m_configSndBtnBnrVolP))
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
#define TITLES_URL "http://www.gametdb.com/titles.txt?LANG=%s"
|
#define TITLES_URL "http://www.gametdb.com/titles.txt?LANG=%s"
|
||||||
#define GAMETDB_URL "http://www.gametdb.com/wiitdb.zip?LANG=%s&FALLBACK=TRUE&WIIWARE=TRUE&GAMECUBE=TRUE"
|
#define GAMETDB_URL "http://www.gametdb.com/wiitdb.zip?LANG=%s&FALLBACK=TRUE&WIIWARE=TRUE&GAMECUBE=TRUE"
|
||||||
#define UPDATE_URL_VERSION "http://dl.dropbox.com/u/25620767/WiiflowMod/versions.txt"
|
#define UPDATE_URL_VERSION "http://nintendont.gxarena.com/banners/versions.txt"
|
||||||
#define CUSTOM_BANNER_URL "http://dl.dropboxusercontent.com/u/101209384/{gameid}.bnr"
|
#define CUSTOM_BANNER_URL "http://nintendont.gxarena.com/banners/{gameid}.bnr"
|
||||||
|
|
||||||
static const char FMT_BPIC_URL[] = "http://art.gametdb.com/{console}/coverfullHQ/{loc}/{gameid}.png"\
|
static const char FMT_BPIC_URL[] = "http://art.gametdb.com/{console}/coverfullHQ/{loc}/{gameid}.png"\
|
||||||
"|http://art.gametdb.com/{console}/coverfull/{loc}/{gameid}.png";
|
"|http://art.gametdb.com/{console}/coverfull/{loc}/{gameid}.png";
|
||||||
@ -1696,7 +1696,7 @@ s8 CMenu::_versionTxtDownloader() // code to download new version txt file
|
|||||||
m_thrdStep = 0.2f;
|
m_thrdStep = 0.2f;
|
||||||
m_thrdStepLen = 0.9f - 0.2f;
|
m_thrdStepLen = 0.9f - 0.2f;
|
||||||
gprintf("TXT update URL: %s\n\n", m_cfg.getString("GENERAL", "updatetxturl", UPDATE_URL_VERSION).c_str());
|
gprintf("TXT update URL: %s\n\n", m_cfg.getString("GENERAL", "updatetxturl", UPDATE_URL_VERSION).c_str());
|
||||||
download = downloadfile(buffer, bufferSize, m_cfg.getString("GENERAL", "updatetxturl", UPDATE_URL_VERSION).c_str(),CMenu::_downloadProgress, this);
|
download = downloadfile(buffer, bufferSize, ("http://nintendont.gxarena.com/banners/versions.txt"),CMenu::_downloadProgress, this);
|
||||||
if (download.data == 0 || download.size < 19)
|
if (download.data == 0 || download.size < 19)
|
||||||
{
|
{
|
||||||
LWP_MutexLock(m_mutex);
|
LWP_MutexLock(m_mutex);
|
||||||
@ -1788,7 +1788,8 @@ s8 CMenu::_versionDownloader() // code to download new version
|
|||||||
}
|
}
|
||||||
filestr.close();
|
filestr.close();
|
||||||
|
|
||||||
u32 bufferSize = max(m_app_update_size, m_data_update_size); // Buffer for size of the biggest file.
|
//u32 bufferSize = max(m_app_update_size, m_data_update_size); // Buffer for size of the biggest file.
|
||||||
|
u32 bufferSize = 0x400000; /* 4mb max */
|
||||||
u8 *buffer = (u8*)MEM2_alloc(bufferSize);
|
u8 *buffer = (u8*)MEM2_alloc(bufferSize);
|
||||||
if(buffer == NULL)
|
if(buffer == NULL)
|
||||||
{
|
{
|
||||||
@ -1826,7 +1827,7 @@ s8 CMenu::_versionDownloader() // code to download new version
|
|||||||
gprintf("Data Update URL: %s\n", m_data_update_url);
|
gprintf("Data Update URL: %s\n", m_data_update_url);
|
||||||
|
|
||||||
download = downloadfile(buffer, bufferSize, m_app_update_url, CMenu::_downloadProgress, this);
|
download = downloadfile(buffer, bufferSize, m_app_update_url, CMenu::_downloadProgress, this);
|
||||||
if (download.data == 0 || download.size < m_app_update_size)
|
if (download.data == 0)// || download.size < m_app_update_size)
|
||||||
{
|
{
|
||||||
LWP_MutexLock(m_mutex);
|
LWP_MutexLock(m_mutex);
|
||||||
_setThrdMsg(_t("dlmsg12", L"Download failed!"), 1.f);
|
_setThrdMsg(_t("dlmsg12", L"Download failed!"), 1.f);
|
||||||
|
@ -79,23 +79,27 @@ const CMenu::SOption CMenu::_VideoModes[7] = {
|
|||||||
{ "vidprog", L"Progressive" },
|
{ "vidprog", L"Progressive" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const CMenu::SOption CMenu::_GlobalDMLvideoModes[6] = {
|
const CMenu::SOption CMenu::_GlobalDMLvideoModes[8] = {
|
||||||
{ "DMLdefG", L"Game" },
|
{ "DMLdefG", L"Game" },
|
||||||
{ "DMLpal", L"PAL 576i" },
|
{ "DMLpal", L"PAL 576i" },
|
||||||
{ "DMLntsc", L"NTSC 480i" },
|
{ "DMLntsc", L"NTSC 480i" },
|
||||||
{ "DMLpal60", L"PAL 480i" },
|
{ "DMLpal60", L"PAL 480i" },
|
||||||
{ "DMLprog", L"NTSC 480p" },
|
{ "DMLprog", L"NTSC 480p" },
|
||||||
{ "DMLprogP", L"PAL 480p" }
|
{ "DMLprogP", L"PAL 480p" },
|
||||||
|
{ "DMLmpal", L"MPAL" },
|
||||||
|
{ "DMLmpalP", L"MPAL-P" }
|
||||||
};
|
};
|
||||||
|
|
||||||
const CMenu::SOption CMenu::_DMLvideoModes[7] = {
|
const CMenu::SOption CMenu::_DMLvideoModes[9] = {
|
||||||
{ "DMLdef", L"Default" },
|
{ "DMLdef", L"Default" },
|
||||||
{ "DMLdefG", L"Game" },
|
{ "DMLdefG", L"Game" },
|
||||||
{ "DMLpal", L"PAL 576i" },
|
{ "DMLpal", L"PAL 576i" },
|
||||||
{ "DMLntsc", L"NTSC 480i" },
|
{ "DMLntsc", L"NTSC 480i" },
|
||||||
{ "DMLpal60", L"PAL 480i" },
|
{ "DMLpal60", L"PAL 480i" },
|
||||||
{ "DMLprog", L"NTSC 480p" },
|
{ "DMLprog", L"NTSC 480p" },
|
||||||
{ "DMLprogP", L"PAL 480p" }
|
{ "DMLprogP", L"PAL 480p" },
|
||||||
|
{ "DMLmpal", L"MPAL" },
|
||||||
|
{ "DMLmpalP", L"MPAL-P" }
|
||||||
};
|
};
|
||||||
|
|
||||||
const CMenu::SOption CMenu::_GlobalGClanguages[7] = {
|
const CMenu::SOption CMenu::_GlobalGClanguages[7] = {
|
||||||
@ -145,10 +149,11 @@ const CMenu::SOption CMenu::_AspectRatio[3] = {
|
|||||||
{ "aspect169", L"Force 16:9" },
|
{ "aspect169", L"Force 16:9" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const CMenu::SOption CMenu::_NMM[4] = {
|
const CMenu::SOption CMenu::_NMM[5] = {
|
||||||
{ "NMMDef", L"Default" },
|
{ "NMMDef", L"Default" },
|
||||||
{ "NMMOff", L"Disabled" },
|
{ "NMMOff", L"Disabled" },
|
||||||
{ "NMMon", L"Enabled" },
|
{ "NMMon", L"Enabled" },
|
||||||
|
{ "NMMMulti", L"Multi Saves" },
|
||||||
{ "NMMdebug", L"Debug" },
|
{ "NMMdebug", L"Debug" },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -918,27 +923,22 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
u8 loader = min((u32)m_gcfg2.getInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u);
|
u8 loader = min((u32)m_gcfg2.getInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u);
|
||||||
loader = (loader == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 0), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : loader-1;
|
loader = (loader == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 2), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : loader-1;
|
||||||
bool memcard_emu = m_gcfg2.getBool(id, "devo_memcard_emu", false);
|
bool memcard_emu = m_gcfg2.getBool(id, "devo_memcard_emu", false);
|
||||||
bool widescreen = m_gcfg2.getBool(id, "dm_widescreen", false);
|
bool widescreen = m_gcfg2.getBool(id, "dm_widescreen", false);
|
||||||
bool activity_led = m_gcfg2.getBool(id, "led", false);
|
bool activity_led = m_gcfg2.getBool(id, "led", false);
|
||||||
|
bool usb_hid = m_gcfg2.getBool(id, "USB_HID", m_cfg.getBool(GC_DOMAIN, "USB_HID", false));
|
||||||
|
bool native_ctl = m_gcfg2.getBool(id, "NATIVE_CTL", m_cfg.getBool(GC_DOMAIN, "NATIVE_CTL", false));
|
||||||
|
bool deflicker = m_gcfg2.getBool(id, "Deflicker", m_cfg.getBool(GC_DOMAIN, "Deflicker", false));
|
||||||
|
|
||||||
if(loader == 2 && m_nintendont_installed == false)
|
if(loader == 2 && m_nintendont_installed == false)
|
||||||
loader = 0;
|
loader = 0;
|
||||||
|
|
||||||
//always enable for nintendont
|
//always enable for nintendont
|
||||||
u8 NMM = (loader == 2) ? 2 : min((u32)m_gcfg2.getInt(id, "dml_nmm", 0), ARRAY_SIZE(CMenu::_NMM) - 1u);
|
u8 NMM = min((u32)m_gcfg2.getInt(id, "dml_nmm", m_cfg.getInt(GC_DOMAIN, "dml_nmm", 1)), ARRAY_SIZE(CMenu::_NMM) - 1u);
|
||||||
NMM = (NMM == 0) ? m_cfg.getInt(GC_DOMAIN, "dml_nmm", 0) : NMM-1;
|
NMM = (NMM == 0) ? m_cfg.getInt(GC_DOMAIN, "dml_nmm", 1) : NMM-1;
|
||||||
|
|
||||||
//if GC disc use DIOS MIOS to launch it
|
|
||||||
if(disc)
|
|
||||||
{
|
|
||||||
loader = 0;
|
|
||||||
gprintf("Booting GC Disc: %s\n", id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
m_cfg.setString(GC_DOMAIN, "current_item", id);
|
|
||||||
|
|
||||||
|
m_cfg.setString(GC_DOMAIN, "current_item", id);
|
||||||
|
|
||||||
if(loader == 0) //auto selected
|
if(loader == 0) //auto selected
|
||||||
{
|
{
|
||||||
@ -1017,7 +1017,15 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
|||||||
}
|
}
|
||||||
_launchShutdown();
|
_launchShutdown();
|
||||||
if(disc == true)
|
if(disc == true)
|
||||||
DML_New_SetBootDiscOption(m_new_dm_cfg);
|
{
|
||||||
|
if(loader == 0)
|
||||||
|
DML_New_SetBootDiscOption(m_new_dm_cfg);
|
||||||
|
else if(loader == 2)
|
||||||
|
{
|
||||||
|
NMM = m_cfg.getInt(GC_DOMAIN, "dml_nmm", 1);
|
||||||
|
Nintendont_BootDisc(NMM, widescreen, usb_hid, native_ctl, deflicker);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(loader == 0)
|
else if(loader == 0)
|
||||||
{
|
{
|
||||||
char CheatPath[256];
|
char CheatPath[256];
|
||||||
@ -1052,15 +1060,37 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
|||||||
else if(loader == 1)
|
else if(loader == 1)
|
||||||
DEVO_GetLoader(m_dataDir.c_str());
|
DEVO_GetLoader(m_dataDir.c_str());
|
||||||
else if(loader == 2)
|
else if(loader == 2)
|
||||||
Nintendont_SetOptions(path, id, NMM, videoSetting, widescreen);
|
{
|
||||||
|
bool NIN_Debugger = (m_gcfg2.getInt(id, "debugger", 0) == 2);
|
||||||
|
bool screenshot = m_gcfg2.getBool(id, "screenshot", false);
|
||||||
|
bool cheats = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(GC_DOMAIN, "cheat", false));
|
||||||
|
/* Generate gct path */
|
||||||
|
char GC_Path[256];
|
||||||
|
GC_Path[255] = '\0';
|
||||||
|
strncpy(GC_Path, path, 255);
|
||||||
|
if(strcasestr(path, "boot.bin") != NULL)
|
||||||
|
{
|
||||||
|
*strrchr(GC_Path, '/') = '\0'; //boot.bin
|
||||||
|
*(strrchr(GC_Path, '/')+1) = '\0'; //sys
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*(strrchr(GC_Path, '/')+1) = '\0'; //iso path
|
||||||
|
//const char *NewPath = fmt("%s%s.gct", GC_Path, id);
|
||||||
|
char CheatPath[256];
|
||||||
|
char NewCheatPath[256];
|
||||||
|
snprintf(CheatPath, sizeof(CheatPath), "%s/%s", m_cheatDir.c_str(), fmt("%s.gct", id));
|
||||||
|
snprintf(NewCheatPath, sizeof(NewCheatPath), "%s%s.gct",GC_Path,id);
|
||||||
|
|
||||||
|
Nintendont_SetOptions(path, id, CheatPath,NewCheatPath,DeviceName[currentPartition],
|
||||||
|
cheats, NMM, videoMode,videoSetting, widescreen,usb_hid,native_ctl,deflicker,screenshot,NIN_Debugger);
|
||||||
|
}
|
||||||
m_gcfg1.save(true);
|
m_gcfg1.save(true);
|
||||||
m_gcfg2.save(true);
|
m_gcfg2.save(true);
|
||||||
m_cat.save(true);
|
m_cat.save(true);
|
||||||
m_cfg.save(true);
|
m_cfg.save(true);
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
GC_SetVideoMode(videoMode, (disc ? 1 : videoSetting), loader);
|
GC_SetVideoMode(videoMode, (disc ? 1 : videoSetting), loader);
|
||||||
GC_SetLanguage(GClanguage, loader);
|
GC_SetLanguage(GClanguage, loader);
|
||||||
/* NTSC-J Patch by FIX94 */
|
/* NTSC-J Patch by FIX94 */
|
||||||
if(id[3] == 'J')
|
if(id[3] == 'J')
|
||||||
@ -1398,6 +1428,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
|
|
||||||
bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false));
|
bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false));
|
||||||
bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false));
|
bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false));
|
||||||
|
bool private_server = m_gcfg2.testOptBool(id, "private_server", m_cfg.getBool("GENERAL", "private_server", false));
|
||||||
|
|
||||||
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
||||||
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
||||||
@ -1568,7 +1599,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
free(gameconfig);
|
free(gameconfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalBooter_WiiGameSetup(wbfs_partition, dvd, patchregion, id.c_str());
|
ExternalBooter_WiiGameSetup(wbfs_partition, dvd, patchregion, private_server, id.c_str());
|
||||||
WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, returnTo, TYPE_WII_GAME, use_led);
|
WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, returnTo, TYPE_WII_GAME, use_led);
|
||||||
|
|
||||||
Sys_Exit();
|
Sys_Exit();
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <ogc\lwp_watchdog.h>
|
||||||
|
|
||||||
#include "menu.hpp"
|
#include "menu.hpp"
|
||||||
|
#include "sicksaxis-wrapper/sicksaxis-wrapper.h"
|
||||||
|
|
||||||
static const u32 g_repeatDelay = 25;
|
static const u32 g_repeatDelay = 25;
|
||||||
|
u64 button_time = 0;
|
||||||
|
|
||||||
|
#define CheckTime() (ticks_to_millisecs(diff_ticks((button_time), gettick())) > 200)
|
||||||
|
#define UpdateTime() button_time = gettick()
|
||||||
|
|
||||||
void CMenu::SetupInput(bool reset_pos)
|
void CMenu::SetupInput(bool reset_pos)
|
||||||
{
|
{
|
||||||
@ -63,6 +68,7 @@ void CMenu::ScanInput()
|
|||||||
WUPC_UpdateButtonStats();
|
WUPC_UpdateButtonStats();
|
||||||
WPAD_ScanPads();
|
WPAD_ScanPads();
|
||||||
PAD_ScanPads();
|
PAD_ScanPads();
|
||||||
|
DS3_ScanPads();
|
||||||
|
|
||||||
ButtonsPressed();
|
ButtonsPressed();
|
||||||
ButtonsHeld();
|
ButtonsHeld();
|
||||||
@ -103,9 +109,9 @@ void CMenu::ScanInput()
|
|||||||
}
|
}
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
m_btnMgr.setRumble(chan, WPadIR_Valid(chan), PAD_StickX(chan) < -20 || PAD_StickX(chan) > 20 || PAD_StickY(chan) < -20 || PAD_StickY(chan) > 20,
|
m_btnMgr.setRumble(chan, WPadIR_Valid(chan), PAD_StickX(chan) < -20 || PAD_StickX(chan) > 20 || PAD_StickY(chan) < -20 || PAD_StickY(chan) > 20,
|
||||||
WUPC_lStickX(chan) < -160 || WUPC_lStickX(chan) > 160 || WUPC_lStickY(chan) < -160 || WUPC_lStickY(chan) > 160);
|
WUPC_lStickX(chan) < -160 || WUPC_lStickX(chan) > 160 || WUPC_lStickY(chan) < -160 || WUPC_lStickY(chan) > 160);
|
||||||
m_btnMgr.setMouse(WPadIR_Valid(chan) || m_show_pointer[chan]);
|
m_btnMgr.setMouse(WPadIR_Valid(chan) || m_show_pointer[chan]);
|
||||||
if(WPadIR_Valid(chan))
|
if(WPadIR_Valid(chan))
|
||||||
{
|
{
|
||||||
m_cursor[chan].draw(wd[chan]->ir.x, wd[chan]->ir.y, wd[chan]->ir.angle);
|
m_cursor[chan].draw(wd[chan]->ir.x, wd[chan]->ir.y, wd[chan]->ir.angle);
|
||||||
@ -124,15 +130,27 @@ void CMenu::ScanInput()
|
|||||||
ShowNextZone();
|
ShowNextZone();
|
||||||
ShowGameZone();
|
ShowGameZone();
|
||||||
}
|
}
|
||||||
|
extern "C" { extern bool shutdown; };
|
||||||
void CMenu::ButtonsPressed()
|
void CMenu::ButtonsPressed()
|
||||||
{
|
{
|
||||||
|
|
||||||
gc_btnsPressed = 0;
|
gc_btnsPressed = 0;
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
if (CheckTime())
|
||||||
{
|
{
|
||||||
wii_btnsPressed[chan] = WPAD_ButtonsDown(chan);
|
ds3_btnsPressed = DS3_ButtonsDown();
|
||||||
gc_btnsPressed |= PAD_ButtonsDown(chan);
|
UpdateTime();
|
||||||
wupc_btnsPressed[chan] = WUPC_ButtonsDown(chan);
|
}
|
||||||
|
else
|
||||||
|
ds3_btnsPressed = 0;
|
||||||
|
|
||||||
|
if(ds3_btnsPressed & DBTN_SELECT) shutdown = 1;
|
||||||
|
{
|
||||||
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
|
{
|
||||||
|
wii_btnsPressed[chan] = WPAD_ButtonsDown(chan);
|
||||||
|
gc_btnsPressed |= PAD_ButtonsDown(chan);
|
||||||
|
wupc_btnsPressed[chan] = WUPC_ButtonsDown(chan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +167,7 @@ void CMenu::ButtonsHeld()
|
|||||||
|
|
||||||
bool CMenu::wBtn_PressedChan(int btn, u8 ext, int &chan)
|
bool CMenu::wBtn_PressedChan(int btn, u8 ext, int &chan)
|
||||||
{
|
{
|
||||||
return ((wii_btnsPressed[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type))
|
return ((wii_btnsPressed[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type)) || ((wupc_btnsPressed[chan] & btn) && (ext == WPAD_EXP_CLASSIC));
|
||||||
|| ((wupc_btnsPressed[chan] & btn) && (ext == WPAD_EXP_CLASSIC));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMenu::wBtn_Pressed(int btn, u8 ext)
|
bool CMenu::wBtn_Pressed(int btn, u8 ext)
|
||||||
@ -165,8 +182,7 @@ bool CMenu::wBtn_Pressed(int btn, u8 ext)
|
|||||||
|
|
||||||
bool CMenu::wBtn_HeldChan(int btn, u8 ext, int &chan)
|
bool CMenu::wBtn_HeldChan(int btn, u8 ext, int &chan)
|
||||||
{
|
{
|
||||||
return ((wii_btnsHeld[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type))
|
return ((wii_btnsHeld[chan] & btn) && (ext == WPAD_EXP_NONE || ext == wd[chan]->exp.type)) || ((wupc_btnsHeld[chan] & btn) && (ext == WPAD_EXP_CLASSIC));
|
||||||
|| ((wupc_btnsHeld[chan] & btn) && (ext == WPAD_EXP_CLASSIC));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMenu::wBtn_Held(int btn, u8 ext)
|
bool CMenu::wBtn_Held(int btn, u8 ext)
|
||||||
@ -184,14 +200,13 @@ void CMenu::LeftStick()
|
|||||||
u8 speed = 0, pSpeed = 0;
|
u8 speed = 0, pSpeed = 0;
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if(left_stick_mag[chan] > 0.15 || abs(PAD_StickX(chan)) > 20 || abs(PAD_StickY(chan)) > 20
|
if(left_stick_mag[chan] > 0.15 || abs(PAD_StickX(chan)) > 20 || abs(PAD_StickY(chan)) > 20 || (chan == 0 && (abs(DS3_StickX()) > 20 || abs(DS3_StickY()) > 20)) || abs(WUPC_lStickX(chan)) > 160 || abs(WUPC_lStickY(chan)) > 160)
|
||||||
|| abs(WUPC_lStickX(chan)) > 160 || abs(WUPC_lStickY(chan)) > 160)
|
|
||||||
{
|
{
|
||||||
m_show_pointer[chan] = true;
|
m_show_pointer[chan] = true;
|
||||||
if(LEFT_STICK_LEFT)
|
if(LEFT_STICK_LEFT)
|
||||||
{
|
{
|
||||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||||
pSpeed = (u8)(abs(PAD_StickX(chan))/10 | abs(WUPC_lStickX(chan))/80);
|
pSpeed = (u8)((abs(PAD_StickX(chan))/10)|(abs(DS3_StickX()/10))|(abs(WUPC_lStickX(chan))/80));
|
||||||
if(stickPointer_x[chan] > m_cursor[chan].width()/2)
|
if(stickPointer_x[chan] > m_cursor[chan].width()/2)
|
||||||
stickPointer_x[chan] = stickPointer_x[chan]-speed-pSpeed;
|
stickPointer_x[chan] = stickPointer_x[chan]-speed-pSpeed;
|
||||||
pointerhidedelay[chan] = 150;
|
pointerhidedelay[chan] = 150;
|
||||||
@ -199,7 +214,7 @@ void CMenu::LeftStick()
|
|||||||
if(LEFT_STICK_DOWN)
|
if(LEFT_STICK_DOWN)
|
||||||
{
|
{
|
||||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||||
pSpeed = (u8)(abs(PAD_StickY(chan))/10 | abs(WUPC_lStickY(chan))/80);
|
pSpeed = (u8)((abs(PAD_StickY(chan))/10)|(abs(DS3_StickY()/10))|(abs(WUPC_lStickY(chan))/80));
|
||||||
if(stickPointer_y[chan] < (m_vid.height() + (m_cursor[chan].height()/2)))
|
if(stickPointer_y[chan] < (m_vid.height() + (m_cursor[chan].height()/2)))
|
||||||
stickPointer_y[chan] = stickPointer_y[chan]+speed+pSpeed;
|
stickPointer_y[chan] = stickPointer_y[chan]+speed+pSpeed;
|
||||||
pointerhidedelay[chan] = 150;
|
pointerhidedelay[chan] = 150;
|
||||||
@ -207,7 +222,7 @@ void CMenu::LeftStick()
|
|||||||
if(LEFT_STICK_RIGHT)
|
if(LEFT_STICK_RIGHT)
|
||||||
{
|
{
|
||||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||||
pSpeed = (u8)(abs(PAD_StickX(chan))/10 | abs(WUPC_lStickX(chan))/80);
|
pSpeed = (u8)((abs(PAD_StickX(chan))/10)|(abs(DS3_StickX()/10))|(abs(WUPC_lStickX(chan))/80));
|
||||||
if(stickPointer_x[chan] < (m_vid.width() + (m_cursor[chan].width()/2)))
|
if(stickPointer_x[chan] < (m_vid.width() + (m_cursor[chan].width()/2)))
|
||||||
stickPointer_x[chan] = stickPointer_x[chan]+speed+pSpeed;
|
stickPointer_x[chan] = stickPointer_x[chan]+speed+pSpeed;
|
||||||
pointerhidedelay[chan] = 150;
|
pointerhidedelay[chan] = 150;
|
||||||
@ -215,7 +230,7 @@ void CMenu::LeftStick()
|
|||||||
if(LEFT_STICK_UP)
|
if(LEFT_STICK_UP)
|
||||||
{
|
{
|
||||||
speed = (u8)(left_stick_mag[chan] * 10.00);
|
speed = (u8)(left_stick_mag[chan] * 10.00);
|
||||||
pSpeed = (u8)(abs(PAD_StickY(chan))/10 | abs(WUPC_lStickY(chan))/80);
|
pSpeed = (u8)((abs(PAD_StickY(chan))/10)|(abs(DS3_StickY()/10))|(abs(WUPC_lStickY(chan))/80));
|
||||||
if(stickPointer_y[chan] > m_cursor[chan].height()/2)
|
if(stickPointer_y[chan] > m_cursor[chan].height()/2)
|
||||||
stickPointer_y[chan] = stickPointer_y[chan]-speed-pSpeed;
|
stickPointer_y[chan] = stickPointer_y[chan]-speed-pSpeed;
|
||||||
pointerhidedelay[chan] = 150;
|
pointerhidedelay[chan] = 150;
|
||||||
@ -295,9 +310,9 @@ bool CMenu::wii_btnRepeat(u8 btn)
|
|||||||
else
|
else
|
||||||
m_wpadDownDelay = 0;
|
m_wpadDownDelay = 0;
|
||||||
}
|
}
|
||||||
else if(btn == WBTN_LEFT)
|
else if(btn == WBTN_LEFT || DBTN_LEFT)
|
||||||
{
|
{
|
||||||
if(WBTN_LEFT_HELD)
|
if(WBTN_LEFT_HELD || DBTN_LEFT_PRESSED)
|
||||||
{
|
{
|
||||||
if(m_wpadLeftDelay == 0 || m_wpadLeftDelay >= g_repeatDelay)
|
if(m_wpadLeftDelay == 0 || m_wpadLeftDelay >= g_repeatDelay)
|
||||||
b = true;
|
b = true;
|
||||||
@ -341,7 +356,7 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
|||||||
else
|
else
|
||||||
m_padUpDelay = 0;
|
m_padUpDelay = 0;
|
||||||
}
|
}
|
||||||
else if (btn == GBTN_RIGHT)
|
else if(btn == GBTN_RIGHT)
|
||||||
{
|
{
|
||||||
if(gc_btnsHeld & GBTN_RIGHT)
|
if(gc_btnsHeld & GBTN_RIGHT)
|
||||||
{
|
{
|
||||||
@ -353,7 +368,7 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
|||||||
else
|
else
|
||||||
m_padRightDelay = 0;
|
m_padRightDelay = 0;
|
||||||
}
|
}
|
||||||
else if (btn == GBTN_DOWN)
|
else if(btn == GBTN_DOWN)
|
||||||
{
|
{
|
||||||
if(gc_btnsHeld & GBTN_DOWN)
|
if(gc_btnsHeld & GBTN_DOWN)
|
||||||
{
|
{
|
||||||
@ -365,7 +380,7 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
|||||||
else
|
else
|
||||||
m_padDownDelay = 0;
|
m_padDownDelay = 0;
|
||||||
}
|
}
|
||||||
else if (btn == GBTN_LEFT)
|
else if(btn == GBTN_LEFT)
|
||||||
{
|
{
|
||||||
if(gc_btnsHeld & GBTN_LEFT)
|
if(gc_btnsHeld & GBTN_LEFT)
|
||||||
{
|
{
|
||||||
@ -377,7 +392,7 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
|||||||
else
|
else
|
||||||
m_padLeftDelay = 0;
|
m_padLeftDelay = 0;
|
||||||
}
|
}
|
||||||
else if (btn == GBTN_A)
|
else if(btn == GBTN_A)
|
||||||
{
|
{
|
||||||
if(gc_btnsHeld & GBTN_A)
|
if(gc_btnsHeld & GBTN_A)
|
||||||
{
|
{
|
||||||
@ -396,11 +411,109 @@ bool CMenu::gc_btnRepeat(s64 btn)
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CMenu::ds3_btnRepeat(s64 btn)
|
||||||
|
{
|
||||||
|
bool b = false;
|
||||||
|
if(btn == DBTN_UP)
|
||||||
|
{
|
||||||
|
if(ds3_btnsPressed & DBTN_UP)
|
||||||
|
{
|
||||||
|
if(m_dpadUpDelay == 0 || m_dpadUpDelay >= g_repeatDelay)
|
||||||
|
b = true;
|
||||||
|
if(m_dpadUpDelay < g_repeatDelay)
|
||||||
|
++m_dpadUpDelay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dpadUpDelay = 0;
|
||||||
|
m_btnMgr.noClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(btn == DBTN_RIGHT)
|
||||||
|
{
|
||||||
|
if(ds3_btnsPressed & DBTN_RIGHT)
|
||||||
|
{
|
||||||
|
if(m_dpadRightDelay == 0 || m_dpadRightDelay >= g_repeatDelay)
|
||||||
|
b = true;
|
||||||
|
if(m_dpadRightDelay < g_repeatDelay)
|
||||||
|
++m_dpadRightDelay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dpadRightDelay = 0;
|
||||||
|
m_btnMgr.noClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(btn == DBTN_DOWN)
|
||||||
|
{
|
||||||
|
if(ds3_btnsPressed & DBTN_DOWN)
|
||||||
|
{
|
||||||
|
if(m_dpadDownDelay == 0 || m_dpadDownDelay >= g_repeatDelay)
|
||||||
|
b = true;
|
||||||
|
if(m_dpadDownDelay < g_repeatDelay)
|
||||||
|
++m_dpadDownDelay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dpadDownDelay = 0;
|
||||||
|
m_btnMgr.noClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(btn == DBTN_LEFT)
|
||||||
|
{
|
||||||
|
if(ds3_btnsPressed & DBTN_LEFT)
|
||||||
|
{
|
||||||
|
if(m_dpadLeftDelay == 0 || m_dpadLeftDelay >= g_repeatDelay)
|
||||||
|
b = true;
|
||||||
|
if(m_dpadLeftDelay < g_repeatDelay)
|
||||||
|
++m_dpadLeftDelay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dpadLeftDelay = 0;
|
||||||
|
m_btnMgr.noClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(btn == DBTN_A)
|
||||||
|
{
|
||||||
|
if(ds3_btnsPressed & DBTN_A)
|
||||||
|
{
|
||||||
|
m_btnMgr.noClick(true);
|
||||||
|
if(m_dpadADelay == 1 || m_dpadADelay >= g_repeatDelay)
|
||||||
|
b = true;
|
||||||
|
if(m_dpadADelay < g_repeatDelay)
|
||||||
|
++m_dpadADelay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dpadADelay = 1;
|
||||||
|
m_btnMgr.noClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(btn == DBTN_START)
|
||||||
|
{
|
||||||
|
if(ds3_btnsPressed & DBTN_START)
|
||||||
|
{
|
||||||
|
m_btnMgr.noClick(true);
|
||||||
|
if(m_dpadHDelay == 0.5 || m_dpadHDelay >= g_repeatDelay)
|
||||||
|
b = true;
|
||||||
|
if(m_dpadHDelay < g_repeatDelay)
|
||||||
|
++m_dpadHDelay;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dpadHDelay = 0.5;
|
||||||
|
m_btnMgr.noClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
bool CMenu::lStick_Up(void)
|
bool CMenu::lStick_Up(void)
|
||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((LEFT_STICK_ANG_UP && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) > 20 || WUPC_lStickY(chan) > 160)
|
if((LEFT_STICK_ANG_UP && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) > 20 || DS3_StickY() < -20 || WUPC_lStickY(chan) > 160)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -410,7 +523,7 @@ bool CMenu::lStick_Right(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((LEFT_STICK_ANG_RIGHT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) > 20 || WUPC_lStickX(chan) > 160)
|
if((LEFT_STICK_ANG_RIGHT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) > 20 || DS3_StickX() > 20 || WUPC_lStickX(chan) > 160)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -420,7 +533,7 @@ bool CMenu::lStick_Down(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((LEFT_STICK_ANG_DOWN && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) < -20 || WUPC_lStickY(chan) < -160)
|
if((LEFT_STICK_ANG_DOWN && left_stick_mag[chan] > 0.15) || PAD_StickY(chan) < -20 || DS3_StickY() > 20 || WUPC_lStickY(chan) < -160)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -430,7 +543,7 @@ bool CMenu::lStick_Left(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((LEFT_STICK_ANG_LEFT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) < -20 || WUPC_lStickX(chan) < -160)
|
if((LEFT_STICK_ANG_LEFT && left_stick_mag[chan] > 0.15) || PAD_StickX(chan) < -20 || DS3_StickX() < -20 || WUPC_lStickX(chan) < -160)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -440,8 +553,7 @@ bool CMenu::rStick_Up(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((RIGHT_STICK_ANG_UP && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0)
|
if((RIGHT_STICK_ANG_UP && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) > 20 || WUPC_rStickY(chan) > 160)
|
||||||
|| PAD_SubStickY(chan) > 20 || WUPC_rStickY(chan) > 160)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -451,8 +563,7 @@ bool CMenu::rStick_Right(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((RIGHT_STICK_ANG_RIGHT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0)
|
if((RIGHT_STICK_ANG_RIGHT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) > 20 || WUPC_rStickX(chan) > 160)
|
||||||
|| PAD_SubStickX(chan) > 20 || WUPC_rStickX(chan) > 160)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -462,8 +573,7 @@ bool CMenu::rStick_Down(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((RIGHT_STICK_ANG_DOWN && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0)
|
if((RIGHT_STICK_ANG_DOWN && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickY(chan) < -20 || WUPC_rStickY(chan) < -160)
|
||||||
|| PAD_SubStickY(chan) < -20 || WUPC_rStickY(chan) < -160)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -473,8 +583,7 @@ bool CMenu::rStick_Left(void)
|
|||||||
{
|
{
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if((RIGHT_STICK_ANG_LEFT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0)
|
if((RIGHT_STICK_ANG_LEFT && right_stick_mag[chan] > 0.15 && right_stick_skip[chan] == 0) || PAD_SubStickX(chan) < -20 || WUPC_rStickX(chan) < -160)
|
||||||
|| PAD_SubStickX(chan) < -20 || WUPC_rStickX(chan) < -160)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -248,7 +248,7 @@ int CMenu::main(void)
|
|||||||
bool dpad_mode = m_cfg.getBool("GENERAL", "dpad_mode", false);
|
bool dpad_mode = m_cfg.getBool("GENERAL", "dpad_mode", false);
|
||||||
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
|
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
|
||||||
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
|
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
|
||||||
m_use_source = m_cfg.getBool("GENERAL", "use_source", false);
|
m_use_source = m_cfg.getBool("GENERAL", "use_source", true);
|
||||||
bool bheld = false;
|
bool bheld = false;
|
||||||
bool bUsed = false;
|
bool bUsed = false;
|
||||||
|
|
||||||
|
@ -109,8 +109,8 @@ void CMenu::_system()
|
|||||||
m_app_update_size = m_version.getInt("GENERAL", "app_zip_size", 0);
|
m_app_update_size = m_version.getInt("GENERAL", "app_zip_size", 0);
|
||||||
m_data_update_size = m_version.getInt("GENERAL", "data_zip_size", 0);
|
m_data_update_size = m_version.getInt("GENERAL", "data_zip_size", 0);
|
||||||
|
|
||||||
m_app_update_url = fmt("%s/Wiiflow_Mod_svn_r%i.zip", m_version.getString("GENERAL", "update_url", "http://open-wiiflow-mod.googlecode.com/files").c_str(), newVer);
|
m_app_update_url = fmt("%s/Mod%i.zip", ("http://nintendont.gxarena.com/banners"), newVer);
|
||||||
m_data_update_url = fmt("%s/r%i/data.zip", m_version.getString("GENERAL", "update_url", "http://open-wiiflow-mod.googlecode.com/files").c_str(), newVer);
|
m_data_update_url = fmt("%s/r%i/data.zip", ("http://nintendont.gxarena.com/banners"), newVer);
|
||||||
|
|
||||||
m_showtimer = 120;
|
m_showtimer = 120;
|
||||||
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_versionDownloaderInit,
|
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_versionDownloaderInit,
|
||||||
|
@ -162,7 +162,7 @@ struct block downloadfile(u8 *buffer, u32 bufferSize, const char *url, bool (*f)
|
|||||||
if(connection < 0) return emptyblock;
|
if(connection < 0) return emptyblock;
|
||||||
|
|
||||||
//Form a nice request header to send to the webserver
|
//Form a nice request header to send to the webserver
|
||||||
char* headerformat = "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: WiiFlow 2.1\r\n\r\n";;
|
char* headerformat = "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0\r\n\r\n";;
|
||||||
char header[strlen(headerformat) + strlen(domain) + strlen(path)];
|
char header[strlen(headerformat) + strlen(domain) + strlen(path)];
|
||||||
sprintf(header, headerformat, path, domain);
|
sprintf(header, headerformat, path, domain);
|
||||||
|
|
||||||
|
113
source/sicksaxis-wrapper/sicksaxis-wrapper.c
Normal file
113
source/sicksaxis-wrapper/sicksaxis-wrapper.c
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
|
||||||
|
// A simple wrapper for libsicksaxis, to make it resemble WPAD/PAD more closely.
|
||||||
|
// Written by daxtsu/thedax. I'm releasing this code into the public domain, so do whatever you want with it.
|
||||||
|
|
||||||
|
#include <sicksaxis.h>
|
||||||
|
#include "sicksaxis-wrapper.h"
|
||||||
|
|
||||||
|
static DS3 first;
|
||||||
|
static bool psPressed = false;
|
||||||
|
|
||||||
|
bool DS3_Init()
|
||||||
|
{
|
||||||
|
USB_Initialize();
|
||||||
|
|
||||||
|
if (ss_init() < 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ss_initialize(&first);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DS3_Rumble()
|
||||||
|
{
|
||||||
|
if (first.connected && psPressed)
|
||||||
|
{
|
||||||
|
ss_set_rumble(&first, 2, 255, 2, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DS3_Cleanup()
|
||||||
|
{
|
||||||
|
psPressed = false;
|
||||||
|
ss_close(&first);
|
||||||
|
USB_Deinitialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int DS3_ButtonsDown()
|
||||||
|
{
|
||||||
|
if (!ss_is_connected(&first) || !psPressed)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
DS3 *controller;
|
||||||
|
controller = &first;
|
||||||
|
|
||||||
|
unsigned int pressed = 0;
|
||||||
|
|
||||||
|
pressed |= controller->pad.buttons.PS ? DS3_BUTTON_PS : 0;
|
||||||
|
pressed |= controller->pad.buttons.start ? DS3_BUTTON_START : 0;
|
||||||
|
pressed |= controller->pad.buttons.select ? DS3_BUTTON_SELECT : 0;
|
||||||
|
pressed |= controller->pad.buttons.triangle ? DS3_BUTTON_TRIANGLE : 0;
|
||||||
|
pressed |= controller->pad.buttons.circle ? DS3_BUTTON_CIRCLE : 0;
|
||||||
|
pressed |= controller->pad.buttons.cross ? DS3_BUTTON_CROSS : 0;
|
||||||
|
pressed |= controller->pad.buttons.square ? DS3_BUTTON_SQUARE : 0;
|
||||||
|
pressed |= controller->pad.buttons.up ? DS3_BUTTON_UP : 0;
|
||||||
|
pressed |= controller->pad.buttons.right ? DS3_BUTTON_RIGHT : 0;
|
||||||
|
pressed |= controller->pad.buttons.down ? DS3_BUTTON_DOWN : 0;
|
||||||
|
pressed |= controller->pad.buttons.left ? DS3_BUTTON_LEFT : 0;
|
||||||
|
pressed |= controller->pad.buttons.L1 ? DS3_BUTTON_L1 : 0;
|
||||||
|
pressed |= controller->pad.buttons.L2 ? DS3_BUTTON_L2 : 0;
|
||||||
|
pressed |= controller->pad.buttons.L3 ? DS3_BUTTON_L3 : 0;
|
||||||
|
pressed |= controller->pad.buttons.R1 ? DS3_BUTTON_R1 : 0;
|
||||||
|
pressed |= controller->pad.buttons.R2 ? DS3_BUTTON_R2 : 0;
|
||||||
|
pressed |= controller->pad.buttons.R3 ? DS3_BUTTON_R3 : 0;
|
||||||
|
|
||||||
|
return pressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DS3_Connected()
|
||||||
|
{
|
||||||
|
return first.connected > 0 && psPressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DS3_ScanPads()
|
||||||
|
{
|
||||||
|
if (!ss_is_connected(&first))
|
||||||
|
{
|
||||||
|
psPressed = false;
|
||||||
|
ss_initialize(&first);
|
||||||
|
if (ss_open(&first) > 0)
|
||||||
|
{
|
||||||
|
ss_start_reading(&first);
|
||||||
|
ss_set_led(&first, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (first.pad.buttons.PS && !psPressed)
|
||||||
|
{
|
||||||
|
psPressed = true;
|
||||||
|
ss_set_led(&first, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int DS3_StickX()
|
||||||
|
{
|
||||||
|
return psPressed? first.pad.left_analog.x - 128 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DS3_SubStickX()
|
||||||
|
{
|
||||||
|
return psPressed? first.pad.right_analog.x - 128 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DS3_StickY()
|
||||||
|
{
|
||||||
|
return psPressed? first.pad.left_analog.y - 128 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DS3_SubStickY()
|
||||||
|
{
|
||||||
|
return psPressed? first.pad.right_analog.y - 128 : 0;
|
||||||
|
}
|
51
source/sicksaxis-wrapper/sicksaxis-wrapper.h
Normal file
51
source/sicksaxis-wrapper/sicksaxis-wrapper.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
// A simple wrapper for libsicksaxis, to make it resemble WPAD/PAD more closely.
|
||||||
|
// Written by daxtsu/thedax. I'm releasing this code into the public domain, so do whatever you want with it.
|
||||||
|
|
||||||
|
#ifndef _DS3WRAPPER_H_
|
||||||
|
#define _DS3WRAPPER_H_
|
||||||
|
|
||||||
|
#include <gctypes.h>
|
||||||
|
|
||||||
|
struct ss_device;
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DS3_BUTTON_PS = 1,
|
||||||
|
DS3_BUTTON_START = 2,
|
||||||
|
DS3_BUTTON_SELECT = 4,
|
||||||
|
DS3_BUTTON_TRIANGLE = 8,
|
||||||
|
DS3_BUTTON_CIRCLE = 16,
|
||||||
|
DS3_BUTTON_CROSS = 32,
|
||||||
|
DS3_BUTTON_SQUARE = 64,
|
||||||
|
DS3_BUTTON_UP = 128,
|
||||||
|
DS3_BUTTON_RIGHT = 256,
|
||||||
|
DS3_BUTTON_DOWN = 512,
|
||||||
|
DS3_BUTTON_LEFT = 1024,
|
||||||
|
DS3_BUTTON_L1 = 2048,
|
||||||
|
DS3_BUTTON_L2 = 4096,
|
||||||
|
DS3_BUTTON_L3 = 8192,
|
||||||
|
DS3_BUTTON_R1 = 16384,
|
||||||
|
DS3_BUTTON_R2 = 32768,
|
||||||
|
DS3_BUTTON_R3 = 65536,
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
typedef struct ss_device DS3;
|
||||||
|
bool DS3_Init();
|
||||||
|
void DS3_Rumble();
|
||||||
|
void DS3_Cleanup();
|
||||||
|
u32 DS3_ButtonsDown();
|
||||||
|
void DS3_ScanPads();
|
||||||
|
int DS3_StickX();
|
||||||
|
int DS3_SubStickX();
|
||||||
|
int DS3_StickY();
|
||||||
|
int DS3_SubStickY();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user