2016-04-03 02:42:09 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Copyright (C) 2013 FIX94
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
****************************************************************************/
|
|
|
|
#include "menu.hpp"
|
2018-07-09 16:53:35 +02:00
|
|
|
#include "channel/nand.hpp"
|
2016-04-03 02:42:09 +02:00
|
|
|
#include "loader/cios.h"
|
|
|
|
#include "loader/nk.h"
|
2018-11-12 21:38:37 +01:00
|
|
|
#include "wstringEx/wstringEx.hpp"
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2018-06-12 23:27:52 +02:00
|
|
|
/* home menu */
|
2016-04-03 02:42:09 +02:00
|
|
|
s16 m_homeLblTitle;
|
2018-06-12 23:27:52 +02:00
|
|
|
s16 m_homeLblUser[4];
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
s16 m_homeBtnHelp;
|
2016-04-03 02:42:09 +02:00
|
|
|
s16 m_homeBtnReloadCache;
|
|
|
|
s16 m_homeBtnExplorer;
|
2019-10-21 15:38:26 +02:00
|
|
|
s16 m_homeBtnSelPlugin;
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
s16 m_homeBtnCredits;
|
2019-10-28 16:01:52 +01:00
|
|
|
s16 m_homeBtnShutdown;
|
2016-04-03 02:42:09 +02:00
|
|
|
s16 m_homeBtnExitTo;
|
2019-10-21 15:38:26 +02:00
|
|
|
s16 m_homeBtnSettings;
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2018-06-12 23:27:52 +02:00
|
|
|
s16 m_homeLblBattery;
|
|
|
|
|
|
|
|
/* exit to menu */
|
|
|
|
s16 m_exittoLblTitle;
|
|
|
|
s16 m_exittoLblUser[4];
|
2016-04-03 02:42:09 +02:00
|
|
|
s16 m_homeBtnExitToHBC;
|
|
|
|
s16 m_homeBtnExitToMenu;
|
2019-10-21 15:38:26 +02:00
|
|
|
s16 m_homeBtnExitToNeek;
|
2016-04-03 02:42:09 +02:00
|
|
|
s16 m_homeBtnExitToPriiloader;
|
|
|
|
s16 m_homeBtnExitToBootmii;
|
|
|
|
|
2019-10-28 16:01:52 +01:00
|
|
|
/* shutdown menu */
|
|
|
|
s16 m_shutdownLblQuestion;
|
|
|
|
s16 m_shutdownBtnFull;
|
|
|
|
s16 m_shutdownBtnStandby;
|
|
|
|
s16 m_shutdownBtnCancel;
|
|
|
|
|
2016-04-03 02:42:09 +02:00
|
|
|
TexData m_homeBg;
|
2018-11-12 21:38:37 +01:00
|
|
|
static const wstringEx PLAYER_BATTERY_LABEL("P1 %003.f%% | P2 %003.f%% | P3 %003.f%% | P4 %003.f%%");
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
bool CMenu::_Home(void)
|
|
|
|
{
|
|
|
|
SetupInput();
|
2019-10-21 15:38:26 +02:00
|
|
|
if(isWiiVC || m_locked)
|
|
|
|
m_btnMgr.setText(m_homeBtnExitTo, _t("home12", L"Exit"));
|
|
|
|
else
|
|
|
|
m_btnMgr.setText(m_homeBtnExitTo, _t("home5", L"Exit To"));
|
2016-04-03 02:42:09 +02:00
|
|
|
_showHome();
|
|
|
|
|
|
|
|
while(!m_exit)
|
|
|
|
{
|
|
|
|
/* battery gets refreshed in here... */
|
|
|
|
_mainLoopCommon();
|
|
|
|
/* and it always changes so... */
|
|
|
|
m_btnMgr.setText(m_homeLblBattery, wfmt(PLAYER_BATTERY_LABEL, min((float)wd[0]->battery_level, 100.f),
|
|
|
|
min((float)wd[1]->battery_level, 100.f), min((float)wd[2]->battery_level, 100.f), min((float)wd[3]->battery_level, 100.f)));
|
2016-12-14 19:47:13 +01:00
|
|
|
if(BTN_UP_PRESSED)
|
|
|
|
m_btnMgr.up();
|
|
|
|
else if(BTN_DOWN_PRESSED)
|
|
|
|
m_btnMgr.down();
|
2016-12-28 13:36:33 +01:00
|
|
|
else if(BTN_1_PRESSED)
|
|
|
|
{
|
2018-11-16 22:38:48 +01:00
|
|
|
//m_theme.load(fmt("%s.ini", m_themeDataDir.c_str()));
|
2016-12-28 13:36:33 +01:00
|
|
|
m_theme.save();
|
|
|
|
_hideHome();
|
|
|
|
error(_t("savedtheme", L"Theme config saved!"));
|
|
|
|
_showHome();
|
|
|
|
}
|
2016-12-14 19:47:13 +01:00
|
|
|
else if(BTN_A_PRESSED)
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
2019-10-21 15:38:26 +02:00
|
|
|
if(m_btnMgr.selected(m_homeBtnHelp))
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
|
|
|
_hideHome();
|
2016-06-06 15:52:57 +02:00
|
|
|
_about(true);
|
2016-04-03 02:42:09 +02:00
|
|
|
_showHome();
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnReloadCache))
|
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_current_view & COVERFLOW_WII)
|
2016-11-07 16:06:00 +01:00
|
|
|
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_current_view & COVERFLOW_GAMECUBE)
|
2016-11-07 16:06:00 +01:00
|
|
|
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_current_view & COVERFLOW_CHANNEL)
|
2016-11-07 16:06:00 +01:00
|
|
|
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_current_view & COVERFLOW_PLUGIN)
|
2016-11-07 16:06:00 +01:00
|
|
|
m_cfg.setBool(PLUGIN_DOMAIN, "update_cache", true);
|
2019-03-27 17:45:43 +01:00
|
|
|
if(m_current_view & COVERFLOW_HOMEBREW)
|
|
|
|
m_cfg.setBool(HOMEBREW_DOMAIN, "update_cache", true);
|
2016-11-07 16:06:00 +01:00
|
|
|
m_refreshGameList = true;
|
2016-04-03 02:42:09 +02:00
|
|
|
break;
|
|
|
|
}
|
2019-10-21 15:38:26 +02:00
|
|
|
else if(m_btnMgr.selected(m_homeBtnSettings))
|
|
|
|
{
|
|
|
|
_hideHome();
|
|
|
|
_config(1);
|
|
|
|
//if(m_refreshGameList)
|
|
|
|
break;
|
|
|
|
_showHome();
|
|
|
|
}
|
2019-10-28 16:01:52 +01:00
|
|
|
else if(m_btnMgr.selected(m_homeBtnShutdown))
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
|
|
|
_hideHome();
|
2019-10-28 16:01:52 +01:00
|
|
|
_Shutdown();
|
2016-04-03 02:42:09 +02:00
|
|
|
_showHome();
|
|
|
|
}
|
2019-10-21 15:38:26 +02:00
|
|
|
else if(m_btnMgr.selected(m_homeBtnCredits))
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
|
|
|
_hideHome();
|
|
|
|
_about();
|
|
|
|
_showHome();
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnExitTo))
|
|
|
|
{
|
|
|
|
_hideHome();
|
2018-08-06 16:58:26 +02:00
|
|
|
if(isWiiVC)
|
|
|
|
{
|
|
|
|
exitHandler(EXIT_TO_MENU);
|
|
|
|
break;
|
|
|
|
}
|
2019-10-21 15:38:26 +02:00
|
|
|
_ExitTo();
|
2016-04-03 02:42:09 +02:00
|
|
|
_showHome();
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnExplorer))
|
|
|
|
{
|
|
|
|
_hideHome();
|
|
|
|
_Explorer();
|
|
|
|
_showHome();
|
|
|
|
}
|
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
|
|
|
else if(m_btnMgr.selected(m_homeBtnSelPlugin))
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
|
|
|
_hideHome();
|
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
|
|
|
_PluginSettings();
|
2016-11-07 16:06:00 +01:00
|
|
|
if(m_refreshGameList)
|
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
|
|
|
break;
|
2016-04-03 02:42:09 +02:00
|
|
|
_showHome();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(BTN_HOME_PRESSED)
|
|
|
|
{
|
2018-08-06 16:58:26 +02:00
|
|
|
if(isWiiVC)
|
|
|
|
{
|
|
|
|
exitHandler(EXIT_TO_MENU);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
exitHandler(WIIFLOW_DEF);// WIIFLOW_DEF is what is set in main config as the exit to option
|
2016-04-03 02:42:09 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(BTN_B_PRESSED)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
_hideHome();
|
|
|
|
return m_exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CMenu::_ExitTo(void)
|
|
|
|
{
|
|
|
|
SetupInput();
|
|
|
|
_showExitTo();
|
|
|
|
|
|
|
|
while(!m_exit)
|
|
|
|
{
|
|
|
|
_mainLoopCommon();
|
2016-12-14 19:47:13 +01:00
|
|
|
if(BTN_UP_PRESSED)
|
|
|
|
m_btnMgr.up();
|
|
|
|
else if(BTN_DOWN_PRESSED)
|
|
|
|
m_btnMgr.down();
|
2018-07-09 16:53:35 +02:00
|
|
|
else if(BTN_A_PRESSED)// note exitHandler sets m_exit = true
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
|
|
|
if(m_btnMgr.selected(m_homeBtnExitToHBC))
|
|
|
|
{
|
|
|
|
exitHandler(EXIT_TO_HBC);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnExitToMenu))
|
|
|
|
{
|
|
|
|
exitHandler(EXIT_TO_MENU);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnExitToPriiloader))
|
|
|
|
{
|
2017-09-22 00:03:41 +02:00
|
|
|
if(IsOnWiiU())
|
|
|
|
exitHandler(EXIT_TO_WIIU);
|
|
|
|
else
|
|
|
|
exitHandler(EXIT_TO_PRIILOADER);
|
2016-04-03 02:42:09 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnExitToBootmii))
|
|
|
|
{
|
|
|
|
exitHandler(EXIT_TO_BOOTMII);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(m_btnMgr.selected(m_homeBtnExitToNeek))
|
|
|
|
{
|
2018-11-09 23:09:07 +01:00
|
|
|
if(Load_Neek2o_Kernel() && _FindEmuPart(EMU_NAND, false) >= 0)// make sure neek2o and emunand exists
|
2016-04-03 02:42:09 +02:00
|
|
|
{
|
2018-11-09 23:09:07 +01:00
|
|
|
Sys_SetNeekPath(NandHandle.Get_NandPath());
|
|
|
|
exitHandler(EXIT_TO_SMNK2O);
|
|
|
|
break;
|
2016-04-03 02:42:09 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-11-09 23:09:07 +01:00
|
|
|
error(_fmt("errneek1", L"Cannot launch neek2o. Verify your neek2o setup"));
|
|
|
|
_showExitTo();
|
2016-04-03 02:42:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(BTN_HOME_PRESSED)
|
|
|
|
{
|
|
|
|
exitHandler(WIIFLOW_DEF);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(BTN_B_PRESSED)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
_hideExitTo();
|
|
|
|
return m_exit;
|
|
|
|
}
|
|
|
|
|
2019-10-28 16:01:52 +01:00
|
|
|
void CMenu::_Shutdown(void)
|
|
|
|
{
|
|
|
|
SetupInput();
|
|
|
|
_showShutdown();
|
|
|
|
|
|
|
|
while(!m_exit)
|
|
|
|
{
|
|
|
|
_mainLoopCommon();
|
|
|
|
if(BTN_UP_PRESSED)
|
|
|
|
m_btnMgr.up();
|
|
|
|
else if(BTN_DOWN_PRESSED)
|
|
|
|
m_btnMgr.down();
|
|
|
|
else if(BTN_B_PRESSED)
|
|
|
|
break;
|
|
|
|
else if(BTN_A_PRESSED)// note exitHandler sets m_exit = true
|
|
|
|
{
|
|
|
|
if(m_btnMgr.selected(m_shutdownBtnFull))
|
|
|
|
exitHandler(SHUTDOWN_STANDBY);
|
|
|
|
else if(m_btnMgr.selected(m_shutdownBtnStandby))
|
|
|
|
exitHandler(SHUTDOWN_IDLE);
|
|
|
|
else if(m_btnMgr.selected(m_shutdownBtnCancel))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_hideShutdown();
|
|
|
|
}
|
|
|
|
|
2016-04-03 02:42:09 +02:00
|
|
|
void CMenu::_showHome(void)
|
|
|
|
{
|
|
|
|
_setBg(m_homeBg, m_homeBg);
|
|
|
|
m_btnMgr.show(m_homeLblTitle);
|
|
|
|
|
2019-05-15 19:19:07 +02:00
|
|
|
if(!m_locked)
|
|
|
|
{
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.show(m_homeBtnHelp);
|
2019-05-15 19:19:07 +02:00
|
|
|
m_btnMgr.show(m_homeBtnReloadCache);
|
|
|
|
m_btnMgr.show(m_homeBtnExplorer);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.show(m_homeBtnCredits);
|
2019-10-28 16:01:52 +01:00
|
|
|
m_btnMgr.show(m_homeBtnShutdown);
|
2019-05-15 19:19:07 +02:00
|
|
|
m_btnMgr.show(m_homeBtnExitTo);
|
|
|
|
}
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.show(m_homeBtnSettings);
|
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
|
|
|
m_btnMgr.show(m_homeBtnSelPlugin);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
m_btnMgr.show(m_homeLblBattery);
|
|
|
|
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_homeLblUser); ++i)
|
|
|
|
if(m_homeLblUser[i] != -1)
|
|
|
|
m_btnMgr.show(m_homeLblUser[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_showExitTo(void)
|
|
|
|
{
|
|
|
|
_setBg(m_homeBg, m_homeBg);
|
|
|
|
m_btnMgr.show(m_exittoLblTitle);
|
|
|
|
|
|
|
|
m_btnMgr.show(m_homeBtnExitToHBC);
|
|
|
|
m_btnMgr.show(m_homeBtnExitToMenu);
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.show(m_homeBtnExitToNeek);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_btnMgr.show(m_homeBtnExitToPriiloader);// exit to wii u on wii u
|
|
|
|
if(IsOnWiiU() == false)
|
|
|
|
m_btnMgr.show(m_homeBtnExitToBootmii);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_exittoLblUser); ++i)
|
|
|
|
if(m_exittoLblUser[i] != -1)
|
|
|
|
m_btnMgr.show(m_exittoLblUser[i]);
|
|
|
|
}
|
|
|
|
|
2019-10-28 16:01:52 +01:00
|
|
|
void CMenu::_showShutdown(void)
|
|
|
|
{
|
|
|
|
_setBg(m_homeBg, m_homeBg);
|
|
|
|
|
|
|
|
m_btnMgr.show(m_shutdownLblQuestion);
|
|
|
|
m_btnMgr.show(m_shutdownBtnFull);
|
|
|
|
if(IsOnWiiU() == false)
|
|
|
|
m_btnMgr.show(m_shutdownBtnStandby);
|
|
|
|
m_btnMgr.show(m_shutdownBtnCancel);
|
|
|
|
}
|
|
|
|
|
2016-04-03 02:42:09 +02:00
|
|
|
void CMenu::_hideHome(bool instant)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_homeLblTitle, instant);
|
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnHelp, instant);
|
2016-04-03 02:42:09 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnReloadCache, instant);
|
|
|
|
m_btnMgr.hide(m_homeBtnExplorer, instant);
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnSelPlugin, instant);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnCredits, instant);
|
2019-10-28 16:01:52 +01:00
|
|
|
m_btnMgr.hide(m_homeBtnShutdown, instant);
|
2016-04-03 02:42:09 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnExitTo, instant);
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnSettings, instant);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
m_btnMgr.hide(m_homeLblBattery, instant);
|
|
|
|
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_homeLblUser); ++i)
|
|
|
|
if(m_homeLblUser[i] != -1)
|
|
|
|
m_btnMgr.hide(m_homeLblUser[i], instant);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_hideExitTo(bool instant)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_exittoLblTitle, instant);
|
|
|
|
|
|
|
|
m_btnMgr.hide(m_homeBtnExitToHBC, instant);
|
|
|
|
m_btnMgr.hide(m_homeBtnExitToMenu, instant);
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnExitToNeek, instant);
|
2016-04-03 02:42:09 +02:00
|
|
|
m_btnMgr.hide(m_homeBtnExitToPriiloader, instant);
|
|
|
|
m_btnMgr.hide(m_homeBtnExitToBootmii, instant);
|
|
|
|
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_exittoLblUser); ++i)
|
|
|
|
if(m_exittoLblUser[i] != -1)
|
|
|
|
m_btnMgr.hide(m_exittoLblUser[i], instant);
|
|
|
|
}
|
|
|
|
|
2019-10-28 16:01:52 +01:00
|
|
|
void CMenu::_hideShutdown(bool instant)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_shutdownLblQuestion, instant);
|
|
|
|
m_btnMgr.hide(m_shutdownBtnFull, instant);
|
|
|
|
m_btnMgr.hide(m_shutdownBtnStandby, instant);
|
|
|
|
m_btnMgr.hide(m_shutdownBtnCancel, instant);
|
|
|
|
}
|
|
|
|
|
2016-04-03 02:42:09 +02:00
|
|
|
void CMenu::_initHomeAndExitToMenu()
|
|
|
|
{
|
|
|
|
m_homeBg = _texture("HOME/BG", "texture", theme.bg, false);
|
2018-06-12 23:27:52 +02:00
|
|
|
|
|
|
|
//Home Menu
|
|
|
|
_addUserLabels(m_homeLblUser, ARRAY_SIZE(m_homeLblUser), "HOME");
|
2018-12-28 01:47:00 +01:00
|
|
|
m_homeLblTitle = _addLabel("HOME/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
m_homeBtnHelp = _addButton("HOME/HELP", theme.btnFont, L"", 60, 100, 250, 48, theme.btnFontColor);
|
2016-04-03 02:42:09 +02:00
|
|
|
m_homeBtnReloadCache = _addButton("HOME/RELOAD_CACHE", theme.btnFont, L"", 60, 180, 250, 48, theme.btnFontColor);
|
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
|
|
|
m_homeBtnExplorer = _addButton("HOME/EXPLORER", theme.btnFont, L"", 60, 260, 250, 48, theme.btnFontColor);
|
2019-10-21 15:38:26 +02:00
|
|
|
m_homeBtnSelPlugin = _addButton("HOME/SELECT_PLUGIN", theme.btnFont, L"", 60, 340, 250, 48, theme.btnFontColor);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
m_homeBtnCredits = _addButton("HOME/CREDITS", theme.btnFont, L"", 330, 100, 250, 48, theme.btnFontColor);
|
2019-10-28 16:01:52 +01:00
|
|
|
m_homeBtnShutdown = _addButton("HOME/SHUTDOWN", theme.btnFont, L"", 330, 180, 250, 48, theme.btnFontColor);
|
2016-04-03 02:42:09 +02:00
|
|
|
m_homeBtnExitTo = _addButton("HOME/EXIT_TO", theme.btnFont, L"", 330, 260, 250, 48, theme.btnFontColor);
|
2019-10-21 15:38:26 +02:00
|
|
|
m_homeBtnSettings = _addButton("HOME/SETTINGS", theme.btnFont, L"", 330, 340, 250, 48, theme.btnFontColor);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
m_homeLblBattery = _addLabel("HOME/BATTERY", theme.btnFont, L"", 0, 420, 640, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
|
|
|
|
2018-06-12 23:27:52 +02:00
|
|
|
_setHideAnim(m_homeLblTitle, "HOME/TITLE", 0, 0, -2.f, 0.f);
|
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
_setHideAnim(m_homeBtnHelp, "HOME/HELP", 50, 0, 1.f, 0.f);
|
2016-04-03 02:42:09 +02:00
|
|
|
_setHideAnim(m_homeBtnReloadCache, "HOME/RELOAD_CACHE", 50, 0, 1.f, 0.f);
|
|
|
|
_setHideAnim(m_homeBtnExplorer, "HOME/EXPLORER", 50, 0, 1.f, 0.f);
|
2019-10-21 15:38:26 +02:00
|
|
|
_setHideAnim(m_homeBtnSelPlugin, "HOME/SELECT_PLUGIN", 50, 0, 1.f, 0.f);
|
|
|
|
|
|
|
|
_setHideAnim(m_homeBtnCredits, "HOME/CREDITS", -50, 0, 1.f, 0.f);
|
2019-10-28 16:01:52 +01:00
|
|
|
_setHideAnim(m_homeBtnShutdown, "HOME/SHUTDOWN", -50, 0, 1.f, 0.f);
|
2016-04-03 02:42:09 +02:00
|
|
|
_setHideAnim(m_homeBtnExitTo, "HOME/EXIT_TO", -50, 0, 1.f, 0.f);
|
2019-10-21 15:38:26 +02:00
|
|
|
_setHideAnim(m_homeBtnSettings, "HOME/SETTINGS", -50, 0, 1.f, 0.f);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
_setHideAnim(m_homeLblBattery, "HOME/BATTERY", 0, 0, -2.f, 0.f);
|
|
|
|
|
|
|
|
_textHome();
|
|
|
|
_hideHome(true);
|
|
|
|
|
|
|
|
//ExitTo Menu
|
|
|
|
_addUserLabels(m_exittoLblUser, ARRAY_SIZE(m_exittoLblUser), "EXIT_TO");
|
2018-12-28 01:47:00 +01:00
|
|
|
m_exittoLblTitle = _addLabel("EXIT_TO/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
2016-04-03 02:42:09 +02:00
|
|
|
|
|
|
|
m_homeBtnExitToHBC = _addButton("EXIT_TO/HBC", theme.btnFont, L"", 185, 120, 270, 48, theme.btnFontColor);
|
|
|
|
m_homeBtnExitToMenu = _addButton("EXIT_TO/MENU", theme.btnFont, L"", 185, 180, 270, 48, theme.btnFontColor);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_homeBtnExitToNeek = _addButton("EXIT_TO/NEEK", theme.btnFont, L"", 185, 240, 270, 48, theme.btnFontColor);
|
|
|
|
m_homeBtnExitToPriiloader = _addButton("EXIT_TO/PRIILOADER", theme.btnFont, L"", 185, 300, 270, 48, theme.btnFontColor);
|
|
|
|
m_homeBtnExitToBootmii = _addButton("EXIT_TO/BOOTMII", theme.btnFont, L"", 185, 360, 270, 48, theme.btnFontColor);
|
|
|
|
|
2018-06-12 23:27:52 +02:00
|
|
|
_setHideAnim(m_exittoLblTitle, "EXIT_TO/TITLE", 0, 0, -2.f, 0.f);
|
|
|
|
|
2016-04-03 02:42:09 +02:00
|
|
|
_setHideAnim(m_homeBtnExitToHBC, "EXIT_TO/HBC", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_homeBtnExitToMenu, "EXIT_TO/MENU", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_homeBtnExitToPriiloader, "EXIT_TO/PRIILOADER", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_homeBtnExitToBootmii, "EXIT_TO/BOOTMII", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_homeBtnExitToNeek, "EXIT_TO/NEEK", 0, 0, -4.f, 0.f);
|
|
|
|
|
|
|
|
_textExitTo();
|
|
|
|
_hideExitTo(true);
|
2019-10-28 16:01:52 +01:00
|
|
|
|
|
|
|
//Shutdown Menu
|
|
|
|
m_shutdownLblQuestion = _addLabel("SHUTDOWN/QUESTION", theme.lblFont, L"", 185, 120, 270, 48, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
|
|
|
m_shutdownBtnFull = _addButton("SHUTDOWN/FULL", theme.btnFont, L"", 185, 180, 270, 48, theme.btnFontColor);
|
|
|
|
m_shutdownBtnStandby = _addButton("SHUTDOWN/STANDBY", theme.btnFont, L"", 185, 240, 270, 48, theme.btnFontColor);
|
|
|
|
m_shutdownBtnCancel = _addButton("SHUTDOWN/CANCEL", theme.btnFont, L"", 185, 300, 270, 48, theme.btnFontColor);
|
|
|
|
|
|
|
|
_setHideAnim(m_shutdownLblQuestion, "SHUTDOWN/QUESTION", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_shutdownBtnFull, "SHUTDOWN/FULL", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_shutdownBtnStandby, "SHUTDOWN/STANDBY", 0, 0, -4.f, 0.f);
|
|
|
|
_setHideAnim(m_shutdownBtnCancel, "SHUTDOWN/CANCEL", 0, 0, -4.f, 0.f);
|
|
|
|
|
|
|
|
_textShutdown();
|
|
|
|
_hideShutdown(true);
|
2016-04-03 02:42:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_textHome(void)
|
|
|
|
{
|
2018-11-12 21:38:37 +01:00
|
|
|
m_btnMgr.setText(m_homeLblTitle, wfmt(L"%s %s", APP_NAME, APP_VERSION));
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnHelp, _t("about10", L"Help Guide"));
|
2016-04-03 02:42:09 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnReloadCache, _t("home2", L"Reload Cache"));
|
|
|
|
m_btnMgr.setText(m_homeBtnExplorer, _t("home8", L"File Explorer"));
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnSelPlugin, _t("cfgpl1", L"Select Plugins"));
|
2016-04-03 02:42:09 +02:00
|
|
|
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnCredits, _t("home4", L"Credits"));
|
2019-10-28 16:01:52 +01:00
|
|
|
m_btnMgr.setText(m_homeBtnShutdown, _t("home13", L"Shutdown"));
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnExitTo, _t("home5", L"Exit To"));
|
|
|
|
m_btnMgr.setText(m_homeBtnSettings, _t("cfg1", L"Settings"));
|
2016-04-03 02:42:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_textExitTo(void)
|
|
|
|
{
|
|
|
|
m_btnMgr.setText(m_exittoLblTitle, _t("exit_to", L"Exit To"));
|
|
|
|
m_btnMgr.setText(m_homeBtnExitToHBC, _t("hbc", L"Homebrew Channel"));
|
|
|
|
m_btnMgr.setText(m_homeBtnExitToMenu, _t("menu", L"System Menu"));
|
2019-10-21 15:38:26 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnExitToNeek, _t("neek2o", L"neek2o"));
|
2017-09-22 00:03:41 +02:00
|
|
|
if(IsOnWiiU())
|
|
|
|
m_btnMgr.setText(m_homeBtnExitToPriiloader, _t("wiiu", L"Wii U Menu"));
|
|
|
|
else
|
|
|
|
m_btnMgr.setText(m_homeBtnExitToPriiloader, _t("prii", L"Priiloader"));
|
2016-04-03 02:42:09 +02:00
|
|
|
m_btnMgr.setText(m_homeBtnExitToBootmii, _t("bootmii", L"Bootmii"));
|
|
|
|
}
|
2018-06-12 23:27:52 +02:00
|
|
|
|
2019-10-28 16:01:52 +01:00
|
|
|
void CMenu::_textShutdown(void)
|
|
|
|
{
|
|
|
|
m_btnMgr.setText(m_shutdownLblQuestion, _t("shutdown1", L"Shutdown how?"));
|
|
|
|
m_btnMgr.setText(m_shutdownBtnFull, _t("shutdown2", L"Full Shutdown"));
|
|
|
|
m_btnMgr.setText(m_shutdownBtnStandby, _t("shutdown3", L"Standby"));
|
|
|
|
m_btnMgr.setText(m_shutdownBtnCancel, _t("shutdown4", L"Cancel"));
|
|
|
|
}
|
2018-06-12 23:27:52 +02:00
|
|
|
/*******************************************************************************/
|
|
|
|
|
|
|
|
int CMenu::_cacheCovers()
|
|
|
|
{
|
|
|
|
CoverFlow.stopCoverLoader(true);
|
|
|
|
bool m_pluginCacheFolders = m_cfg.getBool(PLUGIN_DOMAIN, "subfolder_cache", true);
|
|
|
|
|
2020-03-19 23:38:32 +01:00
|
|
|
char coverPath[MAX_FAT_PATH];//1024
|
2019-03-27 17:45:43 +01:00
|
|
|
char wfcPath[MAX_FAT_PATH+20];
|
2018-06-12 23:27:52 +02:00
|
|
|
char cachePath[MAX_FAT_PATH];
|
|
|
|
|
|
|
|
u32 total = m_gameList.size();
|
|
|
|
m_thrdTotal = total;
|
|
|
|
u32 index = 0;
|
|
|
|
|
2019-03-27 17:45:43 +01:00
|
|
|
bool smallBox = false;
|
|
|
|
if(m_current_view == COVERFLOW_HOMEBREW && !m_sourceflow)
|
|
|
|
smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
|
|
|
|
else if(m_sourceflow)
|
|
|
|
smallBox = m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox", false);
|
|
|
|
else if(m_current_view == COVERFLOW_PLUGIN && !m_sourceflow)
|
|
|
|
{
|
|
|
|
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
|
|
|
if(enabledPluginsCount == 1 && m_cfg.getBool(PLUGIN_ENABLED, "48425257"))
|
|
|
|
smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
|
|
|
|
}
|
|
|
|
|
2018-06-12 23:27:52 +02:00
|
|
|
for(vector<dir_discHdr>::iterator hdr = m_gameList.begin(); hdr != m_gameList.end(); ++hdr)
|
|
|
|
{
|
|
|
|
index++;
|
2018-11-28 01:08:23 +01:00
|
|
|
update_pThread(index, false);
|
2020-04-14 04:41:57 +02:00
|
|
|
m_thrdMessage = wfmt(_fmt("dlmsg31", L"Converting cover %i of %i"), index, total);
|
2018-06-12 23:27:52 +02:00
|
|
|
m_thrdMessageAdded = true;
|
|
|
|
|
|
|
|
/* get cover png path */
|
2020-02-02 21:25:05 +01:00
|
|
|
bool blankCover = false;
|
2019-03-27 17:45:43 +01:00
|
|
|
bool fullCover = true;
|
2018-07-16 15:08:45 +02:00
|
|
|
strlcpy(coverPath, getBoxPath(&(*hdr)), sizeof(coverPath));
|
2020-03-19 23:38:32 +01:00
|
|
|
//gprintf("boxpath=%s\n", coverPath);
|
2019-03-27 17:45:43 +01:00
|
|
|
if(!fsop_FileExist(coverPath) || smallBox)
|
2018-06-12 23:27:52 +02:00
|
|
|
{
|
|
|
|
fullCover = false;
|
2018-07-16 15:08:45 +02:00
|
|
|
strlcpy(coverPath, getFrontPath(&(*hdr)), sizeof(coverPath));
|
2020-03-19 23:38:32 +01:00
|
|
|
//gprintf("frontpath=%s\n", coverPath);
|
2019-03-27 17:45:43 +01:00
|
|
|
if(!fsop_FileExist(coverPath) && !smallBox)
|
|
|
|
{
|
|
|
|
fullCover = true;
|
|
|
|
strlcpy(coverPath, getBlankCoverPath(&(*hdr)), sizeof(coverPath));
|
2020-03-19 23:38:32 +01:00
|
|
|
//gprintf("blankpath=%s\n", coverPath);
|
2020-02-02 21:25:05 +01:00
|
|
|
blankCover = true;
|
2019-03-27 17:45:43 +01:00
|
|
|
if(!fsop_FileExist(coverPath))
|
|
|
|
continue;
|
|
|
|
}
|
2018-06-12 23:27:52 +02:00
|
|
|
}
|
|
|
|
|
2019-03-27 17:45:43 +01:00
|
|
|
/* get cache folder path */
|
2018-06-12 23:27:52 +02:00
|
|
|
if(hdr->type == TYPE_PLUGIN && m_pluginCacheFolders)
|
|
|
|
snprintf(cachePath, sizeof(cachePath), "%s/%s", m_cacheDir.c_str(), m_plugin.GetCoverFolderName(hdr->settings[0]));
|
2019-03-27 17:45:43 +01:00
|
|
|
else if(m_sourceflow)
|
|
|
|
snprintf(cachePath, sizeof(cachePath), "%s/sourceflow", m_cacheDir.c_str());
|
|
|
|
else if(hdr->type == TYPE_HOMEBREW)
|
|
|
|
snprintf(cachePath, sizeof(cachePath), "%s/homebrew", m_cacheDir.c_str());
|
2018-06-12 23:27:52 +02:00
|
|
|
else
|
|
|
|
snprintf(cachePath, sizeof(cachePath), "%s", m_cacheDir.c_str());
|
2020-03-19 23:38:32 +01:00
|
|
|
//gprintf("cachepath=%s\n", cachePath);
|
2018-06-12 23:27:52 +02:00
|
|
|
|
2020-02-02 21:25:05 +01:00
|
|
|
/* get game name or ID */
|
|
|
|
const char *gameNameOrID = NULL;
|
|
|
|
if(!blankCover)
|
|
|
|
gameNameOrID = CoverFlow.getFilenameId(&(*hdr));// &(*hdr) converts iterator to pointer to mem address
|
|
|
|
else
|
|
|
|
gameNameOrID = strrchr(coverPath, '/') + 1;
|
2020-03-19 23:38:32 +01:00
|
|
|
//gprintf("nameorid=%s\n", gameNameOrID);
|
2020-02-02 21:25:05 +01:00
|
|
|
|
2019-03-27 17:45:43 +01:00
|
|
|
/* get cover wfc path */
|
|
|
|
if(smallBox)
|
|
|
|
snprintf(wfcPath, sizeof(wfcPath), "%s/%s_small.wfc", cachePath, gameNameOrID);
|
|
|
|
else
|
|
|
|
snprintf(wfcPath, sizeof(wfcPath), "%s/%s.wfc", cachePath, gameNameOrID);
|
2020-03-19 23:38:32 +01:00
|
|
|
//gprintf("wfcpath=%s\n", wfcPath);
|
2018-06-12 23:27:52 +02:00
|
|
|
|
|
|
|
/* if wfc doesn't exist or is flat and have full cover */
|
|
|
|
if(!fsop_FileExist(wfcPath) || (!CoverFlow.fullCoverCached(wfcPath) && fullCover))
|
|
|
|
{
|
|
|
|
/* create cache subfolders if needed */
|
|
|
|
if(!fsop_FolderExist(cachePath))
|
|
|
|
fsop_MakeFolder(cachePath);
|
|
|
|
|
|
|
|
/* create cover texture */
|
2018-11-12 21:38:37 +01:00
|
|
|
CoverFlow.cacheCoverFile(wfcPath, coverPath, fullCover);
|
2018-06-12 23:27:52 +02:00
|
|
|
}
|
2018-07-16 15:08:45 +02:00
|
|
|
|
|
|
|
// cache wii and channel banners
|
|
|
|
if(hdr->type == TYPE_WII_GAME || hdr->type == TYPE_CHANNEL || hdr->type == TYPE_EMUCHANNEL)
|
|
|
|
{
|
|
|
|
CurrentBanner.ClearBanner();
|
|
|
|
char cached_banner[256];
|
|
|
|
strlcpy(cached_banner, fmt("%s/%s.bnr", m_bnrCacheDir.c_str(), hdr->id), sizeof(cached_banner));
|
|
|
|
if(fsop_FileExist(cached_banner))
|
|
|
|
continue;
|
|
|
|
if(hdr->type == TYPE_WII_GAME)
|
|
|
|
{
|
|
|
|
_extractBnr(&(*hdr));
|
|
|
|
}
|
|
|
|
else if(hdr->type == TYPE_CHANNEL || hdr->type == TYPE_EMUCHANNEL)
|
|
|
|
{
|
|
|
|
ChannelHandle.GetBanner(TITLE_ID(hdr->settings[0], hdr->settings[1]));
|
|
|
|
}
|
|
|
|
|
|
|
|
if(CurrentBanner.IsValid())
|
|
|
|
fsop_WriteFile(cached_banner, CurrentBanner.GetBannerFile(), CurrentBanner.GetBannerFileSize());
|
|
|
|
}
|
2018-06-12 23:27:52 +02:00
|
|
|
}
|
2018-07-16 15:08:45 +02:00
|
|
|
CurrentBanner.ClearBanner();
|
2018-06-12 23:27:52 +02:00
|
|
|
CoverFlow.startCoverLoader();
|
|
|
|
return 0;
|
|
|
|
}
|