2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
#include <ogc/machine/processor.h>
|
2012-05-15 23:33:53 +02:00
|
|
|
#include <ogc/lwp_threads.h>
|
2012-01-21 21:57:41 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <time.h>
|
2012-05-11 05:37:56 +02:00
|
|
|
#include <network.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "menu.hpp"
|
2012-06-16 19:03:23 +02:00
|
|
|
#include "types.h"
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "banner/BannerWindow.hpp"
|
2012-10-13 00:25:22 +02:00
|
|
|
#include "booter/external_booter.hpp"
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "channel/channel_launcher.h"
|
|
|
|
#include "channel/channels.h"
|
|
|
|
#include "channel/nand.hpp"
|
2012-12-08 22:16:05 +01:00
|
|
|
#include "channel/identify.h"
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "devicemounter/DeviceHandler.hpp"
|
2012-08-25 17:10:57 +02:00
|
|
|
#include "devicemounter/sdhc.h"
|
2012-07-14 18:19:41 +02:00
|
|
|
#include "devicemounter/usbstorage.h"
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "gc/gc.hpp"
|
|
|
|
#include "gc/gcdisc.hpp"
|
|
|
|
#include "gui/WiiMovie.hpp"
|
|
|
|
#include "gui/GameTDB.hpp"
|
|
|
|
#include "homebrew/homebrew.h"
|
|
|
|
#include "loader/alt_ios.h"
|
|
|
|
#include "loader/wdvd.h"
|
|
|
|
#include "loader/playlog.h"
|
|
|
|
#include "loader/wbfs.h"
|
|
|
|
#include "loader/wip.h"
|
|
|
|
#include "loader/frag.h"
|
|
|
|
#include "loader/fst.h"
|
|
|
|
#include "loader/cios.h"
|
|
|
|
#include "loader/nk.h"
|
2012-11-24 20:41:27 +01:00
|
|
|
#include "memory/memory.h"
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "network/http.h"
|
|
|
|
#include "network/gcard.h"
|
2012-07-14 18:19:41 +02:00
|
|
|
|
2012-04-08 17:54:34 +02:00
|
|
|
//sounds
|
2012-02-17 15:45:59 +01:00
|
|
|
extern const u8 gc_ogg[];
|
|
|
|
extern const u32 gc_ogg_size;
|
|
|
|
|
2012-07-04 00:08:51 +02:00
|
|
|
bool m_zoom_banner = false;
|
2012-09-13 16:54:17 +02:00
|
|
|
s16 m_gameBtnPlayFull;
|
|
|
|
s16 m_gameBtnBackFull;
|
2016-04-02 19:19:19 +02:00
|
|
|
s16 m_gameBtnToggle;
|
|
|
|
s16 m_gameBtnToggleFull;
|
2012-07-03 18:26:49 +02:00
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
const CMenu::SOption CMenu::_languages[11] = {
|
|
|
|
{ "lngdef", L"Default" },
|
|
|
|
{ "lngjap", L"Japanese" },
|
|
|
|
{ "lngeng", L"English" },
|
|
|
|
{ "lngger", L"German" },
|
|
|
|
{ "lngfre", L"French" },
|
|
|
|
{ "lngspa", L"Spanish" },
|
|
|
|
{ "lngita", L"Italian" },
|
|
|
|
{ "lngdut", L"Dutch" },
|
|
|
|
{ "lngsch", L"S. Chinese" },
|
|
|
|
{ "lngtch", L"T. Chinese" },
|
|
|
|
{ "lngkor", L"Korean" }
|
|
|
|
};
|
|
|
|
|
2012-06-28 15:05:31 +02:00
|
|
|
const CMenu::SOption CMenu::_GlobalVideoModes[6] = {
|
|
|
|
{ "vidgame", L"Game" },
|
|
|
|
{ "vidsys", L"System" },
|
|
|
|
{ "vidp50", L"PAL 50Hz" },
|
|
|
|
{ "vidp60", L"PAL 60Hz" },
|
|
|
|
{ "vidntsc", L"NTSC" },
|
|
|
|
{ "vidprog", L"Progressive" },
|
|
|
|
};
|
|
|
|
|
|
|
|
const CMenu::SOption CMenu::_VideoModes[7] = {
|
2012-01-21 21:57:41 +01:00
|
|
|
{ "viddef", L"Default" },
|
2012-06-28 15:05:31 +02:00
|
|
|
{ "vidgame", L"Game" },
|
|
|
|
{ "vidsys", L"System" },
|
2012-01-21 21:57:41 +01:00
|
|
|
{ "vidp50", L"PAL 50Hz" },
|
|
|
|
{ "vidp60", L"PAL 60Hz" },
|
|
|
|
{ "vidntsc", L"NTSC" },
|
2012-06-28 15:05:31 +02:00
|
|
|
{ "vidprog", L"Progressive" },
|
2012-01-21 21:57:41 +01:00
|
|
|
};
|
|
|
|
|
2016-04-02 18:58:12 +02:00
|
|
|
const CMenu::SOption CMenu::_GlobalGCvideoModes[8] = {
|
2012-03-04 22:33:14 +01:00
|
|
|
{ "DMLdefG", L"Game" },
|
|
|
|
{ "DMLpal", L"PAL 576i" },
|
2012-03-25 21:52:35 +02:00
|
|
|
{ "DMLntsc", L"NTSC 480i" },
|
|
|
|
{ "DMLpal60", L"PAL 480i" },
|
|
|
|
{ "DMLprog", L"NTSC 480p" },
|
2016-04-02 17:46:06 +02:00
|
|
|
{ "DMLprogP", L"PAL 480p" },
|
|
|
|
{ "DMLmpal", L"MPAL" },
|
|
|
|
{ "DMLmpalP", L"MPAL-P" }
|
2012-03-04 22:33:14 +01:00
|
|
|
};
|
|
|
|
|
2016-04-02 18:58:12 +02:00
|
|
|
const CMenu::SOption CMenu::_GCvideoModes[9] = {
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "DMLdef", L"Default" },
|
2012-03-04 22:33:14 +01:00
|
|
|
{ "DMLdefG", L"Game" },
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "DMLpal", L"PAL 576i" },
|
2012-03-25 21:52:35 +02:00
|
|
|
{ "DMLntsc", L"NTSC 480i" },
|
|
|
|
{ "DMLpal60", L"PAL 480i" },
|
|
|
|
{ "DMLprog", L"NTSC 480p" },
|
2016-04-02 17:46:06 +02:00
|
|
|
{ "DMLprogP", L"PAL 480p" },
|
|
|
|
{ "DMLmpal", L"MPAL" },
|
|
|
|
{ "DMLmpalP", L"MPAL-P" }
|
2012-03-04 22:33:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const CMenu::SOption CMenu::_GlobalGClanguages[7] = {
|
|
|
|
{ "lngsys", L"System" },
|
|
|
|
{ "lngeng", L"English" },
|
|
|
|
{ "lngger", L"German" },
|
|
|
|
{ "lngfre", L"French" },
|
|
|
|
{ "lngspa", L"Spanish" },
|
|
|
|
{ "lngita", L"Italian" },
|
|
|
|
{ "lngdut", L"Dutch" }
|
2012-01-22 01:10:20 +01:00
|
|
|
};
|
|
|
|
|
2012-03-04 22:33:14 +01:00
|
|
|
const CMenu::SOption CMenu::_GClanguages[8] = {
|
2012-02-02 23:37:21 +01:00
|
|
|
{ "lngdef", L"Default" },
|
2012-03-04 22:33:14 +01:00
|
|
|
{ "lngsys", L"System" },
|
2012-02-02 23:37:21 +01:00
|
|
|
{ "lngeng", L"English" },
|
|
|
|
{ "lngger", L"German" },
|
|
|
|
{ "lngfre", L"French" },
|
|
|
|
{ "lngspa", L"Spanish" },
|
|
|
|
{ "lngita", L"Italian" },
|
|
|
|
{ "lngdut", L"Dutch" }
|
2012-02-02 23:22:46 +01:00
|
|
|
};
|
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
const CMenu::SOption CMenu::_ChannelsType[3] = {
|
|
|
|
{ "ChanReal", L"Real NAND" },
|
|
|
|
{ "ChanEmu", L"Emu NAND" },
|
|
|
|
{ "ChanBoth", L"Both" },
|
|
|
|
};
|
|
|
|
|
2012-06-07 02:34:47 +02:00
|
|
|
const CMenu::SOption CMenu::_NandEmu[2] = {
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "NANDpart", L"Partial" },
|
|
|
|
{ "NANDfull", L"Full" },
|
|
|
|
};
|
|
|
|
|
2012-03-13 00:57:59 +01:00
|
|
|
const CMenu::SOption CMenu::_GlobalSaveEmu[4] = {
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "SaveOffG", L"Off" },
|
2012-03-13 00:57:59 +01:00
|
|
|
{ "SavePartG", L"Game save" },
|
|
|
|
{ "SaveRegG", L"Regionswitch" },
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "SaveFullG", L"Full" },
|
|
|
|
};
|
|
|
|
|
2012-03-13 00:57:59 +01:00
|
|
|
const CMenu::SOption CMenu::_SaveEmu[5] = {
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "SaveDef", L"Default" },
|
|
|
|
{ "SaveOff", L"Off" },
|
2012-03-13 00:57:59 +01:00
|
|
|
{ "SavePart", L"Game save" },
|
|
|
|
{ "SaveReg", L"Regionswitch" },
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "SaveFull", L"Full" },
|
2012-01-23 22:15:14 +01:00
|
|
|
};
|
|
|
|
|
2012-01-27 14:59:36 +01:00
|
|
|
const CMenu::SOption CMenu::_AspectRatio[3] = {
|
2012-01-29 20:28:31 +01:00
|
|
|
{ "aspectDef", L"Default" },
|
|
|
|
{ "aspect43", L"Force 4:3" },
|
|
|
|
{ "aspect169", L"Force 16:9" },
|
2012-01-27 14:59:36 +01:00
|
|
|
};
|
|
|
|
|
2016-04-03 02:31:02 +02:00
|
|
|
//still need to change the NMM's
|
2016-04-02 18:58:12 +02:00
|
|
|
const CMenu::SOption CMenu::_NinEmuCard[5] = {
|
2012-03-12 17:14:56 +01:00
|
|
|
{ "NMMDef", L"Default" },
|
|
|
|
{ "NMMOff", L"Disabled" },
|
|
|
|
{ "NMMon", L"Enabled" },
|
2016-04-02 17:46:06 +02:00
|
|
|
{ "NMMMulti", L"Multi Saves" },
|
2012-03-12 17:14:56 +01:00
|
|
|
{ "NMMdebug", L"Debug" },
|
|
|
|
};
|
|
|
|
|
2016-04-03 02:31:02 +02:00
|
|
|
const CMenu::SOption CMenu::_GlobalGCLoaders[2] = {
|
2013-09-24 23:24:03 +02:00
|
|
|
{ "GC_Devo", L"Devolution" },
|
|
|
|
{ "GC_Nindnt", L"Nintendont" },
|
2013-08-17 15:21:43 +02:00
|
|
|
};
|
|
|
|
|
2016-04-03 02:31:02 +02:00
|
|
|
const CMenu::SOption CMenu::_GCLoader[3] = {
|
2012-07-15 00:44:57 +02:00
|
|
|
{ "GC_Def", L"Default" },
|
2013-09-24 23:24:03 +02:00
|
|
|
{ "GC_Devo", L"Devolution" },
|
|
|
|
{ "GC_Nindnt", L"Nintendont" },
|
2012-07-15 00:44:57 +02:00
|
|
|
};
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
const CMenu::SOption CMenu::_vidModePatch[4] = {
|
|
|
|
{ "vmpnone", L"None" },
|
|
|
|
{ "vmpnormal", L"Normal" },
|
|
|
|
{ "vmpmore", L"More" },
|
|
|
|
{ "vmpall", L"All" }
|
|
|
|
};
|
|
|
|
|
|
|
|
const CMenu::SOption CMenu::_hooktype[8] = {
|
2013-05-21 14:43:14 +02:00
|
|
|
{ "hook_auto", L"AUTO" },
|
2012-01-21 21:57:41 +01:00
|
|
|
{ "hooktype1", L"VBI" },
|
|
|
|
{ "hooktype2", L"KPAD read" },
|
|
|
|
{ "hooktype3", L"Joypad" },
|
|
|
|
{ "hooktype4", L"GXDraw" },
|
|
|
|
{ "hooktype5", L"GXFlush" },
|
|
|
|
{ "hooktype6", L"OSSleepThread" },
|
|
|
|
{ "hooktype7", L"AXNextFrame" },
|
|
|
|
};
|
2012-05-03 01:08:11 +02:00
|
|
|
|
2013-05-21 14:43:14 +02:00
|
|
|
const CMenu::SOption CMenu::_debugger[3] = {
|
|
|
|
{ "disabled", L"Disabled" },
|
|
|
|
{ "dbg_gecko", L"Gecko" },
|
|
|
|
{ "dbgfwrite", L"OSReport" },
|
|
|
|
};
|
|
|
|
|
2012-05-06 14:59:09 +02:00
|
|
|
map<u8, u8> CMenu::_installed_cios;
|
2012-01-21 21:57:41 +01:00
|
|
|
u8 banner_title[84];
|
|
|
|
|
|
|
|
static inline int loopNum(int i, int s)
|
|
|
|
{
|
2016-04-03 03:03:39 +02:00
|
|
|
return (i + s) % s;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-10-15 21:16:14 +02:00
|
|
|
static void _extractBannerTitle(int language)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-10-15 21:16:14 +02:00
|
|
|
memset(banner_title, 0, 84);
|
|
|
|
CurrentBanner.GetName(banner_title, language);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-10-15 21:16:14 +02:00
|
|
|
static void _extractChannelBnr(const u64 chantitle)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-10-15 21:16:14 +02:00
|
|
|
ChannelHandle.GetBanner(chantitle);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2013-01-21 00:30:28 +01:00
|
|
|
static void _extractBnr(const dir_discHdr *hdr)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-07-04 20:58:31 +02:00
|
|
|
u32 size = 0;
|
2012-09-22 15:47:52 +02:00
|
|
|
DeviceHandle.OpenWBFS(currentPartition);
|
2012-06-16 19:03:23 +02:00
|
|
|
wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) &hdr->id, (char *) hdr->path);
|
2012-09-23 15:20:01 +02:00
|
|
|
if(disc != NULL)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
void *bnr = NULL;
|
2012-12-27 21:22:40 +01:00
|
|
|
size = wbfs_extract_file(disc, (char*)"opening.bnr", &bnr);
|
2012-07-04 20:58:31 +02:00
|
|
|
if(size > 0)
|
2013-10-19 20:59:17 +02:00
|
|
|
CurrentBanner.SetBanner((u8*)bnr, size, false, true);
|
2012-01-21 21:57:41 +01:00
|
|
|
WBFS_CloseDisc(disc);
|
|
|
|
}
|
2012-09-22 15:47:52 +02:00
|
|
|
WBFS_Close();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static int GetLanguage(const char *lang)
|
|
|
|
{
|
|
|
|
if (strncmp(lang, "JP", 2) == 0) return CONF_LANG_JAPANESE;
|
|
|
|
else if (strncmp(lang, "EN", 2) == 0) return CONF_LANG_ENGLISH;
|
|
|
|
else if (strncmp(lang, "DE", 2) == 0) return CONF_LANG_GERMAN;
|
|
|
|
else if (strncmp(lang, "FR", 2) == 0) return CONF_LANG_FRENCH;
|
|
|
|
else if (strncmp(lang, "ES", 2) == 0) return CONF_LANG_SPANISH;
|
|
|
|
else if (strncmp(lang, "IT", 2) == 0) return CONF_LANG_ITALIAN;
|
|
|
|
else if (strncmp(lang, "NL", 2) == 0) return CONF_LANG_DUTCH;
|
|
|
|
else if (strncmp(lang, "ZHTW", 4) == 0) return CONF_LANG_TRAD_CHINESE;
|
|
|
|
else if (strncmp(lang, "ZH", 2) == 0) return CONF_LANG_SIMP_CHINESE;
|
|
|
|
else if (strncmp(lang, "KO", 2) == 0) return CONF_LANG_KOREAN;
|
|
|
|
|
|
|
|
return CONF_LANG_ENGLISH; // Default to EN
|
|
|
|
}
|
|
|
|
|
2016-11-07 16:06:00 +01:00
|
|
|
static void setLanguage(int l)
|
|
|
|
{
|
|
|
|
if (l > 0 && l <= 10)
|
|
|
|
configbytes[0] = l - 1;
|
|
|
|
else
|
|
|
|
configbytes[0] = 0xCD;
|
|
|
|
}
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
static u8 GetRequestedGameIOS(dir_discHdr *hdr)
|
|
|
|
{
|
|
|
|
u8 IOS = 0;
|
|
|
|
|
2012-09-23 15:20:01 +02:00
|
|
|
DeviceHandle.OpenWBFS(currentPartition);
|
2012-11-14 17:58:14 +01:00
|
|
|
wbfs_disc_t *disc = WBFS_OpenDisc((u8*)&hdr->id, hdr->path);
|
2012-09-23 15:20:01 +02:00
|
|
|
if(disc != NULL)
|
|
|
|
{
|
2013-09-01 18:43:53 +02:00
|
|
|
void *titleTMD = NULL;
|
|
|
|
u32 tmd_size = wbfs_extract_file(disc, (char*)"TMD", &titleTMD);
|
|
|
|
if(titleTMD != NULL)
|
|
|
|
{
|
|
|
|
if(tmd_size > 0x18B)
|
|
|
|
IOS = *((u8*)titleTMD + 0x18B);
|
|
|
|
MEM2_free(titleTMD);
|
|
|
|
}
|
2012-09-23 15:20:01 +02:00
|
|
|
WBFS_CloseDisc(disc);
|
|
|
|
}
|
|
|
|
WBFS_Close();
|
2012-01-21 21:57:41 +01:00
|
|
|
return IOS;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_hideGame(bool instant)
|
|
|
|
{
|
2014-03-18 03:39:42 +01:00
|
|
|
_cleanupVideo();
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnPlay, instant);
|
2012-07-04 00:08:51 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnBack, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull, instant);
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnDelete, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnSettings, instant);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnToggle, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull, instant);
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOn, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOff, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnAdultOn, instant);
|
|
|
|
m_btnMgr.hide(m_gameBtnAdultOff, instant);
|
2012-07-05 15:15:23 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
|
2012-09-13 16:54:17 +02:00
|
|
|
if(m_gameLblUser[i] != -1)
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameLblUser[i], instant);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_showGame(void)
|
|
|
|
{
|
2016-12-05 15:12:23 +01:00
|
|
|
_setBg(m_gameBg, m_gameBgLQ);
|
2012-07-04 00:08:51 +02:00
|
|
|
|
|
|
|
if(!m_zoom_banner)
|
|
|
|
{
|
2012-09-20 17:50:47 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser) - 1; ++i)
|
2012-09-13 16:54:17 +02:00
|
|
|
if(m_gameLblUser[i] != -1)
|
2012-07-04 00:08:51 +02:00
|
|
|
m_btnMgr.show(m_gameLblUser[i]);
|
2016-12-05 15:12:23 +01:00
|
|
|
|
2012-07-04 00:08:51 +02:00
|
|
|
m_btnMgr.show(m_gameBtnPlay);
|
|
|
|
m_btnMgr.show(m_gameBtnBack);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_btnMgr.show(m_gameBtnToggle);
|
2012-07-04 00:08:51 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_btnMgr.show(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.show(m_gameBtnBackFull);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_btnMgr.show(m_gameBtnToggleFull);
|
2012-07-04 00:08:51 +02:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2014-03-18 03:39:42 +01:00
|
|
|
void CMenu::_cleanupBanner(bool gamechange)
|
|
|
|
{
|
|
|
|
//banner
|
|
|
|
m_gameSound.FreeMemory();
|
|
|
|
CheckGameSoundThread();
|
|
|
|
m_banner.DeleteBanner(gamechange);
|
|
|
|
//movie
|
|
|
|
_cleanupVideo();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_cleanupVideo()
|
|
|
|
{
|
|
|
|
m_video_playing = false;
|
|
|
|
movie.DeInit();
|
|
|
|
}
|
|
|
|
|
2014-03-22 22:32:40 +01:00
|
|
|
static const char *getVideoPath(const string &videoDir, const char *videoId)
|
|
|
|
{
|
|
|
|
const char *coverDir = m_plugin.GetCoverFolderName(CoverFlow.getHdr()->settings[0]);
|
|
|
|
const char *videoPath = NULL;
|
|
|
|
if(coverDir == NULL || strlen(coverDir) == 0)
|
|
|
|
videoPath = fmt("%s/%s", videoDir.c_str(), videoId);
|
|
|
|
else
|
|
|
|
videoPath = fmt("%s/%s/%s", videoDir.c_str(), coverDir, videoId);
|
|
|
|
return videoPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *getVideoDefaultPath(const string &videoDir)
|
|
|
|
{
|
-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
|
|
|
//strncpy(m_plugin.PluginMagicWord, fmt("%08x", CoverFlow.getHdr()->settings[0]), 8);
|
2016-04-03 03:03:39 +02:00
|
|
|
const char *videoPath = fmt("%s/%s", videoDir.c_str(), m_plugin.PluginMagicWord);
|
2014-03-22 22:32:40 +01:00
|
|
|
return videoPath;
|
|
|
|
}
|
|
|
|
|
2014-03-18 03:39:42 +01:00
|
|
|
bool CMenu::_startVideo()
|
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
2014-03-18 03:39:42 +01:00
|
|
|
char curId3[4];
|
|
|
|
memset(curId3, 0, 4);
|
2016-12-01 01:05:39 +01:00
|
|
|
const char *videoId = CoverFlow.getPathId(GameHdr);
|
|
|
|
if(!NoGameID(GameHdr->type))
|
2014-03-18 03:39:42 +01:00
|
|
|
{ //id3
|
2016-12-01 01:05:39 +01:00
|
|
|
memcpy(curId3, GameHdr->id, 3);
|
2014-03-18 03:39:42 +01:00
|
|
|
videoId = curId3;
|
|
|
|
}
|
2014-03-22 22:32:40 +01:00
|
|
|
const char *videoPath = getVideoPath(m_videoDir, videoId);
|
|
|
|
const char *THP_Path = fmt("%s.thp", videoPath);
|
2014-05-25 22:54:39 +02:00
|
|
|
if(!fsop_FileExist(THP_Path))
|
2014-03-22 22:32:40 +01:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
if(GameHdr->type == TYPE_PLUGIN)
|
2014-05-25 22:54:39 +02:00
|
|
|
{
|
|
|
|
videoPath = getVideoDefaultPath(m_videoDir);
|
|
|
|
THP_Path = fmt("%s.thp", videoPath);
|
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
else if(!NoGameID(GameHdr->type))
|
2014-05-25 22:54:39 +02:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
videoPath = getVideoPath(m_videoDir, GameHdr->id);
|
2014-05-25 22:54:39 +02:00
|
|
|
THP_Path = fmt("%s.thp", videoPath);
|
|
|
|
}
|
2014-03-22 22:32:40 +01:00
|
|
|
}
|
|
|
|
if(fsop_FileExist(THP_Path))
|
2014-03-18 03:39:42 +01:00
|
|
|
{
|
2014-03-22 22:32:40 +01:00
|
|
|
m_gameSound.FreeMemory();
|
2014-03-24 19:59:24 +01:00
|
|
|
CheckGameSoundThread();
|
2014-03-18 03:39:42 +01:00
|
|
|
m_banner.SetShowBanner(false);
|
|
|
|
/* Lets play the movie */
|
2014-03-22 22:32:40 +01:00
|
|
|
movie.Init(THP_Path);
|
|
|
|
m_gameSound.Load(fmt("%s.ogg", videoPath));
|
2014-03-18 03:39:42 +01:00
|
|
|
m_gameSound.SetVolume(m_cfg.getInt("GENERAL", "sound_volume_bnr", 255));
|
|
|
|
m_video_playing = true;
|
|
|
|
m_gameSound.Play();
|
|
|
|
movie.Play(true); //video loops sound doesnt
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-02-01 23:26:51 +01:00
|
|
|
void CMenu::_game(bool launch)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-06-10 01:02:40 +02:00
|
|
|
bool coverFlipped = false;
|
|
|
|
int cf_version = 1;
|
|
|
|
string domain;
|
|
|
|
string key;
|
|
|
|
Vector3D v;
|
|
|
|
Vector3D savedv;
|
|
|
|
|
|
|
|
dir_discHdr *hdr = (dir_discHdr*)MEM2_alloc(sizeof(dir_discHdr));
|
|
|
|
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));
|
|
|
|
|
-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
|
|
|
const char *id = NULL;
|
2016-12-01 01:05:39 +01:00
|
|
|
char tmp1[74];// title/magic#
|
-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
|
|
|
memset(tmp1, 0, 74);
|
|
|
|
char tmp2[64];
|
|
|
|
memset(tmp2, 0, 64);
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
{
|
|
|
|
strncpy(m_plugin.PluginMagicWord, fmt("%08x", hdr->settings[0]), 8);
|
|
|
|
wcstombs(tmp2, hdr->title, 64);
|
|
|
|
strcat(tmp1, m_plugin.PluginMagicWord);
|
|
|
|
strcat(tmp1, fmt("/%s", tmp2));
|
|
|
|
id = tmp1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
id = hdr->id;
|
|
|
|
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
|
|
|
|
{
|
|
|
|
strcat(tmp1, fmt("%.6s_2", hdr->id));
|
|
|
|
id = tmp1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-18 03:39:42 +01:00
|
|
|
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
2016-12-05 15:12:23 +01:00
|
|
|
if(NoGameID(hdr->type))
|
2014-03-18 03:39:42 +01:00
|
|
|
{
|
2016-12-05 15:12:23 +01:00
|
|
|
bool video_available = (hdr->type == TYPE_PLUGIN &&
|
|
|
|
(fsop_FileExist(fmt("%s.thp", getVideoPath(m_videoDir, CoverFlow.getPathId(hdr)))) ||
|
|
|
|
fsop_FileExist(fmt("%s.thp", getVideoDefaultPath(m_videoDir)))));
|
2014-03-22 22:32:40 +01:00
|
|
|
m_zoom_banner = m_zoom_banner && video_available;
|
2014-03-18 03:39:42 +01:00
|
|
|
}
|
|
|
|
currentMoviePos = (m_zoom_banner ? zoomedMoviePos : normalMoviePos);
|
|
|
|
if(m_banner.GetZoomSetting() != m_zoom_banner)
|
2016-04-02 19:19:19 +02:00
|
|
|
m_banner.ToggleZoom();
|
2014-03-18 03:39:42 +01:00
|
|
|
|
2016-04-13 17:52:33 +02:00
|
|
|
s8 startGameSound = -7;
|
|
|
|
SetupInput();
|
2012-06-01 07:34:52 +02:00
|
|
|
|
2012-09-09 20:35:15 +02:00
|
|
|
while(!m_exit)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-06-01 07:34:52 +02:00
|
|
|
if(startGameSound < 1)
|
|
|
|
startGameSound++;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-06-01 07:34:52 +02:00
|
|
|
if(startGameSound == -5)
|
2012-01-21 21:57:41 +01:00
|
|
|
_showGame();
|
2016-04-13 16:16:41 +02:00
|
|
|
|
2016-04-13 17:52:33 +02:00
|
|
|
if(!launch)
|
|
|
|
_mainLoopCommon(true);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-06-01 07:34:52 +02:00
|
|
|
if(startGameSound == 0)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-06-10 01:02:40 +02:00
|
|
|
m_gameSelected = true;// mark game selected and load sound/banner for main loop to start playing
|
2012-01-21 21:57:41 +01:00
|
|
|
startGameSound = 1;
|
2014-03-18 03:39:42 +01:00
|
|
|
_playGameSound();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
/* move and zoom flipped cover */
|
2016-06-10 01:02:40 +02:00
|
|
|
if(coverFlipped &&
|
|
|
|
(BTN_PLUS_PRESSED || BTN_MINUS_PRESSED ||
|
|
|
|
BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED ||
|
|
|
|
BTN_UP_PRESSED || BTN_DOWN_PRESSED))
|
|
|
|
{
|
|
|
|
float step = 0.05f;
|
|
|
|
if(BTN_PLUS_PRESSED || BTN_MINUS_PRESSED)
|
|
|
|
{
|
|
|
|
if(BTN_MINUS_PRESSED)
|
|
|
|
step = -step;
|
|
|
|
v.z = min(max(-15.f, v.z + step), 15.f);
|
|
|
|
}
|
|
|
|
else if(BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED)
|
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
if(BTN_RIGHT_PRESSED)
|
2016-06-10 01:02:40 +02:00
|
|
|
step = -step;
|
|
|
|
v.x = min(max(-15.f, v.x + step), 15.f);
|
|
|
|
}
|
|
|
|
else if(BTN_UP_PRESSED || BTN_DOWN_PRESSED)
|
|
|
|
{
|
|
|
|
if(BTN_UP_PRESSED)
|
|
|
|
step = -step;
|
|
|
|
v.y = min(max(-15.f, v.y + step), 15.f);
|
|
|
|
}
|
2016-06-20 23:03:40 +02:00
|
|
|
CoverFlow.setCoverFlipPos(v);
|
2016-06-10 01:02:40 +02:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
/* if B on favorites btn goto game categories */
|
|
|
|
if(BTN_B_PRESSED && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
2012-05-04 21:31:05 +02:00
|
|
|
{
|
|
|
|
_hideGame();
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.SetShowBanner(false);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_locked)
|
|
|
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
|
|
|
else
|
|
|
|
_CategorySettings(true);
|
2012-05-04 21:31:05 +02:00
|
|
|
_showGame();
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.SetShowBanner(true);
|
2012-08-16 00:33:54 +02:00
|
|
|
if(!m_gameSound.IsPlaying())
|
2012-07-09 14:15:40 +02:00
|
|
|
startGameSound = -6;
|
2012-05-04 21:31:05 +02:00
|
|
|
continue;
|
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
/* exit game menu or reset flipped cover */
|
2012-06-01 07:34:52 +02:00
|
|
|
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-06-22 21:34:58 +02:00
|
|
|
if(BTN_B_PRESSED && coverFlipped)
|
|
|
|
{
|
|
|
|
CoverFlow.flip();
|
|
|
|
coverFlipped = false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
_cleanupBanner();
|
|
|
|
break;
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
/* press + for game info screen */
|
-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(BTN_PLUS_PRESSED && !NoGameID(hdr->type) && !coverFlipped)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
-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
|
|
|
GameTDB m_gametdb;
|
|
|
|
m_gametdb.OpenFile(fmt("%s/wiitdb.xml", m_settingsDir.c_str()));
|
|
|
|
if(m_gametdb.IsLoaded())
|
|
|
|
{
|
|
|
|
_hideGame();
|
|
|
|
m_banner.SetShowBanner(false);
|
|
|
|
_gameinfo();
|
|
|
|
m_gametdb.CloseFile();
|
|
|
|
_showGame();
|
|
|
|
m_banner.SetShowBanner(true);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(!m_gameSound.IsPlaying())// this makes the game sound play when we return
|
-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
|
|
|
startGameSound = -6;
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
/* play or stop a video (this is the old video play for non plugin games) */
|
2016-12-05 15:12:23 +01:00
|
|
|
else if(BTN_MINUS_PRESSED && !coverFlipped && !NoGameID(hdr->type))
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2014-03-18 03:39:42 +01:00
|
|
|
if(m_video_playing)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
m_video_playing = false;
|
2014-03-18 03:39:42 +01:00
|
|
|
movie.DeInit();
|
|
|
|
m_gameSound.FreeMemory();
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.SetShowBanner(true);
|
2014-03-18 03:39:42 +01:00
|
|
|
if(!m_gameSound.IsPlaying())
|
2012-08-26 17:20:51 +02:00
|
|
|
startGameSound = -6;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2014-03-18 03:39:42 +01:00
|
|
|
else
|
|
|
|
_startVideo();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-06-10 01:02:40 +02:00
|
|
|
else if((BTN_1_PRESSED || BTN_2_PRESSED) && !coverFlipped)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
s8 direction = BTN_1_PRESSED ? 1 : -1;
|
2016-11-07 16:06:00 +01:00
|
|
|
int cfVersion = loopNum((_getCFVersion() - 1) + direction, m_numCFVersions) + 1;
|
2012-01-21 21:57:41 +01:00
|
|
|
_loadCFLayout(cfVersion);
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2016-11-07 16:06:00 +01:00
|
|
|
_setCFVersion(cfVersion);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-06-01 07:34:52 +02:00
|
|
|
else if(launch || BTN_A_PRESSED)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_btnMgr.selected(m_gameBtnDelete))
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
-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
|
|
|
_hideGame();
|
|
|
|
m_banner.SetShowBanner(false);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_locked)
|
|
|
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
|
|
|
else if(hdr->type == TYPE_CHANNEL)
|
|
|
|
error(_t("errgame17", L"Can not delete real NAND Channels!"));
|
|
|
|
else if(hdr->type == TYPE_PLUGIN)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
-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
|
|
|
const char *wfcPath = NULL;
|
|
|
|
const char *coverDir = NULL;
|
|
|
|
if(m_cfg.getBool(PLUGIN_DOMAIN, "subfolder_cache"))
|
|
|
|
coverDir = m_plugin.GetCoverFolderName(hdr->settings[0]);
|
|
|
|
if(coverDir == NULL || strlen(coverDir) == 0)
|
|
|
|
wfcPath = fmt("%s/%s.wfc", m_cacheDir.c_str(), CoverFlow.getPathId(hdr, true));
|
2016-06-10 01:02:40 +02:00
|
|
|
else
|
-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
|
|
|
wfcPath = fmt("%s/%s/%s.wfc", m_cacheDir.c_str(), coverDir, CoverFlow.getPathId(hdr, true));
|
|
|
|
fsop_deleteFile(wfcPath);
|
2016-12-01 01:05:39 +01:00
|
|
|
CoverFlow.stopCoverLoader(true);
|
|
|
|
CoverFlow.startCoverLoader();
|
-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(_wbfsOp(WO_REMOVE_GAME))
|
2016-06-10 01:02:40 +02:00
|
|
|
{
|
-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
|
|
|
_cleanupBanner();
|
|
|
|
break;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
_showGame();
|
-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_banner.SetShowBanner(true);
|
|
|
|
if(!m_gameSound.IsPlaying())
|
|
|
|
startGameSound = -6;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
else if(m_btnMgr.selected(m_gameBtnSettings))
|
2016-11-07 16:06:00 +01:00
|
|
|
{
|
|
|
|
_hideGame();
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_locked)
|
|
|
|
{
|
|
|
|
m_banner.SetShowBanner(false);
|
|
|
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
|
|
|
m_banner.SetShowBanner(true);
|
|
|
|
}
|
2016-12-14 19:47:13 +01:00
|
|
|
/*else if(hdr->type == TYPE_PLUGIN)
|
2016-12-01 01:05:39 +01:00
|
|
|
{
|
|
|
|
m_banner.SetShowBanner(false);
|
|
|
|
error(_t("errgame16", L"Not available for plugin games!"));
|
|
|
|
m_banner.SetShowBanner(true);
|
2016-12-14 19:47:13 +01:00
|
|
|
}*/
|
2016-12-01 01:05:39 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
m_banner.ToggleGameSettings();
|
|
|
|
_gameSettings();
|
|
|
|
m_banner.ToggleGameSettings();
|
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
_showGame();
|
|
|
|
if(!m_gameSound.IsPlaying())
|
|
|
|
startGameSound = -6;
|
|
|
|
}
|
2012-06-01 07:34:52 +02:00
|
|
|
else if(m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff))
|
-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
|
|
|
{
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
m_gcfg1.setBool("FAVORITES_PLUGINS", id, !m_gcfg1.getBool("FAVORITES_PLUGINS", id, false));
|
|
|
|
else
|
|
|
|
m_gcfg1.setBool("FAVORITES", id, !m_gcfg1.getBool("FAVORITES", id, false));
|
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
else if(m_btnMgr.selected(m_gameBtnAdultOn) || m_btnMgr.selected(m_gameBtnAdultOff))
|
-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
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
if(m_locked)
|
|
|
|
{
|
|
|
|
m_banner.SetShowBanner(false);
|
|
|
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
|
|
|
m_banner.SetShowBanner(true);
|
|
|
|
_showGame();
|
|
|
|
if(!m_gameSound.IsPlaying())
|
|
|
|
startGameSound = -6;
|
|
|
|
}
|
-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
|
2016-12-01 01:05:39 +01:00
|
|
|
{
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
m_gcfg1.setBool("ADULTONLY_PLUGINS", id, !m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false));
|
|
|
|
else
|
|
|
|
m_gcfg1.setBool("ADULTONLY", id, !m_gcfg1.getBool("ADULTONLY", id, false));
|
|
|
|
}
|
-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
|
|
|
}
|
2012-07-04 00:08:51 +02:00
|
|
|
else if(m_btnMgr.selected(m_gameBtnBack) || m_btnMgr.selected(m_gameBtnBackFull))
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2014-03-18 03:39:42 +01:00
|
|
|
_cleanupBanner();
|
2012-07-04 21:45:53 +02:00
|
|
|
break;
|
|
|
|
}
|
2016-04-02 19:19:19 +02:00
|
|
|
else if((m_btnMgr.selected(m_gameBtnToggle) || m_btnMgr.selected(m_gameBtnToggleFull))
|
2016-06-10 01:02:40 +02:00
|
|
|
&& (!NoGameID(hdr->type) || m_video_playing))
|
2012-07-04 21:45:53 +02:00
|
|
|
{
|
2016-04-02 19:19:19 +02:00
|
|
|
m_zoom_banner = m_banner.ToggleZoom();
|
2012-07-04 13:56:02 +02:00
|
|
|
m_cfg.setBool(_domainFromView(), "show_full_banner", m_zoom_banner);
|
2014-03-18 03:39:42 +01:00
|
|
|
currentMoviePos = (m_zoom_banner ? zoomedMoviePos : normalMoviePos);
|
2012-07-04 13:56:02 +02:00
|
|
|
m_show_zone_game = false;
|
2012-12-24 16:33:53 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-09-15 21:14:08 +02:00
|
|
|
else if(launch || m_btnMgr.selected(m_gameBtnPlay) || m_btnMgr.selected(m_gameBtnPlayFull) || !ShowPointer())
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
_hideGame();
|
2012-09-22 15:47:52 +02:00
|
|
|
MusicPlayer.Stop();
|
2014-03-18 03:39:42 +01:00
|
|
|
_cleanupBanner();
|
2013-10-30 14:07:59 +01:00
|
|
|
m_cfg.setInt("GENERAL", "cat_startpage", m_catStartPage);
|
2016-12-01 01:05:39 +01:00
|
|
|
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
|
|
|
/* change to current game's partition */
|
2013-01-15 14:54:33 +01:00
|
|
|
switch(hdr->type)
|
|
|
|
{
|
|
|
|
case TYPE_CHANNEL:
|
2016-06-20 23:03:40 +02:00
|
|
|
case TYPE_EMUCHANNEL:
|
2013-01-15 14:54:33 +01:00
|
|
|
currentPartition = m_cfg.getInt(CHANNEL_DOMAIN, "partition", 1);
|
|
|
|
break;
|
|
|
|
case TYPE_HOMEBREW:
|
|
|
|
currentPartition = m_cfg.getInt(HOMEBREW_DOMAIN, "partition", 1);
|
|
|
|
break;
|
|
|
|
case TYPE_GC_GAME:
|
|
|
|
currentPartition = m_cfg.getInt(GC_DOMAIN, "partition", 1);
|
|
|
|
break;
|
|
|
|
case TYPE_WII_GAME:
|
|
|
|
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition", 1);
|
|
|
|
break;
|
|
|
|
default:
|
-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
|
|
|
int romsPartition = m_plugin.GetRomPartition(m_plugin.GetPluginPosition(hdr->settings[0]));
|
|
|
|
if(romsPartition < 0)
|
|
|
|
romsPartition = m_cfg.getInt(PLUGIN_DOMAIN, "partition", 0);
|
|
|
|
currentPartition = romsPartition;
|
2013-09-04 22:58:22 +02:00
|
|
|
break;
|
2013-01-15 14:54:33 +01:00
|
|
|
}
|
2013-03-24 13:10:21 +01:00
|
|
|
/* Get Banner Title for Playlog */
|
|
|
|
CurrentBanner.ClearBanner();
|
-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
|
|
|
NANDemuView = hdr->type == TYPE_EMUCHANNEL;
|
2016-06-20 23:03:40 +02:00
|
|
|
if(hdr->type == TYPE_CHANNEL || hdr->type == TYPE_EMUCHANNEL)
|
2014-03-18 03:39:42 +01:00
|
|
|
{
|
|
|
|
u64 chantitle = CoverFlow.getChanTitle();
|
2012-10-15 21:16:14 +02:00
|
|
|
_extractChannelBnr(chantitle);
|
2014-03-18 03:39:42 +01:00
|
|
|
}
|
2012-10-15 21:16:14 +02:00
|
|
|
else if(hdr->type == TYPE_WII_GAME)
|
|
|
|
_extractBnr(hdr);
|
|
|
|
if(CurrentBanner.IsValid())
|
|
|
|
_extractBannerTitle(GetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str()));
|
2016-06-20 23:03:40 +02:00
|
|
|
if(hdr->type == TYPE_WII_GAME || hdr->type == TYPE_CHANNEL || hdr->type == TYPE_EMUCHANNEL)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-11-18 14:40:26 +01:00
|
|
|
if(Playlog_Update(hdr->id, banner_title) < 0)
|
2012-01-21 21:57:41 +01:00
|
|
|
Playlog_Delete();
|
|
|
|
}
|
2013-03-24 13:10:21 +01:00
|
|
|
CurrentBanner.ClearBanner();
|
2014-03-01 00:11:02 +01:00
|
|
|
|
2013-03-24 13:10:21 +01:00
|
|
|
/* Finally boot it */
|
2016-12-01 01:05:39 +01:00
|
|
|
gprintf("Launching game %s\n", hdr->id);
|
2012-01-21 21:57:41 +01:00
|
|
|
_launch(hdr);
|
|
|
|
|
2012-05-19 18:06:06 +02:00
|
|
|
if(m_exit)
|
|
|
|
break;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
_hideWaitMessage();
|
|
|
|
launch = false;
|
|
|
|
|
|
|
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
|
|
|
WPAD_SetVRes(chan, m_vid.width() + m_cursor[chan].width(), m_vid.height() + m_cursor[chan].height());
|
2012-08-26 17:20:51 +02:00
|
|
|
m_gcfg2.unload();
|
2012-01-21 21:57:41 +01:00
|
|
|
_showGame();
|
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
/* flip cover if mouse over */
|
2016-06-22 21:34:58 +02:00
|
|
|
else if(!coverFlipped)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
2016-06-10 01:02:40 +02:00
|
|
|
{
|
|
|
|
if(CoverFlow.mouseOver(m_cursor[chan].x(), m_cursor[chan].y()))
|
|
|
|
{
|
2016-11-07 16:06:00 +01:00
|
|
|
cf_version = _getCFVersion();
|
2016-06-10 01:02:40 +02:00
|
|
|
domain = fmt("%s_%i_S", cf_domain, cf_version);
|
|
|
|
key = "flip_pos";
|
|
|
|
if(!m_vid.wide())
|
|
|
|
key += "_4_3";
|
2016-06-22 21:34:58 +02:00
|
|
|
v = m_coverflow.getVector3D(domain, key);
|
|
|
|
coverFlipped = true;
|
|
|
|
CoverFlow.flip();
|
2016-06-10 01:02:40 +02:00
|
|
|
}
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
2016-06-10 01:02:40 +02:00
|
|
|
if(!coverFlipped)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-06-10 01:02:40 +02:00
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_UP_REPEAT || RIGHT_STICK_UP))
|
|
|
|
{
|
|
|
|
_cleanupBanner(true);
|
|
|
|
CoverFlow.up();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT))
|
|
|
|
{
|
|
|
|
_cleanupBanner(true);
|
|
|
|
CoverFlow.right();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_DOWN_REPEAT || RIGHT_STICK_DOWN))
|
|
|
|
{
|
|
|
|
_cleanupBanner(true);
|
|
|
|
CoverFlow.down();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_LEFT_REPEAT || RIGHT_STICK_LEFT))
|
|
|
|
{
|
|
|
|
_cleanupBanner(true);
|
|
|
|
CoverFlow.left();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
-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
|
|
|
if(startGameSound == -10)// if -10 then we moved to new cover
|
2016-06-10 01:02:40 +02:00
|
|
|
{
|
|
|
|
m_gameSelected = false; // deselect game if moved to new cover
|
-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
|
|
|
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));// get new game header
|
|
|
|
memset(tmp1, 0, 74);
|
|
|
|
memset(tmp2, 0, 64);
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
{
|
|
|
|
strncpy(m_plugin.PluginMagicWord, fmt("%08x", hdr->settings[0]), 8);
|
|
|
|
wcstombs(tmp2, hdr->title, 64);
|
|
|
|
strcat(tmp1, m_plugin.PluginMagicWord);
|
|
|
|
strcat(tmp1, fmt("/%s", tmp2));
|
|
|
|
id = tmp1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
id = hdr->id;
|
|
|
|
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
|
|
|
|
{
|
|
|
|
strcat(tmp1, fmt("%.6s_2", hdr->id));
|
|
|
|
id = tmp1;
|
|
|
|
}
|
|
|
|
}
|
2016-12-05 15:12:23 +01:00
|
|
|
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
|
|
|
if(NoGameID(hdr->type))
|
|
|
|
{
|
|
|
|
bool video_available = (hdr->type == TYPE_PLUGIN &&
|
|
|
|
(fsop_FileExist(fmt("%s.thp", getVideoPath(m_videoDir, CoverFlow.getPathId(hdr)))) ||
|
|
|
|
fsop_FileExist(fmt("%s.thp", getVideoDefaultPath(m_videoDir)))));
|
|
|
|
m_zoom_banner = m_zoom_banner && video_available;
|
|
|
|
}
|
|
|
|
currentMoviePos = (m_zoom_banner ? zoomedMoviePos : normalMoviePos);
|
|
|
|
if(m_banner.GetZoomSetting() != m_zoom_banner)
|
|
|
|
m_banner.ToggleZoom();
|
2016-06-10 01:02:40 +02:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-12-05 15:12:23 +01:00
|
|
|
/* show small banner frame if available */
|
|
|
|
if(m_gameLblUser[4] != -1 && !NoGameID(hdr->type) && !m_zoom_banner)
|
|
|
|
m_btnMgr.show(m_gameLblUser[4]);
|
|
|
|
else
|
|
|
|
m_btnMgr.hide(m_gameLblUser[4]);
|
2012-08-19 12:22:31 +02:00
|
|
|
if(m_show_zone_game && !m_zoom_banner)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.show(m_gameBtnPlay);
|
|
|
|
m_btnMgr.show(m_gameBtnBack);
|
2016-12-05 15:12:23 +01:00
|
|
|
m_btnMgr.show(m_gameBtnToggle);
|
2016-12-01 01:05:39 +01:00
|
|
|
|
2012-09-20 17:50:47 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser) - 1; ++i)
|
2012-09-13 16:54:17 +02:00
|
|
|
if(m_gameLblUser[i] != -1)
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.show(m_gameLblUser[i]);
|
2016-12-01 01:05:39 +01:00
|
|
|
|
|
|
|
m_btnMgr.show(m_gameBtnSettings);
|
|
|
|
m_btnMgr.show(m_gameBtnDelete);
|
|
|
|
bool b;
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
b = m_gcfg1.getBool("FAVORITES_PLUGINS", id, false);
|
|
|
|
else
|
|
|
|
b = m_gcfg1.getBool("FAVORITES", id, false);
|
|
|
|
m_btnMgr.show(b ? m_gameBtnFavoriteOn : m_gameBtnFavoriteOff);
|
|
|
|
m_btnMgr.hide(b ? m_gameBtnFavoriteOff : m_gameBtnFavoriteOn);
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
b = m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false);
|
|
|
|
else
|
|
|
|
b = m_gcfg1.getBool("ADULTONLY", id, false);
|
|
|
|
m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff);
|
|
|
|
m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-12-05 15:12:23 +01:00
|
|
|
if(m_zoom_banner)
|
2012-07-04 00:08:51 +02:00
|
|
|
{
|
|
|
|
m_btnMgr.show(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.show(m_gameBtnBackFull);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_btnMgr.show(m_gameBtnToggleFull);
|
2012-07-04 00:08:51 +02:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOn);
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOff);
|
2012-01-22 23:31:58 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnAdultOn);
|
|
|
|
m_btnMgr.hide(m_gameBtnAdultOff);
|
2012-01-22 01:10:20 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnSettings);
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnDelete);
|
|
|
|
m_btnMgr.hide(m_gameBtnPlay);
|
|
|
|
m_btnMgr.hide(m_gameBtnBack);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnToggle);
|
2012-09-20 17:50:47 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser) - 1; ++i)
|
2012-09-13 16:54:17 +02:00
|
|
|
if (m_gameLblUser[i] != -1)
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.hide(m_gameLblUser[i]);
|
|
|
|
}
|
|
|
|
}
|
2016-06-10 01:02:40 +02:00
|
|
|
if(coverFlipped)
|
|
|
|
{
|
|
|
|
m_coverflow.setVector3D(domain, key, savedv);
|
|
|
|
_loadCFLayout(cf_version, true);
|
|
|
|
CoverFlow.applySettings();
|
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
m_gameSelected = false;
|
2016-12-05 15:12:23 +01:00
|
|
|
MEM2_free(hdr);
|
2012-01-21 21:57:41 +01:00
|
|
|
_hideGame();
|
|
|
|
}
|
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
void CMenu::directlaunch(const char *GameID)// from boot arg for wii game only
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
m_directLaunch = true;
|
2012-10-03 23:34:37 +02:00
|
|
|
for(currentPartition = SD; currentPartition < USB8; currentPartition++)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-10-03 23:34:37 +02:00
|
|
|
if(!DeviceHandle.IsInserted(currentPartition))
|
|
|
|
continue;
|
|
|
|
DeviceHandle.OpenWBFS(currentPartition);
|
2013-08-06 23:31:25 +02:00
|
|
|
string gameDir(fmt(wii_games_dir, DeviceName[currentPartition]));
|
2012-10-04 17:25:35 +02:00
|
|
|
string cacheDir(fmt("%s/%s_wii.db", m_listCacheDir.c_str(), DeviceName[currentPartition]));
|
2016-06-20 23:03:40 +02:00
|
|
|
m_cacheList.CreateList(COVERFLOW_WII, currentPartition, gameDir,
|
2012-10-04 13:37:53 +02:00
|
|
|
stringToVector(".wbfs|.iso", '|'), cacheDir, false);
|
2012-10-03 23:34:37 +02:00
|
|
|
WBFS_Close();
|
2016-06-20 23:03:40 +02:00
|
|
|
for(u32 i = 0; i < m_cacheList.size(); i++)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-06-20 23:03:40 +02:00
|
|
|
if(strncasecmp(GameID, m_cacheList[i].id, 6) == 0)
|
2012-10-03 23:34:37 +02:00
|
|
|
{
|
2016-06-20 23:03:40 +02:00
|
|
|
_launchGame(&m_cacheList[i], false); // Launch will exit wiiflow
|
2012-10-03 23:34:37 +02:00
|
|
|
break;
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
2016-04-03 02:42:09 +02:00
|
|
|
error(wfmt(_fmt("errgame1", L"Cannot find the game with ID: %s"), GameID));
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2013-03-23 18:06:06 +01:00
|
|
|
void CMenu::_launchShutdown()
|
|
|
|
{
|
|
|
|
CoverFlow.clear();
|
|
|
|
_showWaitMessage();
|
|
|
|
exitHandler(PRIILOADER_DEF); //Making wiiflow ready to boot something
|
|
|
|
}
|
|
|
|
|
2016-04-03 02:31:02 +02:00
|
|
|
bool gcLaunchFail = false;
|
2013-03-31 01:57:42 +01:00
|
|
|
void CMenu::_launch(const dir_discHdr *hdr)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2013-03-31 01:57:42 +01:00
|
|
|
dir_discHdr launchHdr;
|
|
|
|
memcpy(&launchHdr, hdr, sizeof(dir_discHdr));
|
2012-08-26 17:20:51 +02:00
|
|
|
/* Lets boot that shit */
|
2013-03-31 01:57:42 +01:00
|
|
|
if(launchHdr.type == TYPE_WII_GAME)
|
|
|
|
_launchGame(&launchHdr, false);
|
|
|
|
else if(launchHdr.type == TYPE_GC_GAME)
|
2016-04-03 02:31:02 +02:00
|
|
|
{
|
|
|
|
gcLaunchFail = false;
|
2013-03-31 01:57:42 +01:00
|
|
|
_launchGC(&launchHdr, false);
|
2016-04-03 02:31:02 +02:00
|
|
|
if(gcLaunchFail) return;
|
|
|
|
}
|
2016-06-20 23:03:40 +02:00
|
|
|
else if(launchHdr.type == TYPE_CHANNEL || launchHdr.type == TYPE_EMUCHANNEL)
|
2013-03-31 01:57:42 +01:00
|
|
|
_launchChannel(&launchHdr);
|
|
|
|
else if(launchHdr.type == TYPE_PLUGIN)
|
2012-04-08 17:54:34 +02:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
//get dol name and name length for music plugin
|
2013-03-31 01:57:42 +01:00
|
|
|
const char *plugin_dol_name = m_plugin.GetDolName(launchHdr.settings[0]);
|
2013-03-23 18:06:06 +01:00
|
|
|
u8 plugin_dol_len = strlen(plugin_dol_name);
|
2016-04-02 18:58:12 +02:00
|
|
|
//get title and path from hdr
|
2016-12-01 01:05:39 +01:00
|
|
|
//example rom path - sd:/roms/super mario bros.zip
|
|
|
|
//example scummvm path - kq1-coco3
|
2012-12-27 21:22:40 +01:00
|
|
|
char title[101];
|
|
|
|
memset(&title, 0, sizeof(title));
|
2013-05-30 19:35:03 +02:00
|
|
|
u32 title_len_no_ext = 0;
|
2013-03-23 18:06:06 +01:00
|
|
|
const char *path = NULL;
|
2016-04-02 18:58:12 +02:00
|
|
|
if(strchr(launchHdr.path, ':') != NULL)//it's a rom path
|
2012-04-12 00:01:41 +02:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
//check if music player plugin, if so set wiiflow's bckgrnd music player to play this song
|
2016-11-07 16:06:00 +01:00
|
|
|
if(plugin_dol_len == 5 && strcasecmp(plugin_dol_name, "music") == 0)
|
2013-03-23 18:06:06 +01:00
|
|
|
{
|
2013-03-31 01:57:42 +01:00
|
|
|
MusicPlayer.LoadFile(launchHdr.path, false);
|
2013-03-23 18:06:06 +01:00
|
|
|
m_exit = false;
|
|
|
|
return;
|
|
|
|
}
|
2016-04-02 18:58:12 +02:00
|
|
|
//get rom title after last '/'
|
2013-03-31 01:57:42 +01:00
|
|
|
strncpy(title, strrchr(launchHdr.path, '/') + 1, 100);
|
2016-12-01 01:05:39 +01:00
|
|
|
//if there's extension get length of title without extension
|
|
|
|
if(strchr(launchHdr.path, '.') != NULL)
|
2013-05-30 19:35:03 +02:00
|
|
|
title_len_no_ext = strlen(title) - strlen(strrchr(title, '.'));
|
2016-04-02 18:58:12 +02:00
|
|
|
//get path
|
|
|
|
*strrchr(launchHdr.path, '/') = '\0'; //cut title off end of path
|
|
|
|
path = strchr(launchHdr.path, '/') + 1; //cut sd:/ off of path
|
2012-04-12 00:01:41 +02:00
|
|
|
}
|
2016-04-02 18:58:12 +02:00
|
|
|
else //it's a scummvm game
|
2012-04-12 00:01:41 +02:00
|
|
|
{
|
-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
|
|
|
path = launchHdr.path;// kq1-coco3
|
|
|
|
wcstombs(title, launchHdr.title, 63);// King's Quest I: Quest for the Crown (CoCo3/English)
|
2012-04-12 00:01:41 +02:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
m_cfg.setString(_domainFromView(), "current_item", title);
|
2016-04-03 02:31:02 +02:00
|
|
|
|
2012-12-27 21:22:40 +01:00
|
|
|
const char *device = (currentPartition == 0 ? "sd" : (DeviceHandle.GetFSType(currentPartition) == PART_FS_NTFS ? "ntfs" : "usb"));
|
-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
|
|
|
// I believe the loader is set just in case the user is using a old plugin where the arguments line still requires loader
|
2012-12-27 21:22:40 +01:00
|
|
|
const char *loader = fmt("%s:/%s/WiiFlowLoader.dol", device, strchr(m_pluginsDir.c_str(), '/') + 1);
|
2013-05-23 14:47:45 +02:00
|
|
|
|
2013-05-30 19:35:03 +02:00
|
|
|
vector<string> arguments = m_plugin.CreateArgs(device, path, title, loader, title_len_no_ext, launchHdr.settings[0]);
|
2016-11-07 16:06:00 +01:00
|
|
|
// find plugin dol - it does not have to be in dev:/wiiflow/plugins
|
2013-05-28 23:20:51 +02:00
|
|
|
const char *plugin_file = plugin_dol_name; /* try full path */
|
2016-11-07 16:06:00 +01:00
|
|
|
if(strchr(plugin_file, ':') == NULL || !fsop_FileExist(plugin_file)) /* if not found try wiiflow plugin folder */
|
2013-05-28 23:20:51 +02:00
|
|
|
{
|
2013-05-23 14:47:45 +02:00
|
|
|
plugin_file = fmt("%s/%s", m_pluginsDir.c_str(), plugin_dol_name);
|
2016-11-07 16:06:00 +01:00
|
|
|
if(!fsop_FileExist(plugin_file)) /* not found - try device search */
|
2013-05-28 23:20:51 +02:00
|
|
|
{
|
|
|
|
for(u8 i = SD; i < MAXDEVICES; ++i)
|
|
|
|
{
|
|
|
|
plugin_file = fmt("%s:/%s", DeviceName[i], plugin_dol_name);
|
|
|
|
if(fsop_FileExist(plugin_file))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-05-23 14:47:45 +02:00
|
|
|
_launchHomebrew(plugin_file, arguments);
|
2012-04-08 17:54:34 +02:00
|
|
|
}
|
2013-03-31 01:57:42 +01:00
|
|
|
else if(launchHdr.type == TYPE_HOMEBREW)
|
2012-06-14 22:59:18 +02:00
|
|
|
{
|
2013-03-31 01:57:42 +01:00
|
|
|
const char *gamepath = fmt("%s/boot.dol", launchHdr.path);
|
2012-12-27 21:22:40 +01:00
|
|
|
if(!fsop_FileExist(gamepath))
|
2013-03-31 01:57:42 +01:00
|
|
|
gamepath = fmt("%s/boot.elf", launchHdr.path);
|
2012-12-27 21:22:40 +01:00
|
|
|
if(fsop_FileExist(gamepath))
|
|
|
|
{
|
2013-03-31 01:57:42 +01:00
|
|
|
m_cfg.setString(HOMEBREW_DOMAIN, "current_item", strrchr(launchHdr.path, '/') + 1);
|
2012-12-27 21:22:40 +01:00
|
|
|
_launchHomebrew(gamepath, m_homebrewArgs);
|
2016-04-02 18:58:12 +02:00
|
|
|
/*m_homebrewArgs is basically an empty vector string not needed for homebrew
|
|
|
|
but used by plugins when _launchHomebrew is called */
|
2012-12-27 21:22:40 +01:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-12-27 21:22:40 +01:00
|
|
|
ShutdownBeforeExit();
|
|
|
|
Sys_Exit();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-04-02 18:58:12 +02:00
|
|
|
|
2012-07-14 18:55:14 +02:00
|
|
|
void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
2012-03-05 11:01:07 +01:00
|
|
|
{
|
2012-11-18 14:40:26 +01:00
|
|
|
const char *id = hdr->id;
|
2012-11-24 20:41:27 +01:00
|
|
|
memcpy((u8*)Disc_ID, id, 6);
|
|
|
|
DCFlushRange((u8*)Disc_ID, 32);
|
|
|
|
|
2012-11-18 14:40:26 +01:00
|
|
|
const char *path = hdr->path;
|
2016-04-03 02:31:02 +02:00
|
|
|
|
|
|
|
u8 loader = min((u32)m_gcfg2.getInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u);
|
|
|
|
loader = (loader == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 1), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : loader-1;
|
|
|
|
|
|
|
|
if(disc)
|
2016-12-01 01:05:39 +01:00
|
|
|
loader = NINTENDONT;
|
|
|
|
if((loader == NINTENDONT && !m_nintendont_installed) || (loader == DEVOLUTION && !m_devo_installed))
|
2016-04-03 02:31:02 +02:00
|
|
|
{
|
|
|
|
error(_t("errgame11", L"GameCube Loader not found! Can't launch game."));
|
|
|
|
gcLaunchFail = true;
|
|
|
|
return;
|
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
/* GC Loader Found we can go ahead with launchShutdown() */
|
|
|
|
/* clear coverflow, start wiiflow wait animation, set exit handler */
|
2016-04-03 02:31:02 +02:00
|
|
|
_launchShutdown();
|
2012-03-19 19:08:48 +01:00
|
|
|
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
|
|
|
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
2016-12-01 01:05:39 +01:00
|
|
|
m_cfg.setString(_domainFromView(), "current_item", id);
|
2012-03-19 19:08:48 +01:00
|
|
|
|
2012-02-11 14:05:18 +01:00
|
|
|
if(has_enabled_providers() && _initNetwork() == 0)
|
2012-11-18 14:40:26 +01:00
|
|
|
add_game_to_card(id);
|
2012-02-11 14:05:18 +01:00
|
|
|
|
2017-03-17 01:02:21 +01:00
|
|
|
u8 GClanguage = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
|
2012-11-04 20:22:02 +01:00
|
|
|
GClanguage = (GClanguage == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "game_language", 0), ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1u) : GClanguage-1;
|
2014-04-25 22:23:21 +02:00
|
|
|
if(id[3] == 'E' || id[3] == 'J')
|
|
|
|
GClanguage = 1; //=english
|
2016-04-03 02:31:02 +02:00
|
|
|
|
2017-03-17 01:02:21 +01:00
|
|
|
u8 videoMode = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u);
|
2016-04-02 18:58:12 +02:00
|
|
|
videoMode = (videoMode == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalGCvideoModes) - 1u) : videoMode-1;
|
2013-08-24 22:40:39 +02:00
|
|
|
if(disc || videoMode == 0)
|
2012-07-15 15:18:01 +02:00
|
|
|
{
|
2012-11-18 14:40:26 +01:00
|
|
|
if(id[3] == 'E' || id[3] == 'J')
|
2012-07-15 15:18:01 +02:00
|
|
|
videoMode = 2; //NTSC 480i
|
|
|
|
else
|
|
|
|
videoMode = 1; //PAL 576i
|
|
|
|
}
|
2012-03-25 21:52:35 +02:00
|
|
|
|
2016-04-03 02:31:02 +02:00
|
|
|
bool widescreen = m_gcfg2.getBool(id, "widescreen", false);
|
2013-09-24 23:24:03 +02:00
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
if(loader == DEVOLUTION)
|
2013-08-21 17:20:13 +02:00
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
bool memcard_emu = m_gcfg2.testOptBool(id, "devo_memcard_emu", m_cfg.getBool(GC_DOMAIN, "devo_memcard_emu", false));
|
2016-04-03 02:31:02 +02:00
|
|
|
bool activity_led = m_gcfg2.getBool(id, "led", false);
|
|
|
|
DEVO_GetLoader(m_dataDir.c_str());
|
|
|
|
DEVO_SetOptions(path, id, memcard_emu, widescreen, activity_led, m_use_wifi_gecko);
|
2013-08-21 17:20:13 +02:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
else if(loader == NINTENDONT)
|
2013-08-21 17:20:13 +02:00
|
|
|
{
|
2017-03-17 01:02:21 +01:00
|
|
|
u8 emuMC = min((u32)m_gcfg2.getInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
|
|
|
|
emuMC = (emuMC == 0) ? m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1) : emuMC - 1;
|
|
|
|
|
|
|
|
// these 2 settings have global defaults in wfl main config
|
|
|
|
bool cc_rumble = m_gcfg2.testOptBool(id, "cc_rumble", m_cfg.getBool(GC_DOMAIN, "cc_rumble", false));
|
2016-12-01 01:05:39 +01:00
|
|
|
bool native_ctl = m_gcfg2.testOptBool(id, "native_ctl", m_cfg.getBool(GC_DOMAIN, "native_ctl", false));
|
2017-03-17 01:02:21 +01:00
|
|
|
|
|
|
|
bool deflicker = m_gcfg2.getBool(id, "deflicker", false);
|
2016-12-01 01:05:39 +01:00
|
|
|
bool tri_arcade = m_gcfg2.getBool(id, "triforce_arcade", false);
|
2017-03-17 01:02:21 +01:00
|
|
|
bool activity_led = m_gcfg2.getBool(id, "led", false);
|
|
|
|
bool ipl = m_gcfg2.getBool(id, "skip_ipl", false);
|
|
|
|
if(IsOnWiiU())
|
|
|
|
{
|
|
|
|
native_ctl = false;
|
|
|
|
activity_led = false;
|
|
|
|
}
|
2016-04-03 02:31:02 +02:00
|
|
|
if(disc == true)
|
2013-08-21 17:20:13 +02:00
|
|
|
{
|
2017-03-17 01:02:21 +01:00
|
|
|
/*funny, in order for these settings to work they would have to be entered in gameconfig2 manually under the gameID
|
|
|
|
or the game will have to already be on USB or SD but then why launch via disc?*/
|
|
|
|
Nintendont_BootDisc(emuMC, widescreen, cc_rumble, native_ctl, deflicker);
|
2013-08-21 17:20:13 +02:00
|
|
|
}
|
2016-04-03 02:31:02 +02:00
|
|
|
else
|
2013-08-21 17:20:13 +02:00
|
|
|
{
|
2016-04-03 02:31:02 +02:00
|
|
|
bool NIN_Debugger = (m_gcfg2.getInt(id, "debugger", 0) == 2);
|
|
|
|
bool wiiu_widescreen = m_gcfg2.getBool(id, "wiiu_widescreen", false);
|
2016-12-01 01:05:39 +01:00
|
|
|
bool cheats = m_gcfg2.getBool(id, "cheat", false);
|
2016-04-03 02:31:02 +02:00
|
|
|
/* Generate gct path */
|
|
|
|
char GC_Path[256];
|
|
|
|
GC_Path[255] = '\0';
|
|
|
|
strncpy(GC_Path, path, 255);
|
|
|
|
if(strcasestr(path, "boot.bin") != NULL)//games/title [id]/sys/boot.bin
|
2013-08-21 17:20:13 +02:00
|
|
|
{
|
2016-04-03 02:31:02 +02:00
|
|
|
*strrchr(GC_Path, '/') = '\0'; //erase /boot.bin
|
|
|
|
*(strrchr(GC_Path, '/')+1) = '\0'; //erase sys folder
|
2013-08-21 17:20:13 +02:00
|
|
|
}
|
2016-04-03 02:31:02 +02:00
|
|
|
else //games/title [id]/game.iso
|
|
|
|
*(strrchr(GC_Path, '/')+1) = '\0'; //erase game.iso
|
|
|
|
char CheatPath[256];// wiiflow cheats path - sd:/wiiflow/cheats/id.gct
|
|
|
|
char NewCheatPath[256];// nintendont cheat path - games/title [id]/id.gct
|
|
|
|
snprintf(CheatPath, sizeof(CheatPath), "%s/%s", m_cheatDir.c_str(), fmt("%s.gct", id));
|
|
|
|
snprintf(NewCheatPath, sizeof(NewCheatPath), "%s%s.gct",GC_Path,id);
|
|
|
|
|
|
|
|
Nintendont_SetOptions(path, id, CheatPath, NewCheatPath, DeviceName[currentPartition],
|
2017-03-17 01:02:21 +01:00
|
|
|
cheats, emuMC, videoMode, widescreen, activity_led, native_ctl, deflicker, wiiu_widescreen,
|
|
|
|
NIN_Debugger, tri_arcade, cc_rumble, ipl);
|
2013-08-21 17:20:13 +02:00
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
}
|
|
|
|
/* configs no longer needed */
|
2012-03-17 14:56:49 +01:00
|
|
|
m_gcfg1.save(true);
|
|
|
|
m_gcfg2.save(true);
|
|
|
|
m_cat.save(true);
|
|
|
|
m_cfg.save(true);
|
2016-12-01 01:05:39 +01:00
|
|
|
if(loader == NINTENDONT)
|
2016-11-07 16:06:00 +01:00
|
|
|
{
|
|
|
|
bool ret = (Nintendont_GetLoader() && LoadAppBooter(fmt("%s/app_booter.bin", m_binsDir.c_str())));
|
|
|
|
if(ret == false)
|
|
|
|
{
|
|
|
|
error(_t("errgame14", L"app_booter.bin not found!"));
|
|
|
|
_exitWiiflow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* no more error msgs - remove btns and sounds */
|
2012-03-17 14:56:49 +01:00
|
|
|
cleanup();
|
2016-04-02 17:46:06 +02:00
|
|
|
|
2016-04-03 02:31:02 +02:00
|
|
|
GC_SetVideoMode(videoMode, loader);
|
2014-04-25 22:23:21 +02:00
|
|
|
GC_SetLanguage(GClanguage, loader);
|
2013-04-24 23:37:04 +02:00
|
|
|
/* NTSC-J Patch by FIX94 */
|
|
|
|
if(id[3] == 'J')
|
|
|
|
*HW_PPCSPEED = 0x0002A9E0;
|
2012-09-02 15:34:41 +02:00
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
if(loader == DEVOLUTION)
|
2012-07-28 18:41:48 +02:00
|
|
|
{
|
2012-08-25 17:10:57 +02:00
|
|
|
if(AHBRPOT_Patched())
|
|
|
|
loadIOS(58, false);
|
|
|
|
else //use cIOS instead to make sure Devolution works anyways
|
|
|
|
loadIOS(mainIOS, false);
|
2012-09-02 15:34:41 +02:00
|
|
|
ShutdownBeforeExit();
|
|
|
|
DEVO_Boot();
|
2012-07-28 18:41:48 +02:00
|
|
|
}
|
2013-09-24 23:24:03 +02:00
|
|
|
else
|
|
|
|
{
|
2014-06-24 15:33:54 +02:00
|
|
|
Nintendont_WriteOptions();
|
2013-09-24 23:24:03 +02:00
|
|
|
ShutdownBeforeExit();
|
2016-11-07 16:06:00 +01:00
|
|
|
loadIOS(58, false); //nintendont NEEDS ios58
|
|
|
|
BootHomebrew(); //regular dol
|
2013-09-24 23:24:03 +02:00
|
|
|
}
|
2012-09-09 20:35:15 +02:00
|
|
|
Sys_Exit();
|
2012-01-21 22:15:45 +01:00
|
|
|
}
|
|
|
|
|
2012-05-06 14:59:09 +02:00
|
|
|
void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-11-07 16:06:00 +01:00
|
|
|
/* clear coverflow, start wiiflow wait animation, set exit handler */
|
2013-03-23 18:06:06 +01:00
|
|
|
_launchShutdown();
|
2012-05-19 18:06:06 +02:00
|
|
|
m_gcfg1.save(true);
|
|
|
|
m_gcfg2.save(true);
|
|
|
|
m_cat.save(true);
|
|
|
|
m_cfg.save(true);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-05-19 18:06:06 +02:00
|
|
|
Playlog_Delete();
|
2012-08-24 20:01:40 +02:00
|
|
|
|
2013-11-19 16:27:52 +01:00
|
|
|
bool ret = (LoadHomebrew(filepath) && LoadAppBooter(fmt("%s/app_booter.bin", m_binsDir.c_str())));
|
2016-11-07 16:06:00 +01:00
|
|
|
if(ret == false)
|
|
|
|
{
|
|
|
|
error(_t("errgame14", L"app_booter.bin not found!"));
|
|
|
|
_exitWiiflow();
|
|
|
|
}
|
|
|
|
/* no more error msgs - remove btns and sounds */
|
|
|
|
cleanup(); // wifi and sd gecko doesnt work anymore after cleanup
|
2013-11-19 16:27:52 +01:00
|
|
|
|
|
|
|
AddBootArgument(filepath);
|
|
|
|
for(u32 i = 0; i < arguments.size(); ++i)
|
|
|
|
{
|
|
|
|
gprintf("Argument: %s\n", arguments[i].c_str());
|
|
|
|
AddBootArgument(arguments[i].c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
ShutdownBeforeExit();
|
2016-11-07 16:06:00 +01:00
|
|
|
loadIOS(58, false);
|
|
|
|
BootHomebrew();
|
2013-11-19 16:27:52 +01:00
|
|
|
Sys_Exit();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2016-11-07 16:06:00 +01:00
|
|
|
/* dont confuse loadIOS with _loadIOS */
|
2012-12-08 22:16:05 +01:00
|
|
|
int CMenu::_loadIOS(u8 gameIOS, int userIOS, string id, bool RealNAND_Channels)
|
2012-05-03 06:55:09 +02:00
|
|
|
{
|
2012-05-12 19:14:25 +02:00
|
|
|
gprintf("Game ID# %s requested IOS %d. User selected %d\n", id.c_str(), gameIOS, userIOS);
|
2012-12-09 21:21:47 +01:00
|
|
|
if(neek2o() || (RealNAND_Channels && IOS_GetType(mainIOS) == IOS_TYPE_STUB))
|
2012-07-13 15:16:13 +02:00
|
|
|
{
|
2012-12-22 21:57:23 +01:00
|
|
|
bool ret = loadIOS(gameIOS, false);
|
|
|
|
_netInit();
|
|
|
|
if(ret == false)
|
2012-07-13 15:16:13 +02:00
|
|
|
{
|
2016-04-03 02:42:09 +02:00
|
|
|
error(wfmt(_fmt("errgame4", L"Couldn't load IOS %i"), gameIOS));
|
2012-07-13 15:16:13 +02:00
|
|
|
return LOAD_IOS_FAILED;
|
|
|
|
}
|
|
|
|
return LOAD_IOS_SUCCEEDED;
|
|
|
|
}
|
|
|
|
|
2012-07-01 23:25:32 +02:00
|
|
|
if(userIOS)
|
2012-05-03 06:55:09 +02:00
|
|
|
{
|
|
|
|
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
|
|
|
|
{
|
|
|
|
if(itr->second == userIOS || itr->first == userIOS)
|
|
|
|
{
|
|
|
|
gameIOS = itr->first;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-07-01 23:25:32 +02:00
|
|
|
else if(gameIOS != 57)
|
2012-08-24 00:29:15 +02:00
|
|
|
gameIOS = mainIOS;
|
2012-07-01 23:25:32 +02:00
|
|
|
gprintf("Changed requested IOS to %d.\n", gameIOS);
|
2012-05-03 06:55:09 +02:00
|
|
|
|
2012-05-12 19:14:25 +02:00
|
|
|
// remap IOS to CIOS
|
|
|
|
if(gameIOS < 0x64)
|
2012-05-03 06:55:09 +02:00
|
|
|
{
|
2012-05-24 00:09:11 +02:00
|
|
|
if(_installed_cios.size() <= 0)
|
2012-05-03 06:55:09 +02:00
|
|
|
{
|
2016-04-03 02:42:09 +02:00
|
|
|
error(_t("errgame2", L"No cIOS found!"));
|
2012-09-09 20:35:15 +02:00
|
|
|
Sys_Exit();
|
2012-05-12 19:14:25 +02:00
|
|
|
}
|
|
|
|
u8 IOS[3];
|
|
|
|
IOS[0] = gameIOS;
|
|
|
|
IOS[1] = 56;
|
|
|
|
IOS[2] = 57;
|
|
|
|
bool found = false;
|
|
|
|
for(u8 num = 0; num < 3; num++)
|
|
|
|
{
|
|
|
|
if(found)
|
|
|
|
break;
|
|
|
|
if(IOS[num] == 0)
|
|
|
|
continue;
|
|
|
|
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
|
2012-05-03 06:55:09 +02:00
|
|
|
{
|
2012-05-12 19:14:25 +02:00
|
|
|
if(itr->second == IOS[num] || itr->first == IOS[num])
|
2012-05-03 06:55:09 +02:00
|
|
|
{
|
2012-05-12 19:14:25 +02:00
|
|
|
gameIOS = itr->first;
|
|
|
|
found = true;
|
|
|
|
break;
|
2012-05-03 06:55:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-05-12 19:14:25 +02:00
|
|
|
if(!found)
|
|
|
|
return LOAD_IOS_FAILED;
|
2012-05-03 06:55:09 +02:00
|
|
|
}
|
2012-05-12 19:14:25 +02:00
|
|
|
|
2012-08-11 14:27:38 +02:00
|
|
|
if(gameIOS != CurrentIOS.Version)
|
2012-05-12 19:14:25 +02:00
|
|
|
{
|
|
|
|
gprintf("Reloading IOS into %d\n", gameIOS);
|
2012-12-22 21:57:23 +01:00
|
|
|
bool ret = loadIOS(gameIOS, true);
|
|
|
|
_netInit();
|
|
|
|
if(ret == false)
|
2012-05-12 19:14:25 +02:00
|
|
|
{
|
2016-04-03 02:42:09 +02:00
|
|
|
error(wfmt(_fmt("errgame4", L"Couldn't load IOS %i"), gameIOS));
|
2012-05-12 19:14:25 +02:00
|
|
|
return LOAD_IOS_FAILED;
|
|
|
|
}
|
|
|
|
return LOAD_IOS_SUCCEEDED;
|
|
|
|
}
|
2012-05-03 06:55:09 +02:00
|
|
|
return LOAD_IOS_NOT_NEEDED;
|
|
|
|
}
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
void CMenu::_launchChannel(dir_discHdr *hdr)
|
|
|
|
{
|
2016-11-07 16:06:00 +01:00
|
|
|
/* clear coverflow, start wiiflow wait animation, set exit handler */
|
2013-03-23 18:06:06 +01:00
|
|
|
_launchShutdown();
|
2012-07-08 15:35:59 +02:00
|
|
|
string id = string(hdr->id);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
/* WII_Launch is used for launching real nand channels */
|
2016-06-20 23:03:40 +02:00
|
|
|
bool WII_Launch = (m_gcfg2.getBool(id, "custom", false) && (!NANDemuView || neek2o()));
|
2016-12-01 01:05:39 +01:00
|
|
|
/* use_dol = true to use the channels dol or false to use the old apploader method to boot channel */
|
2013-01-05 18:12:13 +01:00
|
|
|
bool use_dol = !m_gcfg2.getBool(id, "apploader", false);
|
2012-06-28 15:05:31 +02:00
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
bool vipatch = m_gcfg2.getBool(id, "vipatch", false);
|
|
|
|
bool cheat = m_gcfg2.getBool(id, "cheat", false);
|
|
|
|
bool countryPatch = m_gcfg2.getBool(id, "country_patch", false);
|
2012-06-28 15:05:31 +02:00
|
|
|
|
2016-12-14 19:47:13 +01:00
|
|
|
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1);
|
|
|
|
videoMode = (videoMode == 0) ? (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1) : videoMode - 1;
|
2012-06-28 15:05:31 +02:00
|
|
|
|
2016-12-14 19:47:13 +01:00
|
|
|
int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1);
|
2012-06-28 15:05:31 +02:00
|
|
|
language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language;
|
|
|
|
|
2016-12-14 19:47:13 +01:00
|
|
|
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1);
|
|
|
|
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1) - 1;// -1,0,1
|
2016-12-01 01:05:39 +01:00
|
|
|
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
|
2012-10-20 15:24:30 +02:00
|
|
|
u32 returnTo = rtrn[0] << 24 | rtrn[1] << 16 | rtrn[2] << 8 | rtrn[3];
|
2012-06-28 15:05:31 +02:00
|
|
|
|
2012-11-03 20:16:03 +01:00
|
|
|
u8 *cheatFile = NULL;
|
2012-09-07 22:45:04 +02:00
|
|
|
u32 cheatSize = 0;
|
2012-10-04 18:07:26 +02:00
|
|
|
if(!WII_Launch)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
hooktype = (u32) m_gcfg2.getInt(id, "hooktype", 0);
|
2013-05-21 14:43:14 +02:00
|
|
|
debuggerselect = m_gcfg2.getInt(id, "debugger", 0);
|
|
|
|
if((cheat || debuggerselect == 1) && hooktype == 0)
|
2012-06-07 02:34:47 +02:00
|
|
|
hooktype = 1;
|
2013-05-21 14:43:14 +02:00
|
|
|
else if(!cheat && debuggerselect != 1)
|
2012-06-07 02:34:47 +02:00
|
|
|
hooktype = 0;
|
2013-05-21 14:43:14 +02:00
|
|
|
|
|
|
|
if(cheat)
|
2012-09-07 22:45:04 +02:00
|
|
|
_loadFile(cheatFile, cheatSize, m_cheatDir.c_str(), fmt("%s.gct", id.c_str()));
|
2012-10-04 18:07:26 +02:00
|
|
|
if(has_enabled_providers() && _initNetwork() == 0)
|
|
|
|
add_game_to_card(id.c_str());
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-12-01 01:05:39 +01:00
|
|
|
m_cfg.setString(_domainFromView(), "current_item", id);
|
2012-01-21 21:57:41 +01:00
|
|
|
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
|
|
|
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
|
|
|
|
2016-04-21 02:05:28 +02:00
|
|
|
string emuPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str());
|
2012-11-04 20:22:02 +01:00
|
|
|
int emulate_mode = min(max(0, m_cfg.getInt(CHANNEL_DOMAIN, "emulation", 1)), (int)ARRAY_SIZE(CMenu::_NandEmu) - 1);
|
2012-06-07 02:34:47 +02:00
|
|
|
|
2012-05-24 00:09:11 +02:00
|
|
|
int userIOS = m_gcfg2.getInt(id, "ios", 0);
|
2012-07-08 15:35:59 +02:00
|
|
|
u64 gameTitle = TITLE_ID(hdr->settings[0],hdr->settings[1]);
|
2012-09-20 16:15:53 +02:00
|
|
|
bool useNK2o = (m_gcfg2.getBool(id, "useneek", false) && !neek2o());
|
2013-01-19 21:48:07 +01:00
|
|
|
bool use_led = m_gcfg2.getBool(id, "led", false);
|
2013-08-23 03:10:20 +02:00
|
|
|
u32 gameIOS = ChannelHandle.GetRequestedIOS(gameTitle);
|
2012-05-12 19:14:25 +02:00
|
|
|
|
2016-11-07 16:06:00 +01:00
|
|
|
/* configs no longer needed */
|
2012-01-21 21:57:41 +01:00
|
|
|
m_gcfg1.save(true);
|
|
|
|
m_gcfg2.save(true);
|
|
|
|
m_cat.save(true);
|
|
|
|
m_cfg.save(true);
|
2012-10-20 15:24:30 +02:00
|
|
|
|
2016-06-20 23:03:40 +02:00
|
|
|
if(NANDemuView && !neek2o())
|
2012-07-22 20:02:56 +02:00
|
|
|
{
|
2012-10-04 18:24:52 +02:00
|
|
|
if(useNK2o)
|
2012-07-22 20:02:56 +02:00
|
|
|
{
|
2012-10-04 18:24:52 +02:00
|
|
|
if(!Load_Neek2o_Kernel())
|
|
|
|
{
|
|
|
|
error(_t("errneek1", L"Cannot launch neek2o. Verify your neek2o setup"));
|
2016-11-07 16:06:00 +01:00
|
|
|
_exitWiiflow();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cleanup();
|
|
|
|
ShutdownBeforeExit();
|
|
|
|
Launch_nk(gameTitle, NandHandle.Get_NandPath(), returnTo ? (((u64)(0x00010001) << 32) | (returnTo & 0xFFFFFFFF)) : 0);
|
|
|
|
while(1) usleep(500);
|
2012-10-04 18:24:52 +02:00
|
|
|
}
|
|
|
|
}
|
2012-07-10 13:25:27 +02:00
|
|
|
}
|
2014-03-24 19:59:24 +01:00
|
|
|
if(WII_Launch == false && ExternalBooter_LoadBins(m_binsDir.c_str()) == false)
|
2016-11-07 16:06:00 +01:00
|
|
|
{
|
|
|
|
error(_t("errgame15", L"Missing ext_loader.bin or ext_booter.bin!"));
|
|
|
|
_exitWiiflow();
|
|
|
|
}
|
2016-06-20 23:03:40 +02:00
|
|
|
if(_loadIOS(gameIOS, userIOS, id, !NANDemuView) == LOAD_IOS_FAILED)
|
2016-11-07 16:06:00 +01:00
|
|
|
{
|
|
|
|
/* error message already shown */
|
|
|
|
_exitWiiflow();
|
|
|
|
}
|
2013-12-24 16:35:59 +01:00
|
|
|
|
2012-10-20 15:24:30 +02:00
|
|
|
if((CurrentIOS.Type == IOS_TYPE_D2X || neek2o()) && returnTo != 0)
|
2012-07-10 23:24:38 +02:00
|
|
|
{
|
2012-10-20 15:24:30 +02:00
|
|
|
if(D2X_PatchReturnTo(returnTo) >= 0)
|
|
|
|
memset(&returnTo, 0, sizeof(u32));
|
|
|
|
}
|
2016-06-20 23:03:40 +02:00
|
|
|
if(NANDemuView && !neek2o())
|
2012-10-20 15:24:30 +02:00
|
|
|
{
|
2012-12-22 21:57:23 +01:00
|
|
|
/* Enable our Emu NAND */
|
2012-12-22 23:28:58 +01:00
|
|
|
DeviceHandle.UnMountAll();
|
2012-10-20 15:24:30 +02:00
|
|
|
if(emulate_mode == 1)
|
|
|
|
NandHandle.Set_FullMode(true);
|
|
|
|
else
|
|
|
|
NandHandle.Set_FullMode(false);
|
|
|
|
if(NandHandle.Enable_Emu() < 0)
|
|
|
|
{
|
|
|
|
NandHandle.Disable_Emu();
|
|
|
|
error(_t("errgame5", L"Enabling emu failed!"));
|
2016-11-07 16:06:00 +01:00
|
|
|
_exitWiiflow();
|
2012-10-20 15:24:30 +02:00
|
|
|
}
|
2012-12-22 23:28:58 +01:00
|
|
|
DeviceHandle.MountAll();
|
2012-07-10 23:24:38 +02:00
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
|
|
|
|
cleanup();//done with error menu can now cleanup
|
|
|
|
|
2012-10-04 18:07:26 +02:00
|
|
|
if(WII_Launch)
|
2012-08-12 23:26:24 +02:00
|
|
|
{
|
2012-09-02 13:51:26 +02:00
|
|
|
ShutdownBeforeExit();
|
2012-08-12 23:26:24 +02:00
|
|
|
WII_Initialize();
|
2012-09-09 20:35:15 +02:00
|
|
|
WII_LaunchTitle(gameTitle);
|
2012-08-12 23:26:24 +02:00
|
|
|
}
|
2012-10-04 18:07:26 +02:00
|
|
|
else
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
setLanguage(language);
|
2012-11-03 20:16:03 +01:00
|
|
|
ocarina_load_code(cheatFile, cheatSize);
|
2012-12-09 21:21:47 +01:00
|
|
|
NandHandle.Patch_AHB(); /* Identify may takes it */
|
2013-08-22 18:39:38 +02:00
|
|
|
PatchIOS(true); /* Patch for everything */
|
2012-09-07 22:10:04 +02:00
|
|
|
Identify(gameTitle);
|
2013-12-24 16:35:59 +01:00
|
|
|
|
|
|
|
ExternalBooter_ChannelSetup(gameTitle, use_dol);
|
|
|
|
WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, 0, TYPE_CHANNEL, use_led);
|
2012-07-10 13:25:27 +02:00
|
|
|
}
|
2012-09-09 20:35:15 +02:00
|
|
|
Sys_Exit();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|
|
|
{
|
2016-11-07 16:06:00 +01:00
|
|
|
/* clear coverflow, start wiiflow wait animation, set exit handler */
|
2013-03-23 18:06:06 +01:00
|
|
|
_launchShutdown();
|
2012-07-08 16:44:21 +02:00
|
|
|
string id(hdr->id);
|
|
|
|
string path(hdr->path);
|
2012-07-16 16:05:57 +02:00
|
|
|
if(neek2o())
|
2012-07-13 15:16:13 +02:00
|
|
|
{
|
|
|
|
int discID = id.c_str()[0] << 24 | id.c_str()[1] << 16 | id.c_str()[2] << 8 | id.c_str()[3];
|
2012-10-15 00:47:23 +02:00
|
|
|
if(WDVD_NEEK_LoadDisc((discID&0xFFFFFFFF), 0x5D1C9EA3) > 0)
|
|
|
|
{
|
|
|
|
dvd = true;
|
|
|
|
sleep(3);
|
|
|
|
}
|
2012-07-13 15:16:13 +02:00
|
|
|
}
|
|
|
|
|
2012-07-08 16:44:21 +02:00
|
|
|
if(dvd)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
u32 cover = 0;
|
2012-09-20 18:09:32 +02:00
|
|
|
if(!neek2o() && !Sys_DolphinMode())
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-09-01 11:34:18 +02:00
|
|
|
if(WDVD_GetCoverStatus(&cover) < 0)
|
2012-07-13 15:16:13 +02:00
|
|
|
{
|
|
|
|
error(_t("errgame7", L"WDVDGetCoverStatus Failed!"));
|
2012-09-09 20:35:15 +02:00
|
|
|
Sys_Exit();
|
2012-07-13 15:16:13 +02:00
|
|
|
}
|
2012-09-01 11:34:18 +02:00
|
|
|
if(!(cover & 0x2))
|
2012-07-13 15:16:13 +02:00
|
|
|
{
|
|
|
|
error(_t("errgame8", L"Please insert a game disc."));
|
2012-09-01 11:34:18 +02:00
|
|
|
do
|
|
|
|
{
|
2012-07-13 15:16:13 +02:00
|
|
|
WDVD_GetCoverStatus(&cover);
|
2012-09-01 11:34:18 +02:00
|
|
|
if(BTN_B_PRESSED)
|
|
|
|
return;
|
2012-07-13 15:16:13 +02:00
|
|
|
} while(!(cover & 0x2));
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-11-12 21:12:00 +01:00
|
|
|
TempLoadIOS();
|
2012-01-21 21:57:41 +01:00
|
|
|
/* Open Disc */
|
2012-09-05 17:52:32 +02:00
|
|
|
if(Disc_Open(true) < 0)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-07-07 00:38:21 +02:00
|
|
|
error(_t("wbfsoperr2", L"Disc_Open failed"));
|
2012-09-09 20:35:15 +02:00
|
|
|
Sys_Exit();
|
2012-01-23 16:57:30 +01:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
/* Check disc */
|
2012-09-05 17:52:32 +02:00
|
|
|
if(Disc_IsWii() < 0)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-04-03 02:31:02 +02:00
|
|
|
if(Disc_IsGC() < 0)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-07-07 00:38:21 +02:00
|
|
|
error(_t("errgame9", L"This is not a Wii or GC disc"));
|
2012-09-09 20:35:15 +02:00
|
|
|
Sys_Exit();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
else
|
2012-03-18 14:29:17 +01:00
|
|
|
{
|
|
|
|
/* Read GC disc header */
|
2012-11-18 14:40:26 +01:00
|
|
|
Disc_ReadGCHeader(&gc_hdr);
|
|
|
|
memcpy(hdr->id, gc_hdr.id, 6);
|
2016-04-03 02:31:02 +02:00
|
|
|
|
2012-03-18 14:29:17 +01:00
|
|
|
/* Launching GC Game */
|
2016-04-03 02:31:02 +02:00
|
|
|
if(m_nintendont_installed)
|
|
|
|
_launchGC(hdr, true);
|
|
|
|
else
|
|
|
|
error(_t("errgame12", L"Nintendont not found! Can't launch GC Disc."));
|
2012-11-18 14:40:26 +01:00
|
|
|
return;
|
2012-03-18 14:29:17 +01:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-07-08 16:44:21 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Read header */
|
2012-11-18 14:40:26 +01:00
|
|
|
Disc_ReadHeader(&wii_hdr);
|
2012-12-27 18:01:04 +01:00
|
|
|
id = string((const char*)wii_hdr.id, 6);
|
2012-07-08 16:44:21 +02:00
|
|
|
}
|
|
|
|
gprintf("Game ID: %s\n", id.c_str());
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-07-08 16:44:21 +02:00
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
bool vipatch = m_gcfg2.getBool(id, "vipatch", false);
|
|
|
|
bool countryPatch = m_gcfg2.getBool(id, "country_patch", false);
|
|
|
|
bool private_server = m_gcfg2.getBool(id, "private_server", false);
|
2012-06-28 15:05:31 +02:00
|
|
|
|
|
|
|
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
|
|
|
videoMode = (videoMode == 0) ? (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1) : videoMode-1;
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
|
2012-06-28 15:05:31 +02:00
|
|
|
language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language;
|
|
|
|
|
2012-12-15 14:06:33 +01:00
|
|
|
const char *rtrn = m_cfg.getString("GENERAL", "returnto", "").c_str();
|
2016-12-01 01:05:39 +01:00
|
|
|
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u) - 1;
|
|
|
|
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
2012-01-27 14:59:36 +01:00
|
|
|
|
2012-06-07 02:34:47 +02:00
|
|
|
u8 emulate_mode = min((u32)m_gcfg2.getInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u);
|
2016-04-21 02:05:28 +02:00
|
|
|
if(emulate_mode == 0)// default then use global
|
2012-11-04 20:22:02 +01:00
|
|
|
emulate_mode = min(max(0, m_cfg.getInt(WII_DOMAIN, "save_emulation", 0)), (int)ARRAY_SIZE(CMenu::_GlobalSaveEmu) - 1);
|
2016-04-25 02:04:38 +02:00
|
|
|
else
|
|
|
|
emulate_mode--;
|
2016-11-07 16:06:00 +01:00
|
|
|
|
|
|
|
string emuPath;
|
|
|
|
int emuPartition = 0;
|
2016-04-25 02:04:38 +02:00
|
|
|
|
2013-02-08 11:39:07 +01:00
|
|
|
if(emulate_mode && !dvd && !neek2o())
|
2012-08-25 17:10:57 +02:00
|
|
|
{
|
2016-06-20 23:03:40 +02:00
|
|
|
emuPartition = _FindEmuPart(emuPath, false, true);
|
2016-04-25 02:04:38 +02:00
|
|
|
if(emuPartition < 0)//if savepartition and/or nand folder no good
|
2012-05-03 01:08:11 +02:00
|
|
|
{
|
2016-04-25 02:04:38 +02:00
|
|
|
_hideWaitMessage();
|
-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
|
|
|
error(_t("errgame13", L"EmuNAND for gamesave not found! Using real NAND."));
|
|
|
|
emulate_mode = 0;
|
2016-04-25 02:04:38 +02:00
|
|
|
_showWaitMessage();
|
2012-08-25 17:10:57 +02:00
|
|
|
}
|
2016-04-25 02:04:38 +02:00
|
|
|
if(emulate_mode == 1)//gamesave
|
2012-03-13 00:57:59 +01:00
|
|
|
{
|
2013-02-08 11:39:07 +01:00
|
|
|
m_forceext = false;
|
|
|
|
_hideWaitMessage();
|
2016-12-01 01:05:39 +01:00
|
|
|
m_exit = false;
|
2016-11-07 16:06:00 +01:00
|
|
|
/*_AutoExtractSave(id) returns
|
|
|
|
true if the save is already on emu nand (then no extraction)
|
|
|
|
true if the save was successfully extracted
|
|
|
|
false if save is not on real nand (nothing to extract)
|
2016-04-25 02:04:38 +02:00
|
|
|
false if user chooses to have game create new save*/
|
|
|
|
if(!_AutoExtractSave(id))
|
|
|
|
NandHandle.CreateTitleTMD(hdr);//setup emu nand for gamesave
|
2013-02-08 11:39:07 +01:00
|
|
|
_showWaitMessage();
|
2016-12-01 01:05:39 +01:00
|
|
|
m_exit = true;
|
2012-03-13 00:57:59 +01:00
|
|
|
}
|
2016-04-25 02:04:38 +02:00
|
|
|
else if(emulate_mode > 1)//region switch or full
|
2012-03-13 00:57:59 +01:00
|
|
|
{
|
-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
|
|
|
// copy real nand config files to emuNAND
|
2012-12-22 17:47:02 +01:00
|
|
|
NandHandle.CreateConfig();
|
-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
|
|
|
// do region change on emuNAND even if region switch is not selected
|
2014-02-16 21:12:35 +01:00
|
|
|
NandHandle.Do_Region_Change(id, false);
|
-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
|
|
|
// region change is always done because if it was changed last time then this time it may need to be set back
|
|
|
|
// region switch is done later when D2X cIOS is detected
|
2012-03-13 00:57:59 +01:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
-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
|
|
|
|
emulate_mode = 0;//sets to off we are using neek2o or launching a DVD game
|
2013-01-01 18:42:46 +01:00
|
|
|
|
2013-01-19 21:48:07 +01:00
|
|
|
bool use_led = m_gcfg2.getBool(id, "led", false);
|
2016-12-01 01:05:39 +01:00
|
|
|
bool cheat = m_gcfg2.getBool(id, "cheat", false);
|
2013-05-21 14:43:14 +02:00
|
|
|
debuggerselect = m_gcfg2.getInt(id, "debugger", 0); // debuggerselect is defined in fst.h
|
|
|
|
if((id == "RPWE41" || id == "RPWZ41" || id == "SPXP41") && debuggerselect == 1) // Prince of Persia, Rival Swords
|
|
|
|
debuggerselect = 0;
|
2012-10-20 15:24:30 +02:00
|
|
|
hooktype = (u32)m_gcfg2.getInt(id, "hooktype", 0); // hooktype is defined in patchcode.h
|
2013-05-21 14:43:14 +02:00
|
|
|
if((cheat || debuggerselect == 1) && hooktype == 0)
|
|
|
|
hooktype = 1;
|
|
|
|
else if(!cheat && debuggerselect != 1)
|
|
|
|
hooktype = 0;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-11-03 20:16:03 +01:00
|
|
|
u8 *cheatFile = NULL;
|
|
|
|
u8 *gameconfig = NULL;
|
2012-07-16 16:05:57 +02:00
|
|
|
u32 cheatSize = 0, gameconfigSize = 0, returnTo = 0;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2016-12-01 01:05:39 +01:00
|
|
|
m_cfg.setString(_domainFromView(), "current_item", id);
|
2012-01-21 21:57:41 +01:00
|
|
|
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
|
|
|
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
2012-03-18 14:29:17 +01:00
|
|
|
|
2012-06-07 02:34:47 +02:00
|
|
|
if(has_enabled_providers() && _initNetwork() == 0)
|
2012-07-08 16:44:21 +02:00
|
|
|
add_game_to_card(id.c_str());
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
setLanguage(language);
|
|
|
|
|
2012-10-20 15:24:30 +02:00
|
|
|
load_wip_patches((u8 *)m_wipDir.c_str(), (u8 *) &id);
|
2012-05-12 18:03:14 +02:00
|
|
|
if(cheat)
|
2012-07-08 16:44:21 +02:00
|
|
|
_loadFile(cheatFile, cheatSize, m_cheatDir.c_str(), fmt("%s.gct", id.c_str()));
|
2012-01-21 21:57:41 +01:00
|
|
|
_loadFile(gameconfig, gameconfigSize, m_txtCheatDir.c_str(), "gameconfig.txt");
|
2012-09-20 16:15:53 +02:00
|
|
|
|
2012-12-15 14:06:33 +01:00
|
|
|
if(strlen(rtrn) == 4)
|
2012-07-16 16:05:57 +02:00
|
|
|
returnTo = rtrn[0] << 24 | rtrn[1] << 16 | rtrn[2] << 8 | rtrn[3];
|
2013-01-19 21:48:07 +01:00
|
|
|
int userIOS = m_gcfg2.getInt(id, "ios", 0);
|
2012-10-15 00:47:23 +02:00
|
|
|
int gameIOS = dvd && !neek2o() ? userIOS : GetRequestedGameIOS(hdr);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-07-08 15:35:59 +02:00
|
|
|
m_gcfg1.save(true);
|
|
|
|
m_gcfg2.save(true);
|
|
|
|
m_cat.save(true);
|
|
|
|
m_cfg.save(true);
|
2016-11-07 16:06:00 +01:00
|
|
|
//cleanup(); wifi and sd gecko doesnt work anymore after cleanup
|
2012-09-20 16:15:53 +02:00
|
|
|
|
-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
|
|
|
//this is a temp region change of real nand(rn) for gamesave or off or DVD if tempregionrn is set true
|
2014-03-01 00:11:02 +01:00
|
|
|
bool patchregion = false;
|
2016-04-25 02:04:38 +02:00
|
|
|
if(emulate_mode <= 1 && !neek2o() && m_cfg.getBool("GENERAL", "tempregionrn", false))
|
2014-03-01 00:11:02 +01:00
|
|
|
{
|
|
|
|
gprintf("Check\n");
|
|
|
|
patchregion = NandHandle.Do_Region_Change(id, true);
|
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
//load external booter bin file
|
2014-03-24 19:59:24 +01:00
|
|
|
if(ExternalBooter_LoadBins(m_binsDir.c_str()) == false)
|
2016-11-07 16:06:00 +01:00
|
|
|
{
|
|
|
|
error(_t("errgame15", L"Missing ext_loader.bin or ext_booter.bin!"));
|
|
|
|
_exitWiiflow();
|
|
|
|
}
|
2012-09-20 18:09:32 +02:00
|
|
|
if((!dvd || neek2o()) && !Sys_DolphinMode())
|
2012-09-20 16:15:53 +02:00
|
|
|
{
|
|
|
|
if(_loadIOS(gameIOS, userIOS, id) == LOAD_IOS_FAILED)
|
2016-11-07 16:06:00 +01:00
|
|
|
{
|
|
|
|
/* error message already shown */
|
|
|
|
_exitWiiflow();
|
|
|
|
}
|
2012-09-20 16:15:53 +02:00
|
|
|
}
|
2013-12-24 16:35:59 +01:00
|
|
|
|
2013-02-08 11:39:07 +01:00
|
|
|
if(CurrentIOS.Type == IOS_TYPE_D2X)
|
2012-10-13 18:57:03 +02:00
|
|
|
{
|
2013-02-08 11:39:07 +01:00
|
|
|
if(returnTo != 0 && !m_directLaunch && D2X_PatchReturnTo(returnTo) >= 0)
|
2012-10-20 15:24:30 +02:00
|
|
|
memset(&returnTo, 0, sizeof(u32));
|
2013-02-08 11:39:07 +01:00
|
|
|
if(emulate_mode)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2013-02-08 11:39:07 +01:00
|
|
|
/* Enable our Emu NAND */
|
|
|
|
DeviceHandle.UnMountAll();
|
2016-04-25 02:04:38 +02:00
|
|
|
if(emulate_mode == 2)
|
2013-02-08 11:39:07 +01:00
|
|
|
NandHandle.Set_RCMode(true);
|
2016-04-25 02:04:38 +02:00
|
|
|
else if(emulate_mode == 3)
|
2013-02-08 11:39:07 +01:00
|
|
|
NandHandle.Set_FullMode(true);
|
|
|
|
else
|
|
|
|
NandHandle.Set_FullMode(false);
|
|
|
|
if(NandHandle.Enable_Emu() < 0)
|
|
|
|
{
|
|
|
|
NandHandle.Disable_Emu();
|
|
|
|
error(_t("errgame6", L"Enabling emu after reload failed!"));
|
|
|
|
Sys_Exit();
|
|
|
|
}
|
|
|
|
DeviceHandle.MountAll();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
|
|
|
|
/* no more error msgs - clear btns and snds */
|
|
|
|
cleanup(); //wifi and sd gecko doesnt work anymore after cleanup
|
|
|
|
|
2012-09-28 19:24:04 +02:00
|
|
|
bool wbfs_partition = false;
|
2012-07-08 16:44:21 +02:00
|
|
|
if(!dvd)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-09-22 15:47:52 +02:00
|
|
|
DeviceHandle.OpenWBFS(currentPartition);
|
2012-09-28 19:24:04 +02:00
|
|
|
wbfs_partition = (DeviceHandle.GetFSType(currentPartition) == PART_FS_WBFS);
|
2012-09-22 15:47:52 +02:00
|
|
|
if(!wbfs_partition && get_frag_list((u8 *)id.c_str(), (char*)path.c_str(), currentPartition == 0 ? 0x200 : USBStorage2_GetSectorSize()) < 0)
|
|
|
|
Sys_Exit();
|
|
|
|
WBFS_Close();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-11-03 20:16:03 +01:00
|
|
|
if(cheatFile != NULL)
|
2012-09-20 16:15:53 +02:00
|
|
|
{
|
2012-11-03 20:16:03 +01:00
|
|
|
ocarina_load_code(cheatFile, cheatSize);
|
|
|
|
free(cheatFile);
|
2012-09-20 16:15:53 +02:00
|
|
|
}
|
2012-11-03 20:16:03 +01:00
|
|
|
if(gameconfig != NULL)
|
2012-10-14 19:18:13 +02:00
|
|
|
{
|
2012-11-03 20:16:03 +01:00
|
|
|
app_gameconfig_load(id.c_str(), gameconfig, gameconfigSize);
|
|
|
|
free(gameconfig);
|
2012-10-14 19:18:13 +02:00
|
|
|
}
|
2013-11-19 16:27:52 +01:00
|
|
|
|
2016-04-02 17:46:06 +02:00
|
|
|
ExternalBooter_WiiGameSetup(wbfs_partition, dvd, patchregion, private_server, id.c_str());
|
2013-12-24 16:35:59 +01:00
|
|
|
WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, returnTo, TYPE_WII_GAME, use_led);
|
|
|
|
|
2013-11-19 16:27:52 +01:00
|
|
|
Sys_Exit();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2016-11-07 16:06:00 +01:00
|
|
|
void CMenu::_exitWiiflow()
|
|
|
|
{
|
|
|
|
//Exit WiiFlow, no game booted...
|
|
|
|
cleanup();// cleanup and clear memory
|
|
|
|
ShutdownBeforeExit();// unmount devices and close inputs
|
|
|
|
Sys_Exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-03 20:16:03 +01:00
|
|
|
void CMenu::_initGameMenu()
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-11-07 16:06:00 +01:00
|
|
|
//CColor fontColor(0xD0BFDFFF);
|
2013-11-04 20:46:23 +01:00
|
|
|
TexData texGameFavOn;
|
|
|
|
TexData texGameFavOnSel;
|
|
|
|
TexData texGameFavOff;
|
|
|
|
TexData texGameFavOffSel;
|
2012-12-28 15:19:40 +01:00
|
|
|
TexData texAdultOn;
|
|
|
|
TexData texAdultOnSel;
|
|
|
|
TexData texAdultOff;
|
|
|
|
TexData texAdultOffSel;
|
|
|
|
TexData texDelete;
|
|
|
|
TexData texDeleteSel;
|
|
|
|
TexData texSettings;
|
|
|
|
TexData texSettingsSel;
|
2013-11-19 16:27:52 +01:00
|
|
|
TexData texToggleBanner;
|
2012-12-28 15:19:40 +01:00
|
|
|
TexData bgLQ;
|
|
|
|
|
2013-11-19 16:27:52 +01:00
|
|
|
TexHandle.fromImageFile(texGameFavOn, fmt("%s/gamefavon.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texGameFavOnSel, fmt("%s/gamefavons.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texGameFavOff, fmt("%s/gamefavoff.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texGameFavOffSel, fmt("%s/gamefavoffs.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texAdultOn, fmt("%s/stopkidon.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texAdultOnSel, fmt("%s/stopkidons.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texAdultOff, fmt("%s/stopkidoff.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texAdultOffSel, fmt("%s/stopkidoffs.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texDelete, fmt("%s/delete.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texDeleteSel, fmt("%s/deletes.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texSettings, fmt("%s/btngamecfg.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texSettingsSel, fmt("%s/btngamecfgs.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texToggleBanner, fmt("%s/blank.png", m_imgsDir.c_str()));
|
2012-07-04 21:45:53 +02:00
|
|
|
|
2012-11-03 20:16:03 +01:00
|
|
|
_addUserLabels(m_gameLblUser, ARRAY_SIZE(m_gameLblUser), "GAME");
|
|
|
|
m_gameBg = _texture("GAME/BG", "texture", theme.bg, false);
|
2012-12-28 15:19:40 +01:00
|
|
|
if(m_theme.loaded() && TexHandle.fromImageFile(bgLQ, fmt("%s/%s", m_themeDataDir.c_str(), m_theme.getString("GAME/BG", "texture").c_str()), GX_TF_CMPR, 64, 64) == TE_OK)
|
2012-01-21 21:57:41 +01:00
|
|
|
m_gameBgLQ = bgLQ;
|
|
|
|
|
2013-11-04 20:46:23 +01:00
|
|
|
m_gameBtnPlay = _addButton("GAME/PLAY_BTN", theme.btnFont, L"", 420, 344, 200, 48, theme.btnFontColor);
|
|
|
|
m_gameBtnBack = _addButton("GAME/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
|
|
|
|
m_gameBtnFavoriteOn = _addPicButton("GAME/FAVORITE_ON", texGameFavOn, texGameFavOnSel, 460, 200, 48, 48);
|
|
|
|
m_gameBtnFavoriteOff = _addPicButton("GAME/FAVORITE_OFF", texGameFavOff, texGameFavOffSel, 460, 200, 48, 48);
|
2012-11-03 20:16:03 +01:00
|
|
|
m_gameBtnAdultOn = _addPicButton("GAME/ADULTONLY_ON", texAdultOn, texAdultOnSel, 532, 200, 48, 48);
|
|
|
|
m_gameBtnAdultOff = _addPicButton("GAME/ADULTONLY_OFF", texAdultOff, texAdultOffSel, 532, 200, 48, 48);
|
|
|
|
m_gameBtnSettings = _addPicButton("GAME/SETTINGS_BTN", texSettings, texSettingsSel, 460, 272, 48, 48);
|
|
|
|
m_gameBtnDelete = _addPicButton("GAME/DELETE_BTN", texDelete, texDeleteSel, 532, 272, 48, 48);
|
|
|
|
m_gameBtnBackFull = _addButton("GAME/BACK_FULL_BTN", theme.btnFont, L"", 100, 390, 200, 56, theme.btnFontColor);
|
|
|
|
m_gameBtnPlayFull = _addButton("GAME/PLAY_FULL_BTN", theme.btnFont, L"", 340, 390, 200, 56, theme.btnFontColor);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_gameBtnToggle = _addPicButton("GAME/TOOGLE_BTN", texToggleBanner, texToggleBanner, 385, 31, 236, 127);
|
|
|
|
m_gameBtnToggleFull = _addPicButton("GAME/TOOGLE_FULL_BTN", texToggleBanner, texToggleBanner, 20, 12, 608, 344);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
m_gameButtonsZone.x = m_theme.getInt("GAME/ZONES", "buttons_x", 0);
|
|
|
|
m_gameButtonsZone.y = m_theme.getInt("GAME/ZONES", "buttons_y", 0);
|
|
|
|
m_gameButtonsZone.w = m_theme.getInt("GAME/ZONES", "buttons_w", 640);
|
|
|
|
m_gameButtonsZone.h = m_theme.getInt("GAME/ZONES", "buttons_h", 480);
|
|
|
|
m_gameButtonsZone.hide = m_theme.getBool("GAME/ZONES", "buttons_hide", true);
|
|
|
|
|
2013-11-04 20:46:23 +01:00
|
|
|
_setHideAnim(m_gameBtnPlay, "GAME/PLAY_BTN", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnBack, "GAME/BACK_BTN", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnFavoriteOn, "GAME/FAVORITE_ON", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnFavoriteOff, "GAME/FAVORITE_OFF", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnAdultOn, "GAME/ADULTONLY_ON", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnAdultOff, "GAME/ADULTONLY_OFF", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnSettings, "GAME/SETTINGS_BTN", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_gameBtnDelete, "GAME/DELETE_BTN", 0, 0, 1.f, -1.f);
|
2012-07-29 00:38:46 +02:00
|
|
|
_setHideAnim(m_gameBtnPlayFull, "GAME/PLAY_FULL_BTN", 0, 0, 1.f, 0.f);
|
|
|
|
_setHideAnim(m_gameBtnBackFull, "GAME/BACK_FULL_BTN", 0, 0, 1.f, 0.f);
|
2016-04-02 19:19:19 +02:00
|
|
|
_setHideAnim(m_gameBtnToggle, "GAME/TOOGLE_BTN", 200, 0, 1.f, 0.f);
|
|
|
|
_setHideAnim(m_gameBtnToggleFull, "GAME/TOOGLE_FULL_BTN", 200, 0, 1.f, 0.f);
|
2012-01-21 21:57:41 +01:00
|
|
|
_hideGame(true);
|
|
|
|
_textGame();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_textGame(void)
|
|
|
|
{
|
|
|
|
m_btnMgr.setText(m_gameBtnPlay, _t("gm1", L"Play"));
|
|
|
|
m_btnMgr.setText(m_gameBtnBack, _t("gm2", L"Back"));
|
2012-07-04 00:08:51 +02:00
|
|
|
m_btnMgr.setText(m_gameBtnPlayFull, _t("gm1", L"Play"));
|
|
|
|
m_btnMgr.setText(m_gameBtnBackFull, _t("gm2", L"Back"));
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
struct IMD5Header
|
|
|
|
{
|
|
|
|
u32 fcc;
|
|
|
|
u32 filesize;
|
|
|
|
u8 zeroes[8];
|
|
|
|
u8 crypto[16];
|
2013-01-01 18:42:46 +01:00
|
|
|
} ATTRIBUTE_PACKED;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
void CMenu::_gameSoundThread(CMenu *m)
|
|
|
|
{
|
2012-11-04 15:13:42 +01:00
|
|
|
m->m_soundThrdBusy = true;
|
2012-08-13 07:09:40 +02:00
|
|
|
m->m_gamesound_changed = false;
|
2012-11-04 15:13:42 +01:00
|
|
|
CurrentBanner.ClearBanner();
|
|
|
|
|
2013-01-21 00:30:28 +01:00
|
|
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
2012-11-04 15:13:42 +01:00
|
|
|
if(GameHdr->type == TYPE_PLUGIN)
|
2012-02-17 15:45:59 +01:00
|
|
|
{
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.DeleteBanner();
|
2012-11-04 15:13:42 +01:00
|
|
|
m->m_gameSound.Load(m_plugin.GetBannerSound(GameHdr->settings[0]), m_plugin.GetBannerSoundSize());
|
|
|
|
if(m->m_gameSound.IsLoaded())
|
|
|
|
m->m_gamesound_changed = true;
|
|
|
|
m->m_soundThrdBusy = false;
|
2012-02-17 15:45:59 +01:00
|
|
|
return;
|
|
|
|
}
|
2012-07-04 15:45:39 +02:00
|
|
|
u8 *custom_bnr_file = NULL;
|
|
|
|
u32 custom_bnr_size = 0;
|
2012-07-05 18:18:23 +02:00
|
|
|
|
|
|
|
u8 *cached_bnr_file = NULL;
|
|
|
|
u32 cached_bnr_size = 0;
|
|
|
|
|
|
|
|
char cached_banner[256];
|
2012-10-15 21:16:14 +02:00
|
|
|
cached_banner[255] = '\0';
|
2013-10-28 19:36:52 +01:00
|
|
|
char custom_banner[256];
|
|
|
|
custom_banner[255] = '\0';
|
|
|
|
/* check custom ID6 first */
|
|
|
|
strncpy(custom_banner, fmt("%s/%s.bnr", m->m_customBnrDir.c_str(), GameHdr->id), 255);
|
|
|
|
fsop_GetFileSizeBytes(custom_banner, &custom_bnr_size);
|
2014-03-01 00:11:02 +01:00
|
|
|
if(custom_bnr_size > 0)
|
2013-10-19 20:59:17 +02:00
|
|
|
{
|
2014-03-01 00:11:02 +01:00
|
|
|
custom_bnr_file = (u8*)MEM2_lo_alloc(custom_bnr_size);
|
|
|
|
if(custom_bnr_file != NULL)
|
|
|
|
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
2013-10-19 20:59:17 +02:00
|
|
|
}
|
2013-10-28 19:36:52 +01:00
|
|
|
else /* no custom ID6 or too big, try ID3 */
|
2012-07-05 18:18:23 +02:00
|
|
|
{
|
2013-10-28 19:36:52 +01:00
|
|
|
strncpy(custom_banner, fmt("%s/%.3s.bnr", m->m_customBnrDir.c_str(), GameHdr->id), 255);
|
2013-10-19 20:59:17 +02:00
|
|
|
fsop_GetFileSizeBytes(custom_banner, &custom_bnr_size);
|
2014-03-01 00:11:02 +01:00
|
|
|
if(custom_bnr_size > 0)
|
2013-10-19 20:59:17 +02:00
|
|
|
{
|
2014-03-01 00:11:02 +01:00
|
|
|
custom_bnr_file = (u8*)MEM2_lo_alloc(custom_bnr_size);
|
|
|
|
if(custom_bnr_file != NULL)
|
|
|
|
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
2013-10-19 20:59:17 +02:00
|
|
|
}
|
2013-10-28 19:36:52 +01:00
|
|
|
}
|
|
|
|
if(custom_bnr_file == NULL && GameHdr->type == TYPE_GC_GAME)
|
|
|
|
{
|
2016-04-03 02:31:02 +02:00
|
|
|
GC_Disc_Reader.init(GameHdr->path);
|
|
|
|
u8 *opening_bnr = GC_Disc_Reader.GetGameCubeBanner();
|
|
|
|
if(opening_bnr != NULL)
|
|
|
|
m_banner.CreateGCBanner(opening_bnr, m->m_wbf1_font, m->m_wbf2_font, GameHdr->title);
|
|
|
|
GC_Disc_Reader.clear();
|
|
|
|
|
2013-10-28 19:36:52 +01:00
|
|
|
m->m_gameSound.Load(gc_ogg, gc_ogg_size, false);
|
|
|
|
if(m->m_gameSound.IsLoaded())
|
|
|
|
m->m_gamesound_changed = true;
|
|
|
|
m->m_soundThrdBusy = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(custom_bnr_file == NULL)/* no custom and not GC game try cached banner*/
|
|
|
|
{
|
|
|
|
strncpy(cached_banner, fmt("%s/%s.bnr", m->m_bnrCacheDir.c_str(), GameHdr->id), 255);
|
|
|
|
fsop_GetFileSizeBytes(cached_banner, &cached_bnr_size);
|
2014-03-01 00:11:02 +01:00
|
|
|
if(cached_bnr_size > 0)
|
2012-10-15 21:16:14 +02:00
|
|
|
{
|
2014-03-01 00:11:02 +01:00
|
|
|
cached_bnr_file = (u8*)MEM2_lo_alloc(cached_bnr_size);
|
|
|
|
if(cached_bnr_file != NULL)
|
|
|
|
fsop_ReadFileLoc(cached_banner, cached_bnr_size, (void*)cached_bnr_file);
|
2012-10-15 21:16:14 +02:00
|
|
|
}
|
2012-07-05 18:18:23 +02:00
|
|
|
}
|
2012-10-15 21:16:14 +02:00
|
|
|
|
2013-10-28 19:36:52 +01:00
|
|
|
if(custom_bnr_file != NULL)
|
2014-03-01 00:11:02 +01:00
|
|
|
CurrentBanner.SetBanner(custom_bnr_file, custom_bnr_size, true, true);
|
2013-10-28 19:36:52 +01:00
|
|
|
else if(cached_bnr_file != NULL)
|
2014-03-01 00:11:02 +01:00
|
|
|
CurrentBanner.SetBanner(cached_bnr_file, cached_bnr_size, false, true);
|
2012-11-04 15:13:42 +01:00
|
|
|
else if(GameHdr->type == TYPE_WII_GAME)
|
|
|
|
_extractBnr(GameHdr);
|
2016-06-20 23:03:40 +02:00
|
|
|
else if(GameHdr->type == TYPE_CHANNEL || GameHdr->type == TYPE_EMUCHANNEL)
|
2012-11-04 15:13:42 +01:00
|
|
|
_extractChannelBnr(TITLE_ID(GameHdr->settings[0],
|
|
|
|
GameHdr->settings[1]));
|
2012-10-15 21:16:14 +02:00
|
|
|
if(!CurrentBanner.IsValid())
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-08-16 00:33:54 +02:00
|
|
|
m->m_gameSound.FreeMemory();
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.DeleteBanner();
|
2012-10-15 21:16:14 +02:00
|
|
|
CurrentBanner.ClearBanner();
|
2012-11-04 15:13:42 +01:00
|
|
|
m->m_soundThrdBusy = false;
|
2012-01-21 21:57:41 +01:00
|
|
|
return;
|
|
|
|
}
|
2013-06-29 18:54:21 +02:00
|
|
|
if(cached_bnr_file == NULL && custom_bnr_file == NULL)
|
|
|
|
fsop_WriteFile(cached_banner, CurrentBanner.GetBannerFile(), CurrentBanner.GetBannerFileSize());
|
|
|
|
|
2013-09-24 23:24:03 +02:00
|
|
|
u32 sndSize = 0;
|
2012-10-15 21:16:14 +02:00
|
|
|
m_banner.LoadBanner(m->m_wbf1_font, m->m_wbf2_font);
|
2013-09-24 23:24:03 +02:00
|
|
|
u8 *soundBin = CurrentBanner.GetFile("sound.bin", &sndSize);
|
2012-10-15 21:16:14 +02:00
|
|
|
CurrentBanner.ClearBanner();
|
|
|
|
|
2012-08-13 07:09:40 +02:00
|
|
|
if(soundBin != NULL)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-10-10 19:09:23 +02:00
|
|
|
if(memcmp(&((IMD5Header *)soundBin)->fcc, "IMD5", 4) == 0)
|
2012-07-27 19:26:49 +02:00
|
|
|
{
|
2012-08-13 07:09:40 +02:00
|
|
|
u32 newSize = 0;
|
|
|
|
u8 *newSound = DecompressCopy(soundBin, sndSize, &newSize);
|
2012-08-16 00:33:54 +02:00
|
|
|
if(newSound == NULL || newSize == 0 || !m->m_gameSound.Load(newSound, newSize))
|
2012-08-13 07:09:40 +02:00
|
|
|
{
|
2013-09-24 23:24:03 +02:00
|
|
|
free(soundBin);
|
2012-08-16 00:33:54 +02:00
|
|
|
m->m_gameSound.FreeMemory();
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.DeleteBanner();
|
2012-11-04 15:13:42 +01:00
|
|
|
m->m_soundThrdBusy = false;
|
2012-08-13 07:09:40 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2012-08-16 00:33:54 +02:00
|
|
|
m->m_gameSound.Load(soundBin, sndSize);
|
2012-08-13 07:09:40 +02:00
|
|
|
|
2012-08-16 00:33:54 +02:00
|
|
|
if(m->m_gameSound.IsLoaded())
|
2012-08-13 07:09:40 +02:00
|
|
|
m->m_gamesound_changed = true;
|
|
|
|
else
|
|
|
|
{
|
2012-08-16 00:33:54 +02:00
|
|
|
m->m_gameSound.FreeMemory();
|
2012-10-13 18:57:03 +02:00
|
|
|
m_banner.DeleteBanner();
|
2012-07-27 19:26:49 +02:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-07-27 19:26:49 +02:00
|
|
|
else
|
2012-08-13 07:09:40 +02:00
|
|
|
{
|
|
|
|
gprintf("WARNING: No sound found in banner!\n");
|
2012-07-27 19:26:49 +02:00
|
|
|
m->m_gamesound_changed = true;
|
2012-08-16 00:33:54 +02:00
|
|
|
m->m_gameSound.FreeMemory();
|
2012-08-13 07:09:40 +02:00
|
|
|
}
|
2012-11-04 15:13:42 +01:00
|
|
|
m->m_soundThrdBusy = false;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-11-17 18:30:24 +01:00
|
|
|
u8 *GameSoundStack = NULL;
|
|
|
|
u32 GameSoundSize = 0x10000; //64kb
|
2012-01-21 21:57:41 +01:00
|
|
|
void CMenu::_playGameSound(void)
|
|
|
|
{
|
2014-03-18 03:39:42 +01:00
|
|
|
if(NoGameID(CoverFlow.getHdr()->type))
|
|
|
|
{
|
|
|
|
if(_startVideo())
|
|
|
|
return;
|
|
|
|
if(m_zoom_banner == true)
|
|
|
|
{
|
2016-04-02 19:19:19 +02:00
|
|
|
m_zoom_banner = m_banner.ToggleZoom();
|
2016-12-05 15:12:23 +01:00
|
|
|
//m_cfg.setBool(_domainFromView(), "show_full_banner", m_zoom_banner);
|
2014-03-18 03:39:42 +01:00
|
|
|
currentMoviePos = normalMoviePos;
|
|
|
|
}
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
m_gamesound_changed = false;
|
2012-04-27 21:05:38 +02:00
|
|
|
if(m_bnrSndVol == 0)
|
|
|
|
return;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-07-06 18:48:01 +02:00
|
|
|
if(m_gameSoundThread != LWP_THREAD_NULL)
|
|
|
|
CheckGameSoundThread();
|
2014-03-17 18:38:32 +01:00
|
|
|
GameSoundStack = (u8*)MEM2_lo_alloc(GameSoundSize);
|
2012-11-17 18:30:24 +01:00
|
|
|
LWP_CreateThread(&m_gameSoundThread, (void *(*)(void *))CMenu::_gameSoundThread, (void*)this, GameSoundStack, GameSoundSize, 60);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-02-17 22:40:38 +01:00
|
|
|
void CMenu::CheckGameSoundThread()
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-07-27 19:26:49 +02:00
|
|
|
if(m_gameSoundThread == LWP_THREAD_NULL)
|
|
|
|
return;
|
|
|
|
|
2012-02-19 00:04:15 +01:00
|
|
|
if(LWP_ThreadIsSuspended(m_gameSoundThread))
|
|
|
|
LWP_ResumeThread(m_gameSoundThread);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-11-04 15:13:42 +01:00
|
|
|
while(m_soundThrdBusy)
|
2014-03-17 18:38:32 +01:00
|
|
|
usleep(500);
|
2012-07-27 19:26:49 +02:00
|
|
|
|
2012-02-19 00:04:15 +01:00
|
|
|
LWP_JoinThread(m_gameSoundThread, NULL);
|
2012-05-19 14:29:24 +02:00
|
|
|
m_gameSoundThread = LWP_THREAD_NULL;
|
2012-11-17 18:30:24 +01:00
|
|
|
|
|
|
|
if(GameSoundStack)
|
2014-03-17 18:38:32 +01:00
|
|
|
MEM2_lo_free(GameSoundStack);
|
2012-11-17 18:30:24 +01:00
|
|
|
GameSoundStack = NULL;
|
2012-05-19 14:29:24 +02:00
|
|
|
}
|