-now compiled with ppc r33 and libogc 1.8.21

-time issues appear to be fixed. thanks wintermute and endrift!
This commit is contained in:
Fledge68 2018-11-14 18:45:46 -06:00
parent 7c4eb065b2
commit f3e39a4fb9
13 changed files with 30 additions and 30 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -54,7 +54,7 @@ char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32);
static u8 *GetDol(u32 bootcontent, u64 title) static u8 *GetDol(u32 bootcontent, u64 title)
{ {
memset(filepath, 0, ISFS_MAXPATH); memset(filepath, 0, ISFS_MAXPATH);
sprintf(filepath, "/title/%08lx/%08lx/content/%08lx.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent); sprintf(filepath, "/title/%08x/%08x/content/%08x.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent);
u32 contentSize = 0; u32 contentSize = 0;
@ -83,7 +83,7 @@ static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS)
bool ret = false; bool ret = false;
memset(filepath, 0, ISFS_MAXPATH); memset(filepath, 0, ISFS_MAXPATH);
sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title)); sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title));
u32 size; u32 size;
u8 *data = ISFS_GetFile(filepath, &size, -1); u8 *data = ISFS_GetFile(filepath, &size, -1);

View File

@ -185,7 +185,7 @@ private:
u32 tevregid : 2; u32 tevregid : 2;
u32 clamp : 1; u32 clamp : 1;
} ATTRIBUTE_PACKED color_in, ATTRIBUTE_PACKED alpha_in; } ATTRIBUTE_PACKED color_in, alpha_in;
struct struct
{ {

View File

@ -175,7 +175,7 @@ static const uint32_t T[4][16] =
* Static Functions: * Static Functions:
*/ */
static void Permute( uint32_t ABCD[4], const unsigned char block[64] ) static void Permute( unsigned long int ABCD[4], const unsigned char block[64] )
/* ------------------------------------------------------------------------ ** /* ------------------------------------------------------------------------ **
* Permute the ABCD "registers" using the 64-byte <block> as a driver. * Permute the ABCD "registers" using the 64-byte <block> as a driver.
* *

View File

@ -901,11 +901,11 @@ void Nand::CreateTitleTMD(dir_discHdr *hdr)
u32 highTID = *(u32*)(titleTMD+0x18c); u32 highTID = *(u32*)(titleTMD+0x18c);
u32 lowTID = *(u32*)(titleTMD+0x190); u32 lowTID = *(u32*)(titleTMD+0x190);
CreatePath("%s/title/%08lx/%08lx/data", FullNANDPath, highTID, lowTID); CreatePath("%s/title/%08x/%08x/data", FullNANDPath, highTID, lowTID);
CreatePath("%s/title/%08lx/%08lx/content", FullNANDPath, highTID, lowTID); CreatePath("%s/title/%08x/%08x/content", FullNANDPath, highTID, lowTID);
char nandpath[MAX_FAT_PATH]; char nandpath[MAX_FAT_PATH];
snprintf(nandpath, sizeof(nandpath), "%s/title/%08lx/%08lx/content/title.tmd", FullNANDPath, highTID, lowTID); snprintf(nandpath, sizeof(nandpath), "%s/title/%08x/%08x/content/title.tmd", FullNANDPath, highTID, lowTID);
if(fsop_FileExist(nandpath)) if(fsop_FileExist(nandpath))
{ {

View File

@ -60,8 +60,8 @@ static const devoptab_t gecko_out = {
NULL, // device chmod_r NULL, // device chmod_r
NULL, // device fchmod_r NULL, // device fchmod_r
NULL, // device rmdir_r NULL, // device rmdir_r
//NULL, // lstat_r NULL, // lstat_r
//NULL, // utimes_r NULL, // utimes_r
}; };
static void USBGeckoOutput() static void USBGeckoOutput()

View File

@ -566,7 +566,7 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor)
static const struct { u32 x; u32 y; } blurRes[] = { static const struct { u32 x; u32 y; } blurRes[] = {
{ 64, 48 }, { 96, 72 }, { 128, 96 }, { 192, 144 } { 64, 48 }, { 96, 72 }, { 128, 96 }, { 192, 144 }
}; };
u32 i = min(max(0ul, blurResolution), sizeof blurRes / sizeof blurRes[0] - 1ul); u32 i = min(max(0u, blurResolution), sizeof blurRes / sizeof blurRes[0] - 1u);
m_effectTex.width = blurRes[i].x; m_effectTex.width = blurRes[i].x;
m_effectTex.height = blurRes[i].y; m_effectTex.height = blurRes[i].y;
if(m_effectTex.data != NULL) if(m_effectTex.data != NULL)
@ -574,7 +574,7 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor)
free(m_effectTex.data); free(m_effectTex.data);
m_effectTex.data = NULL; m_effectTex.data = NULL;
} }
m_blurRadius = min(max(1ul, blurRadius), 3ul); m_blurRadius = min(max(1u, blurRadius), 3u);
m_blurFactor = min(max(1.f, blurFactor), 2.f); m_blurFactor = min(max(1.f, blurFactor), 2.f);
} }
@ -2955,7 +2955,7 @@ void * CCoverFlow::_coverLoader(void *obj)
u32 i, j; u32 i, j;
bool hq_req = cf->m_useHQcover; bool hq_req = cf->m_useHQcover;
bool cur_pos_hq = false; bool cur_pos_hq = false;
u32 bufferSize = min(cf->m_numBufCovers * max(2ul, cf->m_rows), 80ul); u32 bufferSize = min(cf->m_numBufCovers * max(2u, cf->m_rows), 80u);
while(cf->m_loadingCovers) while(cf->m_loadingCovers)
{ {

View File

@ -168,9 +168,9 @@ bool SFont::fromBuffer(const u8 *buffer, const u32 bufferSize, u32 size, u32 lsp
{ {
if(buffer == NULL) if(buffer == NULL)
return false; return false;
fSize = min(max(6ul, size), 1000ul); fSize = min(max(6u, size), 1000u);
lineSpacing = min(max(6ul, lspacing), 1000ul); lineSpacing = min(max(6u, lspacing), 1000u);
weight = min(w, 32ul); weight = min(w, 32u);
index = idx;// currently not used index = idx;// currently not used
if(data != NULL) if(data != NULL)
@ -190,11 +190,11 @@ bool SFont::fromBuffer(const u8 *buffer, const u32 bufferSize, u32 size, u32 lsp
bool SFont::fromFile(const char *path, u32 size, u32 lspacing, u32 w, u32 idx, const char *fontname) bool SFont::fromFile(const char *path, u32 size, u32 lspacing, u32 w, u32 idx, const char *fontname)
{ {
fSize = min(max(6ul, size), 1000ul); fSize = min(max(6u, size), 1000u);
weight = min(w, 32ul); weight = min(w, 32u);
index = idx;// currently not used index = idx;// currently not used
lineSpacing = min(max(6ul, lspacing), 1000ul); lineSpacing = min(max(6u, lspacing), 1000u);
if(data != NULL) if(data != NULL)
free(data); free(data);

View File

@ -292,8 +292,8 @@ void CVideo::shiftViewPort(float x, float y)
void CVideo::set2DViewport(u32 w, u32 h, int x, int y) void CVideo::set2DViewport(u32 w, u32 h, int x, int y)
{ {
m_width2D = std::min(std::max(512ul, w), 800ul); m_width2D = std::min(std::max(512u, w), 800u);
m_height2D = std::min(std::max(384ul, h), 600ul); m_height2D = std::min(std::max(384u, h), 600u);
m_x2D = std::min(std::max(-50, x), 50); m_x2D = std::min(std::max(-50, x), 50);
m_y2D = std::min(std::max(-50, y), 50); m_y2D = std::min(std::max(-50, y), 50);
} }

View File

@ -100,13 +100,13 @@ void *light_loop()
timeoff = light_timeoff; timeoff = light_timeoff;
// Turn on the light and sleep for a bit // Turn on the light and sleep for a bit
wiiLightOn(); wiiLightOn();
//nanosleep(&timeon, NULL); nanosleep(&timeon, NULL);
nanosleep(&timeon); //nanosleep(&timeon);
// Turn off the light (if required) and sleep for a bit // Turn off the light (if required) and sleep for a bit
if(timeoff.tv_nsec > 0) if(timeoff.tv_nsec > 0)
wiiLightOff(); wiiLightOff();
//nanosleep(&timeoff, NULL); nanosleep(&timeoff, NULL);
nanosleep(&timeoff); //nanosleep(&timeoff);
} }
return NULL; return NULL;
} }

View File

@ -160,7 +160,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
} }
if (strncasecmp("poke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 4) if (strncasecmp("poke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 4)
{ {
ret = sscanf((char *) tempgameconf + i, "( %lx , %lx", &codeaddr, &codeval); ret = sscanf((char *) tempgameconf + i, "( %x , %x", &codeaddr, &codeval);
if (ret == 2) if (ret == 2)
{ {
*(gameconf + (gameconfsize / 4)) = 0; *(gameconf + (gameconfsize / 4)) = 0;
@ -176,7 +176,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
} }
if (strncasecmp("pokeifequal", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11) if (strncasecmp("pokeifequal", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) == 11)
{ {
ret = sscanf((char *) (tempgameconf + i), "( %lx , %lx , %lx , %lx", &codeaddr, &codeval, ret = sscanf((char *) (tempgameconf + i), "( %x , %x , %x , %x", &codeaddr, &codeval,
&codeaddr2, &codeval2); &codeaddr2, &codeval2);
if (ret == 4) if (ret == 4)
{ {
@ -196,7 +196,7 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer) if (strncasecmp("searchandpoke", parsebuffer, strlen(parsebuffer)) == 0 && strlen(parsebuffer)
== 13) == 13)
{ {
ret = sscanf((char *) (tempgameconf + i), "( %lx%ln", &codeval, &tempoffset); ret = sscanf((char *) (tempgameconf + i), "( %x%n", &codeval, &tempoffset);
if (ret == 1) if (ret == 1)
{ {
gameconfsize += 4; gameconfsize += 4;
@ -207,10 +207,10 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi
gameconfsize += 4; gameconfsize += 4;
temp++; temp++;
i += tempoffset; i += tempoffset;
ret = sscanf((char *) (tempgameconf + i), " %lx%ln", &codeval, &tempoffset); ret = sscanf((char *) (tempgameconf + i), " %x%n", &codeval, &tempoffset);
} }
*(gameconf + (gameconfsize / 4) - temp - 1) = temp; *(gameconf + (gameconfsize / 4) - temp - 1) = temp;
ret = sscanf((char *) (tempgameconf + i), " , %lx , %lx , %lx , %lx", &codeaddr, &codeaddr2, ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", &codeaddr, &codeaddr2,
&codeoffset, &codeval2); &codeoffset, &codeval2);
if (ret == 4) if (ret == 4)
{ {

View File

@ -17,7 +17,7 @@ void AddLanguage(char *Path)
char lng[32]; char lng[32];
memset(lng, 0, 32); memset(lng, 0, 32);
char *lang_chr = strrchr(Path, '/')+1; char *lang_chr = strrchr(Path, '/')+1;
memcpy(lng, lang_chr, min(31ul, (u32)(strrchr(lang_chr, '.')-lang_chr))); memcpy(lng, lang_chr, min(31u, (u32)(strrchr(lang_chr, '.')-lang_chr)));
languages_available.push_back(lng); languages_available.push_back(lng);
} }