Skip to content

Commit

Permalink
- fix for channels video modes broken in 5.5.0
Browse files Browse the repository at this point in the history
- now always use coverfolder for plugins
- v5.5.1
  • Loading branch information
Fledge68 committed Jan 14, 2022
1 parent 8b2bacf commit 105a1bc
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 114 deletions.
Binary file modified out/bins/ext_booter.bin
Binary file not shown.
Binary file modified out/boot.dol
Binary file not shown.
8 changes: 4 additions & 4 deletions resources/wiiflow_game_booter/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,24 @@ int main()
Hermes_shadow_mload();
}
prog(20);
Disc_Open(normalCFG.GameBootType);
Disc_Open(normalCFG.GameBootType);// sets Disc_ID
u32 offset = 0;
Disc_FindPartition(&offset);
WDVD_OpenPartition(offset, &GameIOS);
Disc_SetLowMem();
if(normalCFG.vidMode == 5)
normalCFG.patchVidMode = 1; //progressive mode requires this
vmode = Disc_SelectVMode(normalCFG.vidMode, &vmode_reg);
vmode = Disc_SelectVMode(normalCFG.vidMode, &vmode_reg);// requires Disc_ID[3]
AppEntrypoint = Apploader_Run(normalCFG.vidMode, vmode, normalCFG.vipatch, normalCFG.countryString, normalCFG.patchVidMode, normalCFG.aspectRatio,
normalCFG.returnTo, normalCFG.patchregion, normalCFG.private_server, normalCFG.server_addr, normalCFG.patchFix480p, normalCFG.deflicker, normalCFG.BootType);
WDVD_Close();
}
else if(normalCFG.BootType == TYPE_CHANNEL)
{
vmode = Disc_SelectVMode(normalCFG.vidMode, &vmode_reg);
ISFS_Initialize();
AppEntrypoint = LoadChannel(normalCFG.title, normalCFG.use_dol, &GameIOS);
AppEntrypoint = LoadChannel(normalCFG.title, normalCFG.use_dol, &GameIOS);// sets Disc_ID
ISFS_Deinitialize();
vmode = Disc_SelectVMode(normalCFG.vidMode, &vmode_reg);// requires Disc_ID[3]
PatchChannel(normalCFG.vidMode, vmode, normalCFG.vipatch, normalCFG.countryString, normalCFG.patchVidMode, normalCFG.aspectRatio,
normalCFG.returnTo, normalCFG.private_server, normalCFG.server_addr, normalCFG.patchFix480p, normalCFG.deflicker, normalCFG.BootType);
}
Expand Down
2 changes: 1 addition & 1 deletion source/defines.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define APP_NAME "WiiFlow WFL"
#define APP_VERSION "5.5.0"
#define APP_VERSION "5.5.1"

#define APP_DATA_DIR "wiiflow"
#define APPS_DIR "apps/wiiflow"
Expand Down
5 changes: 2 additions & 3 deletions source/devicemounter/PartitionHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,16 @@ bool PartitionHandle::Mount(int pos, const char *name, bool forceFAT)
if(valid(pos))
UnMount(pos);

if(!name)
if(!name || strlen(name) > 8)
return false;

if(pos >= (int)MountNameList.size())
MountNameList.resize(pos + 1);

MountNameList[pos] = name;
char DeviceSyn[10];
memcpy(DeviceSyn, name, 8);
strcpy(DeviceSyn, name);
strcat(DeviceSyn, ":");
DeviceSyn[9] = '\0';

//! Some stupid partition manager think they don't need to edit the freaken MBR.
//! So we need to check the first 64 sectors and see if some partition is there.
Expand Down
16 changes: 12 additions & 4 deletions source/gui/coverflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ CCoverFlow::CCoverFlow(void)
m_compressTextures = true;
m_compressCache = false;
m_deletePicsAfterCaching = false;
m_pluginCacheFolders = false;
m_box = true;
m_smallBox = false;
m_useHQcover = false;
Expand Down Expand Up @@ -263,10 +262,9 @@ CCoverFlow::~CCoverFlow(void)
LWP_MutexDestroy(m_mutex);
}

void CCoverFlow::setCachePath(const char *path, bool pluginCacheFolders)
void CCoverFlow::setCachePath(const char *path)
{
m_cachePath = path;
m_pluginCacheFolders = pluginCacheFolders;
}

