diff --git a/out/bins/ext_booter.bin b/out/bins/ext_booter.bin index 1aea4aa1..df660688 100644 Binary files a/out/bins/ext_booter.bin and b/out/bins/ext_booter.bin differ diff --git a/out/boot.dol b/out/boot.dol index 474a66da..032d3293 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/resources/wiiflow_game_booter/source/ChannelHandler.cpp b/resources/wiiflow_game_booter/source/ChannelHandler.cpp index c30756af..dc2d4b71 100644 --- a/resources/wiiflow_game_booter/source/ChannelHandler.cpp +++ b/resources/wiiflow_game_booter/source/ChannelHandler.cpp @@ -54,7 +54,7 @@ char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32); static u8 *GetDol(u32 bootcontent, u64 title) { 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; @@ -83,7 +83,7 @@ static bool GetAppNameFromTmd(bool dol, u32 *bootcontent, u64 title, u32 *IOS) bool ret = false; 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; u8 *data = ISFS_GetFile(filepath, &size, -1); diff --git a/source/banner/Material.h b/source/banner/Material.h index d136d38e..593d3c2f 100644 --- a/source/banner/Material.h +++ b/source/banner/Material.h @@ -185,7 +185,7 @@ private: u32 tevregid : 2; u32 clamp : 1; - } ATTRIBUTE_PACKED color_in, ATTRIBUTE_PACKED alpha_in; + } ATTRIBUTE_PACKED color_in, alpha_in; struct { diff --git a/source/channel/MD5.c b/source/channel/MD5.c index 1ba17155..4aeae8d8 100644 --- a/source/channel/MD5.c +++ b/source/channel/MD5.c @@ -175,7 +175,7 @@ static const uint32_t T[4][16] = * 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 as a driver. * diff --git a/source/channel/nand.cpp b/source/channel/nand.cpp index 6fd16db0..accff1e5 100644 --- a/source/channel/nand.cpp +++ b/source/channel/nand.cpp @@ -901,11 +901,11 @@ void Nand::CreateTitleTMD(dir_discHdr *hdr) u32 highTID = *(u32*)(titleTMD+0x18c); u32 lowTID = *(u32*)(titleTMD+0x190); - CreatePath("%s/title/%08lx/%08lx/data", FullNANDPath, highTID, lowTID); - CreatePath("%s/title/%08lx/%08lx/content", FullNANDPath, highTID, lowTID); + CreatePath("%s/title/%08x/%08x/data", FullNANDPath, highTID, lowTID); + CreatePath("%s/title/%08x/%08x/content", FullNANDPath, highTID, lowTID); 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)) { diff --git a/source/gecko/gecko.cpp b/source/gecko/gecko.cpp index 444f5b59..3f6722f9 100644 --- a/source/gecko/gecko.cpp +++ b/source/gecko/gecko.cpp @@ -60,8 +60,8 @@ static const devoptab_t gecko_out = { NULL, // device chmod_r NULL, // device fchmod_r NULL, // device rmdir_r - //NULL, // lstat_r - //NULL, // utimes_r + NULL, // lstat_r + NULL, // utimes_r }; static void USBGeckoOutput() diff --git a/source/gui/coverflow.cpp b/source/gui/coverflow.cpp index 92c2822d..86b39099 100644 --- a/source/gui/coverflow.cpp +++ b/source/gui/coverflow.cpp @@ -566,7 +566,7 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor) static const struct { u32 x; u32 y; } blurRes[] = { { 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.height = blurRes[i].y; if(m_effectTex.data != NULL) @@ -574,7 +574,7 @@ void CCoverFlow::setBlur(u32 blurResolution, u32 blurRadius, float blurFactor) free(m_effectTex.data); 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); } @@ -2955,7 +2955,7 @@ void * CCoverFlow::_coverLoader(void *obj) u32 i, j; bool hq_req = cf->m_useHQcover; 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) { diff --git a/source/gui/text.cpp b/source/gui/text.cpp index dbe72cb3..d13a6f5e 100644 --- a/source/gui/text.cpp +++ b/source/gui/text.cpp @@ -168,9 +168,9 @@ bool SFont::fromBuffer(const u8 *buffer, const u32 bufferSize, u32 size, u32 lsp { if(buffer == NULL) return false; - fSize = min(max(6ul, size), 1000ul); - lineSpacing = min(max(6ul, lspacing), 1000ul); - weight = min(w, 32ul); + fSize = min(max(6u, size), 1000u); + lineSpacing = min(max(6u, lspacing), 1000u); + weight = min(w, 32u); index = idx;// currently not used 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) { - fSize = min(max(6ul, size), 1000ul); - weight = min(w, 32ul); + fSize = min(max(6u, size), 1000u); + weight = min(w, 32u); index = idx;// currently not used - lineSpacing = min(max(6ul, lspacing), 1000ul); + lineSpacing = min(max(6u, lspacing), 1000u); if(data != NULL) free(data); diff --git a/source/gui/video.cpp b/source/gui/video.cpp index d2652cf1..9263a243 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -292,8 +292,8 @@ void CVideo::shiftViewPort(float x, float y) void CVideo::set2DViewport(u32 w, u32 h, int x, int y) { - m_width2D = std::min(std::max(512ul, w), 800ul); - m_height2D = std::min(std::max(384ul, h), 600ul); + m_width2D = std::min(std::max(512u, w), 800u); + m_height2D = std::min(std::max(384u, h), 600u); m_x2D = std::min(std::max(-50, x), 50); m_y2D = std::min(std::max(-50, y), 50); } diff --git a/source/hw/Gekko.c b/source/hw/Gekko.c index bbf4af56..beeb7072 100644 --- a/source/hw/Gekko.c +++ b/source/hw/Gekko.c @@ -100,13 +100,13 @@ void *light_loop() timeoff = light_timeoff; // Turn on the light and sleep for a bit wiiLightOn(); - //nanosleep(&timeon, NULL); - nanosleep(&timeon); + nanosleep(&timeon, NULL); + //nanosleep(&timeon); // Turn off the light (if required) and sleep for a bit if(timeoff.tv_nsec > 0) wiiLightOff(); - //nanosleep(&timeoff, NULL); - nanosleep(&timeoff); + nanosleep(&timeoff, NULL); + //nanosleep(&timeoff); } return NULL; } diff --git a/source/loader/fst.c b/source/loader/fst.c index 83934192..85753cb6 100644 --- a/source/loader/fst.c +++ b/source/loader/fst.c @@ -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) { - ret = sscanf((char *) tempgameconf + i, "( %lx , %lx", &codeaddr, &codeval); + ret = sscanf((char *) tempgameconf + i, "( %x , %x", &codeaddr, &codeval); if (ret == 2) { *(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) { - ret = sscanf((char *) (tempgameconf + i), "( %lx , %lx , %lx , %lx", &codeaddr, &codeval, + ret = sscanf((char *) (tempgameconf + i), "( %x , %x , %x , %x", &codeaddr, &codeval, &codeaddr2, &codeval2); 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) == 13) { - ret = sscanf((char *) (tempgameconf + i), "( %lx%ln", &codeval, &tempoffset); + ret = sscanf((char *) (tempgameconf + i), "( %x%n", &codeval, &tempoffset); if (ret == 1) { gameconfsize += 4; @@ -207,10 +207,10 @@ int app_gameconfig_load(const char *discid, u8 *tempgameconf, u32 tempgameconfsi gameconfsize += 4; temp++; 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; - ret = sscanf((char *) (tempgameconf + i), " , %lx , %lx , %lx , %lx", &codeaddr, &codeaddr2, + ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", &codeaddr, &codeaddr2, &codeoffset, &codeval2); if (ret == 4) { diff --git a/source/menu/menu_config_adv.cpp b/source/menu/menu_config_adv.cpp index c6254a7d..b07462cf 100644 --- a/source/menu/menu_config_adv.cpp +++ b/source/menu/menu_config_adv.cpp @@ -17,7 +17,7 @@ void AddLanguage(char *Path) char lng[32]; memset(lng, 0, 32); 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); }