diff --git a/out/bins/ext_booter.bin b/out/bins/ext_booter.bin index df660688..1aea4aa1 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 92530387..089b16bc 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 dc2d4b71..c30756af 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/%08x/%08x/content/%08x.app", TITLE_UPPER(title), TITLE_LOWER(title), bootcontent); + sprintf(filepath, "/title/%08lx/%08lx/content/%08lx.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/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title)); + sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title)); u32 size; u8 *data = ISFS_GetFile(filepath, &size, -1); diff --git a/source/channel/channel_launcher.cpp b/source/channel/channel_launcher.cpp index bfca91fe..7d9936d9 100644 --- a/source/channel/channel_launcher.cpp +++ b/source/channel/channel_launcher.cpp @@ -42,8 +42,8 @@ bool Identify(u64 titleid) char filepath[ISFS_MAXPATH] ATTRIBUTE_ALIGN(32); memset(filepath, 0, ISFS_MAXPATH); - gprintf("Reading TMD for %08x %08x...", TITLE_UPPER(titleid), TITLE_LOWER(titleid)); - sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(titleid), TITLE_LOWER(titleid)); + gprintf("Reading TMD for %08lx %08lx...", TITLE_UPPER(titleid), TITLE_LOWER(titleid)); + sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(titleid), TITLE_LOWER(titleid)); u32 tmdSize; u8 *tmdBuffer = ISFS_GetFile(filepath, &tmdSize, -1); if (tmdBuffer == NULL || tmdSize == 0) diff --git a/source/channel/nand.cpp b/source/channel/nand.cpp index accff1e5..6fd16db0 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/%08x/%08x/data", FullNANDPath, highTID, lowTID); - CreatePath("%s/title/%08x/%08x/content", FullNANDPath, highTID, lowTID); + CreatePath("%s/title/%08lx/%08lx/data", FullNANDPath, highTID, lowTID); + CreatePath("%s/title/%08lx/%08lx/content", FullNANDPath, highTID, lowTID); char nandpath[MAX_FAT_PATH]; - snprintf(nandpath, sizeof(nandpath), "%s/title/%08x/%08x/content/title.tmd", FullNANDPath, highTID, lowTID); + snprintf(nandpath, sizeof(nandpath), "%s/title/%08lx/%08lx/content/title.tmd", FullNANDPath, highTID, lowTID); if(fsop_FileExist(nandpath)) { diff --git a/source/defines.h b/source/defines.h index 1a472a54..2bf4fc09 100644 --- a/source/defines.h +++ b/source/defines.h @@ -1,5 +1,5 @@ -//#define APP_WIIFLOW +//#define APP_WIIFLOW //uncomment this line to compile wfl as wiiflow #define APP_NAME "WiiFlow Lite" #define APP_VERSION "5.0.1" diff --git a/source/gecko/gecko.cpp b/source/gecko/gecko.cpp index 3f6722f9..444f5b59 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 86b39099..92c2822d 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(0u, blurResolution), sizeof blurRes / sizeof blurRes[0] - 1u); + u32 i = min(max(0ul, blurResolution), sizeof blurRes / sizeof blurRes[0] - 1ul); 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(1u, blurRadius), 3u); + m_blurRadius = min(max(1ul, blurRadius), 3ul); 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(2u, cf->m_rows), 80u); + u32 bufferSize = min(cf->m_numBufCovers * max(2ul, cf->m_rows), 80ul); while(cf->m_loadingCovers) { diff --git a/source/gui/text.cpp b/source/gui/text.cpp index d13a6f5e..dbe72cb3 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(6u, size), 1000u); - lineSpacing = min(max(6u, lspacing), 1000u); - weight = min(w, 32u); + fSize = min(max(6ul, size), 1000ul); + lineSpacing = min(max(6ul, lspacing), 1000ul); + weight = min(w, 32ul); 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(6u, size), 1000u); - weight = min(w, 32u); + fSize = min(max(6ul, size), 1000ul); + weight = min(w, 32ul); index = idx;// currently not used - lineSpacing = min(max(6u, lspacing), 1000u); + lineSpacing = min(max(6ul, lspacing), 1000ul); if(data != NULL) free(data); diff --git a/source/gui/video.cpp b/source/gui/video.cpp index 9263a243..d2652cf1 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(512u, w), 800u); - m_height2D = std::min(std::max(384u, h), 600u); + m_width2D = std::min(std::max(512ul, w), 800ul); + m_height2D = std::min(std::max(384ul, h), 600ul); m_x2D = std::min(std::max(-50, x), 50); m_y2D = std::min(std::max(-50, y), 50); } diff --git a/source/homebrew/homebrew.cpp b/source/homebrew/homebrew.cpp index 18e772ed..6ebe58e5 100644 --- a/source/homebrew/homebrew.cpp +++ b/source/homebrew/homebrew.cpp @@ -153,7 +153,11 @@ void writeStub() DCFlushRange((void*)0x80001800, StubSize); /* And free the memory again */ - if(Stub != NULL) +#ifdef APP_WIIFLOW + if(Stub != wfstub_bin) +#else + if(Stub != stub_bin) +#endif free(Stub); } diff --git a/source/hw/Gekko.c b/source/hw/Gekko.c index beeb7072..cae4b370 100644 --- a/source/hw/Gekko.c +++ b/source/hw/Gekko.c @@ -90,7 +90,7 @@ void wiiLightSetLevel(int level) */ void *light_loop() { - struct timespec timeon; + /*struct timespec timeon; struct timespec timeoff; // Loop whilst the light is still 'on' @@ -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, 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, NULL); //nanosleep(&timeoff); - } + }*/ return NULL; } diff --git a/source/loader/fst.c b/source/loader/fst.c index 85753cb6..83934192 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, "( %x , %x", &codeaddr, &codeval); + ret = sscanf((char *) tempgameconf + i, "( %lx , %lx", &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), "( %x , %x , %x , %x", &codeaddr, &codeval, + ret = sscanf((char *) (tempgameconf + i), "( %lx , %lx , %lx , %lx", &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), "( %x%n", &codeval, &tempoffset); + ret = sscanf((char *) (tempgameconf + i), "( %lx%ln", &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), " %x%n", &codeval, &tempoffset); + ret = sscanf((char *) (tempgameconf + i), " %lx%ln", &codeval, &tempoffset); } *(gameconf + (gameconfsize / 4) - temp - 1) = temp; - ret = sscanf((char *) (tempgameconf + i), " , %x , %x , %x , %x", &codeaddr, &codeaddr2, + ret = sscanf((char *) (tempgameconf + i), " , %lx , %lx , %lx , %lx", &codeaddr, &codeaddr2, &codeoffset, &codeval2); if (ret == 4) { diff --git a/source/menu/menu_config_adv.cpp b/source/menu/menu_config_adv.cpp index 643a0fef..552938b3 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(31u, (u32)(strrchr(lang_chr, '.')-lang_chr))); + memcpy(lng, lang_chr, min(31ul, (u32)(strrchr(lang_chr, '.')-lang_chr))); languages_available.push_back(lng); }