void CCoverFlow::setTextureQuality(float lodBias, int aniso, bool edgeLOD)
Expand Down Expand Up @@ -2769,7 +2767,7 @@ CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq, bool blank
strncpy(wfcTitle, fmt("%s", getFilenameId(m_items[i].hdr)), sizeof(wfcTitle) - 1);

/* get coverfolder for plugins, sourceflow, and homebrew */
if(m_items[i].hdr->type == TYPE_PLUGIN && m_pluginCacheFolders)
if(m_items[i].hdr->type == TYPE_PLUGIN)
wfcCoverDir = m_plugin.GetCoverFolderName(m_items[i].hdr->settings[0]);
if(m_items[i].hdr->type == TYPE_SOURCE)
wfcCoverDir = "sourceflow";
Expand All @@ -2782,7 +2780,17 @@ CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq, bool blank
if(m_smallBox)
strncpy(full_path, fmt("%s/%s/%s_small.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
else
{
strncpy(full_path, fmt("%s/%s/%s.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
/*if(!fsop_FileExist(full_path))

This comment has been minimized.

Copy link
@eku

eku Jan 15, 2022

Contributor

The block is commented out. Could it be removed?

This comment has been minimized.

Copy link
@Fledge68

Fledge68 Jan 15, 2022

Author Owner

i was in the middle of attempting to remove the need to always include the filenames extension so i just quickly commented it out to be able to commit and push this.

{
if(strrchr(wfcTitle, '.') != NULL)
{
*strrchr(wfcTitle, '.') = '\0';
strncpy(full_path, fmt("%s/%s/%s.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
}
}*/
}
}
else
{
Expand Down
3 changes: 1 addition & 2 deletions source/gui/coverflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class CCoverFlow
void stopSound(void);
//
void applySettings(void);
void setCachePath(const char *path, bool pluginCacheFolders);
void setCachePath(const char *path);
bool fullCoverCached(const char *wfcPath);
bool cacheCoverBuffer(const char *wfcPath, const u8 *png, bool full);
bool cacheCoverFile(const char *wfcPath, const char *coverPath, bool full);
Expand Down Expand Up @@ -289,7 +289,6 @@ class CCoverFlow
bool m_compressCache;
std::string m_cachePath;
bool m_deletePicsAfterCaching;
bool m_pluginCacheFolders;
bool m_mirrorBlur;
float m_mirrorAlpha;
float m_txtMirrorAlpha;
Expand Down
18 changes: 9 additions & 9 deletions source/menu/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ void CMenu::_loadCFCfg()
const char *domain = "_COVERFLOW";

//gprintf("Preparing to load sounds from %s\n", m_themeDataDir.c_str());
CoverFlow.setCachePath(m_cacheDir.c_str(), m_cfg.getBool(PLUGIN_DOMAIN, "subfolder_cache", true));
CoverFlow.setCachePath(m_cacheDir.c_str());
CoverFlow.setBufferSize(m_cfg.getInt("GENERAL", "cover_buffer", 20));
// Coverflow Sounds
CoverFlow.setSounds(
Expand Down Expand Up @@ -2633,7 +2633,7 @@ bool CMenu::_loadPluginList()
void CMenu::_stopSounds(void)
{
// Fade out sounds
int fade_rate = m_cfg.getInt("GENERAL", "music_fade_rate", 8);
int fade_rate = 20;

if(!MusicPlayer.IsStopped())
{
Expand Down Expand Up @@ -2885,14 +2885,14 @@ const char *CMenu::getBoxPath(const dir_discHdr *element)
{
if(element->type == TYPE_PLUGIN)
{
const char *tempname = element->path;
if(strchr(element->path, '/') != NULL)
tempname = strrchr(element->path, '/') + 1;
const char *filename = fmt("%s", element->path);
if(strchr(filename, '/') != NULL)
{
filename = fmt("%s", strrchr(element->path, '/') + 1);
}

const char *coverFolder = m_plugin.GetCoverFolderName(element->settings[0]);
if(strlen(coverFolder) > 0)
return fmt("%s/%s/%s.png", m_boxPicDir.c_str(), coverFolder, tempname);
else
return fmt("%s/%s.png", m_boxPicDir.c_str(), tempname);
return fmt("%s/%s/%s.png", m_boxPicDir.c_str(), coverFolder, filename);
}
else if(element->type == TYPE_HOMEBREW)// use folder name for the png name
return fmt("%s/homebrew/%s.png", m_boxPicDir.c_str(), strrchr(element->path, '/') + 1);
Expand Down
Loading

0 comments on commit 105a1bc

Please sign in to comment.