mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
neek2o changes:
- re made it possible to use SD emunands with sNeek2o r96. - added vwii r96 beta 9.6 support. wiiflow lite will now look for vwiikernal.bin and emunands must be in a subfolder of vwiinands on USB only. - when exiting a emunand game using neek2o if on wii it will use the back2nand channel to return you to wii system menu or if on wiiu it will return you to wiiu system channel because returning to the vwii system menu isn't possible. - when using wiiflow lite and exit to neek2o it will just launch neek2o system menu. from there you can launch wiiflow or wiiflow lite (if installed on emunand) to use cheats on a emunand game. otherwise cheats do not work when using neek2o to launch a game. banner changes: - now when moving from banner to banner the background music will not play and you will not see coverflow (for a second) when using full screen banners. - now on game selected categories menu the banner will change when you change games using '+' or '-' buttons - added custom banners for plugin games. no longer using trialer thp videos as banners for plugin games. put your custom banners in the custom banner folder plus the plugin cover folder and name them the same as the rom with extension plus .bnr just like how you do for the covers. to make a plugin game banner i suggest downloading one of abdallahterro's custom gamecube dios mios booter channels and use customizemii to change the images (and sound if you want). make sure the images match exactly the size of the one's already there. when changes are done extract the banner and rename it and put it in the proper folder as previously mentioned. other changes: - trailer videos still work even for plugin games. again for plugins rename the thp and ogg file to match the rom plus extension and .thp or .ogg. on game selected screen press '-' to start or quit a trailer video if one is available. pressing 'B' or 'Home' will quit the video and return you to the main screen. - when flipping a cover none of the buttons are available and the mini banner is not shown until you press 'B' to de flip the cover to normal front view. - fixed game info menu - in case a custom channel is selected and is not included in gametdb it will display a message 'no game info' instead of random stuff from the last game viewed. tested on wiiflow lite forwarder channel. - now stopping sounds and music early when exiting wiiflow to prevent music from stuttering when exiting. - other minor coding changes.
This commit is contained in:
parent
28b8f218b2
commit
3bdc947c7b
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
@ -43,7 +43,7 @@ void BannerWindow::Init(u8 *font1, u8 *font2)
|
|||||||
AnimPosX = 0.5f * (ScreenProps.x - fIconWidth);
|
AnimPosX = 0.5f * (ScreenProps.x - fIconWidth);
|
||||||
AnimPosY = 0.5f * (ScreenProps.y - fIconHeight);
|
AnimPosY = 0.5f * (ScreenProps.y - fIconHeight);
|
||||||
AnimationRunning = false;
|
AnimationRunning = false;
|
||||||
Brightness = 0;
|
//Brightness = 0;
|
||||||
|
|
||||||
// this just looks better for banner/icon ratio
|
// this just looks better for banner/icon ratio
|
||||||
xDiff = 0.5f * (m_vid.wide() ? (m_vid.vid_50hz() ? 616 : 620.0f) : 608.0f);
|
xDiff = 0.5f * (m_vid.wide() ? (m_vid.vid_50hz() ? 616 : 620.0f) : 608.0f);
|
||||||
@ -222,7 +222,7 @@ void BannerWindow::Draw(void)
|
|||||||
|
|
||||||
void BannerWindow::ToggleGameSettings()
|
void BannerWindow::ToggleGameSettings()
|
||||||
{
|
{
|
||||||
ToggleZoom();
|
//ToggleZoom();
|
||||||
Brightness = (Brightness == 200 ? 0 : 200);
|
Brightness = (Brightness == 200 ? 0 : 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
#include <gctypes.h>
|
#include <gctypes.h>
|
||||||
#include <gccore.h>
|
#include <gccore.h>
|
||||||
|
|
||||||
s32 BootChannel(u64 chantitle, u32 ios, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, int aspectRatio);
|
//s32 BootChannel(u64 chantitle, u32 ios, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, int aspectRatio);
|
||||||
|
|
||||||
u32 LoadChannel(u8 *buffer);
|
//u32 LoadChannel(u8 *buffer);
|
||||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio);
|
//void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio);
|
||||||
|
|
||||||
u8 *GetDol(u64 title, u32 bootcontent);
|
//u8 *GetDol(u64 title, u32 bootcontent);
|
||||||
|
|
||||||
bool Identify(u64 titleid);
|
bool Identify(u64 titleid);
|
||||||
bool Identify_GenerateTik(signed_blob **outbuf, u32 *outlen);
|
bool Identify_GenerateTik(signed_blob **outbuf, u32 *outlen);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#define APP_DATA_DIR "wiiflow"
|
#define APP_DATA_DIR "wiiflow"
|
||||||
#define APPS_DIR "apps/wiiflow_lite"
|
#define APPS_DIR "apps/wiiflow_lite"
|
||||||
|
|
||||||
#define EMU_NANDS_DIR "nands"
|
//#define EMU_NANDS_DIR "nands"
|
||||||
#define GAMES_DIR "%s:/wbfs"
|
#define GAMES_DIR "%s:/wbfs"
|
||||||
#define HOMEBREW_DIR "%s:/apps"
|
#define HOMEBREW_DIR "%s:/apps"
|
||||||
#define DF_GC_GAMES_DIR "%s:/games"
|
#define DF_GC_GAMES_DIR "%s:/games"
|
||||||
|
@ -2086,9 +2086,12 @@ bool CCoverFlow::findId(const char *id, bool instant, bool path)
|
|||||||
{
|
{
|
||||||
if(path)
|
if(path)
|
||||||
{
|
{
|
||||||
|
//homebrew folder or rom title.ext
|
||||||
const char *name = strrchr(m_items[i].hdr->path, '/');
|
const char *name = strrchr(m_items[i].hdr->path, '/');
|
||||||
if(name != NULL && strcmp(name + 1, id) == 0)
|
if(name != NULL && strcmp(name + 1, id) == 0)
|
||||||
break;
|
break;
|
||||||
|
else if(strcmp(m_items[i].hdr->path, id) == 0)// scummvm
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if(strcmp(m_items[i].hdr->id, id) == 0)
|
else if(strcmp(m_items[i].hdr->id, id) == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -114,7 +114,7 @@ GXRModeObj TVPal574IntDfScale =
|
|||||||
|
|
||||||
struct movieP normalMoviePos = { 410, 31, 610, 181 };
|
struct movieP normalMoviePos = { 410, 31, 610, 181 };
|
||||||
struct movieP zoomedMoviePos = { 0, 0, 640, 480 };
|
struct movieP zoomedMoviePos = { 0, 0, 640, 480 };
|
||||||
struct movieP currentMoviePos = normalMoviePos;
|
struct movieP currentMoviePos = zoomedMoviePos;
|
||||||
|
|
||||||
const int CVideo::_stencilWidth = 128;
|
const int CVideo::_stencilWidth = 128;
|
||||||
const int CVideo::_stencilHeight = 128;
|
const int CVideo::_stencilHeight = 128;
|
||||||
|
@ -75,8 +75,8 @@ struct dir_discHdr
|
|||||||
{
|
{
|
||||||
char id[7]; //6+1 for null character
|
char id[7]; //6+1 for null character
|
||||||
|
|
||||||
char path[256];
|
char path[256]; // full path including partion - path - rom.ext or game.iso or id6.wbfs
|
||||||
wchar_t title[64];
|
wchar_t title[64]; // wide character title used for displaying title in coverflow
|
||||||
u32 settings[2]; //chantitle, plugin magic, crc32, gamecube game on sd, etc
|
u32 settings[2]; //chantitle, plugin magic, crc32, gamecube game on sd, etc
|
||||||
|
|
||||||
u8 type;
|
u8 type;
|
||||||
|
@ -79,9 +79,14 @@ bool Load_Neek2o_Kernel()
|
|||||||
if(neek2o())
|
if(neek2o())
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
Kernel = fsop_ReadFile("usb1:/sneek/kernel.bin", &kernelSize);
|
if(IsOnWiiU())
|
||||||
if(Kernel == NULL)
|
Kernel = fsop_ReadFile("usb1:/sneek/vwiikernel.bin", &kernelSize);
|
||||||
Kernel = fsop_ReadFile("sd:/sneek/kernel.bin", &kernelSize);
|
else
|
||||||
|
{
|
||||||
|
Kernel = fsop_ReadFile("usb1:/sneek/kernel.bin", &kernelSize);
|
||||||
|
if(Kernel == NULL)
|
||||||
|
Kernel = fsop_ReadFile("sd:/sneek/kernel.bin", &kernelSize);
|
||||||
|
}
|
||||||
if(Kernel == NULL)
|
if(Kernel == NULL)
|
||||||
ret = false;
|
ret = false;
|
||||||
|
|
||||||
@ -126,13 +131,14 @@ s32 Launch_nk(u64 TitleID, const char *nandpath, u64 ReturnTo)
|
|||||||
if(!mini)
|
if(!mini)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
// uses bootmii mini to run wiiflow internal armboot.bin for neek2o
|
||||||
memcpy(mini, armboot, armboot_size);
|
memcpy(mini, armboot, armboot_size);
|
||||||
DCFlushRange(mini, armboot_size);
|
DCFlushRange(mini, armboot_size);
|
||||||
*(u32*)0xc150f000 = 0x424d454d;
|
*(u32*)0xc150f000 = 0x424d454d;//BMEM
|
||||||
asm volatile("eieio");
|
asm volatile("eieio");
|
||||||
*(u32*)0xc150f004 = MEM_VIRTUAL_TO_PHYSICAL(mini);
|
*(u32*)0xc150f004 = MEM_VIRTUAL_TO_PHYSICAL(mini);
|
||||||
asm volatile("eieio");
|
asm volatile("eieio");
|
||||||
IOS_ReloadIOS(0xfe);
|
IOS_ReloadIOS(0xfe);// IOS254 bootmii
|
||||||
MEM1_free(mini);
|
MEM1_free(mini);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -110,11 +110,11 @@ void Sys_Exit(void)
|
|||||||
/* We wanna to boot sth */
|
/* We wanna to boot sth */
|
||||||
WII_Initialize();
|
WII_Initialize();
|
||||||
if(ExitOption == EXIT_TO_WFNK2O)
|
if(ExitOption == EXIT_TO_WFNK2O)
|
||||||
Launch_nk(0x1000144574641LL, NeekPath, 0);
|
Launch_nk(0x1000157464C41LL, NeekPath, 0);// 57464C41 = WFLA : 44574641 = DWFA
|
||||||
else if(ExitOption == EXIT_TO_SMNK2O)
|
else if(ExitOption == EXIT_TO_SMNK2O)
|
||||||
Launch_nk(0, NeekPath, 0);
|
Launch_nk(0, NeekPath, 0);
|
||||||
else if(ExitOption == EXIT_TO_BOOTMII)
|
else if(ExitOption == EXIT_TO_BOOTMII)
|
||||||
IOS_ReloadIOS(0xfe);
|
IOS_ReloadIOS(0xfe);// IOS254 Bootmii IOS
|
||||||
else if(ExitOption == EXIT_TO_HBC)
|
else if(ExitOption == EXIT_TO_HBC)
|
||||||
{
|
{
|
||||||
WII_LaunchTitle(HBC_OHBC);
|
WII_LaunchTitle(HBC_OHBC);
|
||||||
|
@ -304,6 +304,8 @@ void CMenu::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Emu nands init even if not being used */
|
/* Emu nands init even if not being used */
|
||||||
|
memset(emu_nands_dir, 0, 64);
|
||||||
|
strncpy(emu_nands_dir, IsOnWiiU() ? "vwiinands" : "nands", 64);
|
||||||
_checkEmuNandSettings(false);// emu nand
|
_checkEmuNandSettings(false);// emu nand
|
||||||
_checkEmuNandSettings(true);// saves nand
|
_checkEmuNandSettings(true);// saves nand
|
||||||
|
|
||||||
@ -478,15 +480,17 @@ void CMenu::cleanup()
|
|||||||
return;
|
return;
|
||||||
//gprintf("MEM1_freesize(): %i\nMEM2_freesize(): %i\n", MEM1_freesize(), MEM2_freesize());
|
//gprintf("MEM1_freesize(): %i\nMEM2_freesize(): %i\n", MEM1_freesize(), MEM2_freesize());
|
||||||
m_btnMgr.hide(m_mainLblCurMusic);
|
m_btnMgr.hide(m_mainLblCurMusic);
|
||||||
|
_stopSounds();
|
||||||
|
MusicPlayer.Cleanup();
|
||||||
_cleanupDefaultFont();
|
_cleanupDefaultFont();
|
||||||
CoverFlow.shutdown(); /* possibly plugin flow crash so cleanup early */
|
CoverFlow.shutdown(); /* possibly plugin flow crash so cleanup early */
|
||||||
m_banner.DeleteBanner();
|
m_banner.DeleteBanner();
|
||||||
m_plugin.Cleanup();
|
m_plugin.Cleanup();
|
||||||
m_source.unload();
|
m_source.unload();
|
||||||
|
|
||||||
_stopSounds();
|
//_stopSounds();
|
||||||
_Theme_Cleanup();
|
_Theme_Cleanup();
|
||||||
MusicPlayer.Cleanup();
|
//MusicPlayer.Cleanup();
|
||||||
m_gameSound.FreeMemory();
|
m_gameSound.FreeMemory();
|
||||||
SoundHandle.Cleanup();
|
SoundHandle.Cleanup();
|
||||||
soundDeinit();
|
soundDeinit();
|
||||||
@ -1718,24 +1722,28 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
|
|||||||
if(Sys_Exiting())
|
if(Sys_Exiting())
|
||||||
exitHandler(BUTTON_CALLBACK);
|
exitHandler(BUTTON_CALLBACK);
|
||||||
// check if we need to start playing the game/banner sound
|
// check if we need to start playing the game/banner sound
|
||||||
if(withCF && m_gameSelected && m_gamesound_changed && !m_soundThrdBusy &&
|
// m_gameSelected means we are on the game selected menu
|
||||||
!m_gameSound.IsPlaying() && MusicPlayer.GetVolume() == 0)
|
// m_gamesound_changed means a new game sound is loaded and ready to play
|
||||||
|
// the previous game sound needs to stop before playing new sound
|
||||||
|
// and the bg music volume needs to be 0 before playing game sound
|
||||||
|
if(withCF && m_gameSelected && m_gamesound_changed && !m_gameSound.IsPlaying() && MusicPlayer.GetVolume() == 0)
|
||||||
{
|
{
|
||||||
_stopGameSoundThread();// stop game sound loading thread
|
_stopGameSoundThread();// stop game sound loading thread
|
||||||
m_gameSound.Play(m_bnrSndVol);// play game sound
|
m_gameSound.Play(m_bnrSndVol);// play game sound
|
||||||
m_gamesound_changed = false;
|
m_gamesound_changed = false;
|
||||||
}
|
}
|
||||||
// stop game/banner sound from playing if we exited game selected menu or if we move to new game
|
// stop game/banner sound from playing if we exited game selected menu or if we move to new game
|
||||||
else if(!m_gameSelected)
|
else if((withCF && m_gameSelected && m_gamesound_changed && m_gameSound.IsPlaying()) || (!m_gameSelected && m_gameSound.IsPlaying()))
|
||||||
m_gameSound.Stop();
|
m_gameSound.Stop();
|
||||||
/* decrease music volume to zero if any of these are true:
|
/* decrease music volume to zero if any of these are true:
|
||||||
plugin video playing or
|
trailer video playing or
|
||||||
|
game/banner sound is being loaded because we are switching to a new game or
|
||||||
game/banner sound is loaded and ready to play or
|
game/banner sound is loaded and ready to play or
|
||||||
gamesound hasn't finished - when finishes music volume back to normal
|
gamesound hasn't finished - when finishes music volume back to normal - some gamesounds don't loop continuously
|
||||||
also this switches to next song if current song is done */
|
also this switches to next song if current song is done */
|
||||||
MusicPlayer.Tick(m_video_playing ||
|
MusicPlayer.Tick((withCF && (m_video_playing || (m_gameSelected && m_soundThrdBusy) ||
|
||||||
(m_gameSelected && m_gamesound_changed && m_gameSound.IsLoaded()) ||
|
(m_gameSelected && m_gamesound_changed))) ||
|
||||||
(m_gameSound.IsPlaying() && !m_gamesound_changed));//this checks if gamesound has finished and thus allows music to play
|
m_gameSound.IsPlaying());
|
||||||
// set song title and display it if music info is allowed
|
// set song title and display it if music info is allowed
|
||||||
if(MusicPlayer.SongChanged() && m_music_info)
|
if(MusicPlayer.SongChanged() && m_music_info)
|
||||||
{
|
{
|
||||||
@ -2160,7 +2168,10 @@ void CMenu::_initCF(void)
|
|||||||
|
|
||||||
if(!CoverFlow.empty())
|
if(!CoverFlow.empty())
|
||||||
{
|
{
|
||||||
bool path = m_sourceflow || m_current_view == COVERFLOW_PLUGIN || m_current_view == COVERFLOW_HOMEBREW;
|
bool path = false;
|
||||||
|
if((m_source_cnt > 1 && m_cfg.getInt(_domainFromView(), "current_item_type", 1) == TYPE_PLUGIN) ||
|
||||||
|
m_sourceflow || m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_PLUGIN)
|
||||||
|
path = true;
|
||||||
if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path))
|
if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path))
|
||||||
CoverFlow.defaultLoad();
|
CoverFlow.defaultLoad();
|
||||||
CoverFlow.startCoverLoader();
|
CoverFlow.startCoverLoader();
|
||||||
|
@ -55,6 +55,7 @@ private:
|
|||||||
u8 m_catStartPage;
|
u8 m_catStartPage;
|
||||||
u8 m_max_categories;
|
u8 m_max_categories;
|
||||||
bool m_clearCats;
|
bool m_clearCats;
|
||||||
|
bool m_newGame;
|
||||||
bool show_mem;
|
bool show_mem;
|
||||||
vector<dir_discHdr> m_gameList;
|
vector<dir_discHdr> m_gameList;
|
||||||
|
|
||||||
@ -137,6 +138,7 @@ private:
|
|||||||
string m_helpDir;
|
string m_helpDir;
|
||||||
|
|
||||||
/* NandEmulation */
|
/* NandEmulation */
|
||||||
|
char emu_nands_dir[64];
|
||||||
string m_saveExtGameId;
|
string m_saveExtGameId;
|
||||||
bool m_forceext;
|
bool m_forceext;
|
||||||
bool m_emuSaveNand;
|
bool m_emuSaveNand;
|
||||||
@ -1019,8 +1021,8 @@ private:
|
|||||||
void _updatePluginText(void);
|
void _updatePluginText(void);
|
||||||
void _updatePluginCheckboxes(void);
|
void _updatePluginCheckboxes(void);
|
||||||
void _updateCheckboxes(void);
|
void _updateCheckboxes(void);
|
||||||
void _getIDCats(void);
|
void _getGameCategories(void);
|
||||||
void _setIDCats(void);
|
void _setGameCategories(void);
|
||||||
void _setBg(const TexData &bgTex, const TexData &bglqTex);
|
void _setBg(const TexData &bgTex, const TexData &bglqTex);
|
||||||
void _updateBg(void);
|
void _updateBg(void);
|
||||||
void _drawBg(void);
|
void _drawBg(void);
|
||||||
@ -1087,6 +1089,7 @@ private:
|
|||||||
void _launchHomebrew(const char *filepath, vector<string> arguments);
|
void _launchHomebrew(const char *filepath, vector<string> arguments);
|
||||||
void _launchGC(dir_discHdr *hdr, bool disc);
|
void _launchGC(dir_discHdr *hdr, bool disc);
|
||||||
void _launchShutdown();
|
void _launchShutdown();
|
||||||
|
void _setCurrentItem(const dir_discHdr *hdr);
|
||||||
void _exitWiiflow();
|
void _exitWiiflow();
|
||||||
void exitHandler(int ExitTo);
|
void exitHandler(int ExitTo);
|
||||||
void _setAA(int aa);
|
void _setAA(int aa);
|
||||||
|
@ -105,7 +105,7 @@ void CMenu::_updateCheckboxes(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_getIDCats(void)
|
void CMenu::_getGameCategories(void)
|
||||||
{
|
{
|
||||||
const dir_discHdr *hdr = CoverFlow.getHdr();
|
const dir_discHdr *hdr = CoverFlow.getHdr();
|
||||||
switch(hdr->type)
|
switch(hdr->type)
|
||||||
@ -156,7 +156,7 @@ void CMenu::_getIDCats(void)
|
|||||||
m_btnMgr.setText(m_categoryLblTitle, CoverFlow.getTitle());
|
m_btnMgr.setText(m_categoryLblTitle, CoverFlow.getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_setIDCats(void)
|
void CMenu::_setGameCategories(void)
|
||||||
{
|
{
|
||||||
const dir_discHdr *hdr = CoverFlow.getHdr();
|
const dir_discHdr *hdr = CoverFlow.getHdr();
|
||||||
string newIdCats = "";
|
string newIdCats = "";
|
||||||
@ -176,6 +176,7 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
|||||||
SetupInput();
|
SetupInput();
|
||||||
curPage = 1;
|
curPage = 1;
|
||||||
gameSet = fromGameSet;
|
gameSet = fromGameSet;
|
||||||
|
m_newGame = false;
|
||||||
|
|
||||||
if(m_source.loaded() && m_catStartPage > 0)
|
if(m_source.loaded() && m_catStartPage > 0)
|
||||||
curPage = m_catStartPage;
|
curPage = m_catStartPage;
|
||||||
@ -188,7 +189,7 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
|||||||
|
|
||||||
if(fromGameSet)
|
if(fromGameSet)
|
||||||
{
|
{
|
||||||
_getIDCats();
|
_getGameCategories();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -265,8 +266,8 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_setIDCats();
|
_setGameCategories();
|
||||||
m_refreshGameList = true;
|
//m_refreshGameList = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -276,22 +277,26 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
|||||||
m_btnMgr.down();
|
m_btnMgr.down();
|
||||||
if(BTN_PLUS_PRESSED && fromGameSet)
|
if(BTN_PLUS_PRESSED && fromGameSet)
|
||||||
{
|
{
|
||||||
_setIDCats();
|
_setGameCategories();
|
||||||
_hideCategorySettings();
|
_hideCategorySettings();
|
||||||
CoverFlow.right();
|
CoverFlow.right();
|
||||||
curPage = 1;
|
curPage = 1;
|
||||||
|
m_newGame = true;
|
||||||
m_categories.assign(m_max_categories, '0');
|
m_categories.assign(m_max_categories, '0');
|
||||||
_getIDCats();
|
_playGameSound();//changes banner and game sound
|
||||||
|
_getGameCategories();
|
||||||
_showCategorySettings();
|
_showCategorySettings();
|
||||||
}
|
}
|
||||||
if(BTN_MINUS_PRESSED && fromGameSet)
|
if(BTN_MINUS_PRESSED && fromGameSet)
|
||||||
{
|
{
|
||||||
_setIDCats();
|
_setGameCategories();
|
||||||
_hideCategorySettings();
|
_hideCategorySettings();
|
||||||
CoverFlow.left();
|
CoverFlow.left();
|
||||||
curPage = 1;
|
curPage = 1;
|
||||||
|
m_newGame = true;
|
||||||
m_categories.assign(m_max_categories, '0');
|
m_categories.assign(m_max_categories, '0');
|
||||||
_getIDCats();
|
_playGameSound();
|
||||||
|
_getGameCategories();
|
||||||
_showCategorySettings();
|
_showCategorySettings();
|
||||||
}
|
}
|
||||||
if((BTN_LEFT_PRESSED && m_max_categories>11) || (BTN_A_PRESSED && m_btnMgr.selected(m_categoryBtnPageM)))
|
if((BTN_LEFT_PRESSED && m_max_categories>11) || (BTN_A_PRESSED && m_btnMgr.selected(m_categoryBtnPageM)))
|
||||||
|
@ -467,10 +467,11 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc)
|
|||||||
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
||||||
GameHdr = hdr;
|
GameHdr = hdr;
|
||||||
const char *id = GameHdr->id;
|
const char *id = GameHdr->id;
|
||||||
//const char *id = CoverFlow.getId();
|
if(GameHdr->type == TYPE_GC_GAME)
|
||||||
//const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
{
|
||||||
videoScale = m_gcfg2.getInt(id, "nin_width", 127);
|
videoScale = m_gcfg2.getInt(id, "nin_width", 127);
|
||||||
videoOffset = m_gcfg2.getInt(id, "nin_pos", 127);
|
videoOffset = m_gcfg2.getInt(id, "nin_pos", 127);
|
||||||
|
}
|
||||||
m_gameSettingsPage = 1;
|
m_gameSettingsPage = 1;
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
while(!m_exit)
|
while(!m_exit)
|
||||||
@ -529,13 +530,7 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc)
|
|||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameSettingsBtnLaunchNK))
|
else if(m_btnMgr.selected(m_gameSettingsBtnLaunchNK))
|
||||||
{
|
{
|
||||||
//show error msg if emunand not on USB1 && neek2o doesn't exist
|
m_gcfg2.setBool(id, "useneek", !m_gcfg2.getBool(id, "useneek", 0));
|
||||||
if(m_cfg.getInt(CHANNEL_DOMAIN, "partition", 0) != 1)
|
|
||||||
error(_t("cfgg48", L"EmuNAND not on USB1!"));
|
|
||||||
else if(!fsop_FileExist("usb1:/sneek/kernel.bin"))
|
|
||||||
error(_t("cfgg49", L"Neek2o Not Found!"));
|
|
||||||
else
|
|
||||||
m_gcfg2.setBool(id, "useneek", !m_gcfg2.getBool(id, "useneek", 0));
|
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameSettingsBtnDevoMemcardEmu))
|
else if(m_btnMgr.selected(m_gameSettingsBtnDevoMemcardEmu))
|
||||||
@ -753,8 +748,11 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc)
|
|||||||
// update these in case the user changed games while in cat menu
|
// update these in case the user changed games while in cat menu
|
||||||
id = CoverFlow.getId();
|
id = CoverFlow.getId();
|
||||||
GameHdr = CoverFlow.getHdr();
|
GameHdr = CoverFlow.getHdr();
|
||||||
videoScale = m_gcfg2.getInt(id, "nin_width", 127);
|
if(GameHdr->type == TYPE_GC_GAME)
|
||||||
videoOffset = m_gcfg2.getInt(id, "nin_pos", 127);
|
{
|
||||||
|
videoScale = m_gcfg2.getInt(id, "nin_width", 127);
|
||||||
|
videoOffset = m_gcfg2.getInt(id, "nin_pos", 127);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ extern const u8 gc_ogg[];
|
|||||||
extern const u32 gc_ogg_size;
|
extern const u32 gc_ogg_size;
|
||||||
|
|
||||||
bool m_zoom_banner = false;
|
bool m_zoom_banner = false;
|
||||||
|
bool m_pluginBanner = false;
|
||||||
s16 m_gameBtnPlayFull;
|
s16 m_gameBtnPlayFull;
|
||||||
s16 m_gameBtnBackFull;
|
s16 m_gameBtnBackFull;
|
||||||
s16 m_gameBtnToggle;
|
s16 m_gameBtnToggle;
|
||||||
@ -275,6 +276,14 @@ static u8 GetRequestedGameIOS(dir_discHdr *hdr)
|
|||||||
return IOS;
|
return IOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMenu::_setCurrentItem(const dir_discHdr *hdr)
|
||||||
|
{
|
||||||
|
const char *title = CoverFlow.getPathId(hdr, true);// with extension
|
||||||
|
m_cfg.setString(_domainFromView(), "current_item", title);
|
||||||
|
if(m_source_cnt > 1)
|
||||||
|
m_cfg.setInt(_domainFromView(), "current_item_type", hdr->type);
|
||||||
|
}
|
||||||
|
|
||||||
void CMenu::_hideGame(bool instant)
|
void CMenu::_hideGame(bool instant)
|
||||||
{
|
{
|
||||||
_cleanupVideo();
|
_cleanupVideo();
|
||||||
@ -335,8 +344,11 @@ void CMenu::_cleanupVideo()
|
|||||||
|
|
||||||
static const char *getVideoPath(const string &videoDir, const char *videoId)
|
static const char *getVideoPath(const string &videoDir, const char *videoId)
|
||||||
{
|
{
|
||||||
const char *coverDir = m_plugin.GetCoverFolderName(CoverFlow.getHdr()->settings[0]);
|
const char *coverDir = NULL;
|
||||||
const char *videoPath = NULL;
|
const char *videoPath = NULL;
|
||||||
|
if(CoverFlow.getHdr()->type == TYPE_PLUGIN)
|
||||||
|
coverDir = m_plugin.GetCoverFolderName(CoverFlow.getHdr()->settings[0]);
|
||||||
|
|
||||||
if(coverDir == NULL || strlen(coverDir) == 0)
|
if(coverDir == NULL || strlen(coverDir) == 0)
|
||||||
videoPath = fmt("%s/%s", videoDir.c_str(), videoId);
|
videoPath = fmt("%s/%s", videoDir.c_str(), videoId);
|
||||||
else
|
else
|
||||||
@ -356,23 +368,26 @@ bool CMenu::_startVideo()
|
|||||||
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
||||||
char curId3[4];
|
char curId3[4];
|
||||||
memset(curId3, 0, 4);
|
memset(curId3, 0, 4);
|
||||||
const char *videoId = CoverFlow.getPathId(GameHdr);
|
const char *videoId = CoverFlow.getPathId(GameHdr);//title.ext
|
||||||
if(!NoGameID(GameHdr->type))
|
if(!NoGameID(GameHdr->type))
|
||||||
{ //id3
|
{ //id3
|
||||||
memcpy(curId3, GameHdr->id, 3);
|
memcpy(curId3, GameHdr->id, 3);
|
||||||
videoId = curId3;
|
videoId = curId3;
|
||||||
}
|
}
|
||||||
|
//dev:/wiiflow/trailers/{coverfolder}/title.ext.thp or dev:/wiiflow/trailers/id3.thp
|
||||||
const char *videoPath = getVideoPath(m_videoDir, videoId);
|
const char *videoPath = getVideoPath(m_videoDir, videoId);
|
||||||
const char *THP_Path = fmt("%s.thp", videoPath);
|
const char *THP_Path = fmt("%s.thp", videoPath);
|
||||||
if(!fsop_FileExist(THP_Path))
|
if(!fsop_FileExist(THP_Path))
|
||||||
{
|
{
|
||||||
if(GameHdr->type == TYPE_PLUGIN)
|
if(GameHdr->type == TYPE_PLUGIN)
|
||||||
{
|
{
|
||||||
|
//dev:/wiiflow/trailers/magic#.thp
|
||||||
videoPath = getVideoDefaultPath(m_videoDir);
|
videoPath = getVideoDefaultPath(m_videoDir);
|
||||||
THP_Path = fmt("%s.thp", videoPath);
|
THP_Path = fmt("%s.thp", videoPath);
|
||||||
}
|
}
|
||||||
else if(!NoGameID(GameHdr->type))
|
else if(!NoGameID(GameHdr->type))
|
||||||
{
|
{
|
||||||
|
//id6
|
||||||
videoPath = getVideoPath(m_videoDir, GameHdr->id);
|
videoPath = getVideoPath(m_videoDir, GameHdr->id);
|
||||||
THP_Path = fmt("%s.thp", videoPath);
|
THP_Path = fmt("%s.thp", videoPath);
|
||||||
}
|
}
|
||||||
@ -396,6 +411,7 @@ bool CMenu::_startVideo()
|
|||||||
|
|
||||||
void CMenu::_game(bool launch)
|
void CMenu::_game(bool launch)
|
||||||
{
|
{
|
||||||
|
m_pluginBanner = false;
|
||||||
bool coverFlipped = false;
|
bool coverFlipped = false;
|
||||||
int cf_version = 1;
|
int cf_version = 1;
|
||||||
string domain;
|
string domain;
|
||||||
@ -405,6 +421,7 @@ void CMenu::_game(bool launch)
|
|||||||
|
|
||||||
dir_discHdr *hdr = (dir_discHdr*)MEM2_alloc(sizeof(dir_discHdr));
|
dir_discHdr *hdr = (dir_discHdr*)MEM2_alloc(sizeof(dir_discHdr));
|
||||||
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));
|
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));
|
||||||
|
_setCurrentItem(hdr);
|
||||||
|
|
||||||
const char *id = NULL;
|
const char *id = NULL;
|
||||||
char tmp1[74];// title/magic#
|
char tmp1[74];// title/magic#
|
||||||
@ -430,17 +447,13 @@ void CMenu::_game(bool launch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
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)
|
if(m_banner.GetZoomSetting() != m_zoom_banner)
|
||||||
m_banner.ToggleZoom();
|
m_banner.ToggleZoom();
|
||||||
|
|
||||||
|
if(m_banner.GetInGameSettings())
|
||||||
|
m_banner.ToggleGameSettings();
|
||||||
|
m_gameSelected = true;
|
||||||
s8 startGameSound = -7;
|
s8 startGameSound = -7;
|
||||||
SetupInput();
|
SetupInput();
|
||||||
|
|
||||||
@ -454,24 +467,14 @@ void CMenu::_game(bool launch)
|
|||||||
|
|
||||||
if(!launch)
|
if(!launch)
|
||||||
_mainLoopCommon(true);
|
_mainLoopCommon(true);
|
||||||
|
|
||||||
if(startGameSound == -1)
|
|
||||||
{
|
|
||||||
_cleanupBanner(true);
|
|
||||||
m_gameSelected = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(startGameSound == 0)
|
if(startGameSound == 0)
|
||||||
{
|
{
|
||||||
m_gameSelected = true;// mark game selected and load sound/banner for main loop to start playing
|
|
||||||
startGameSound = 1;
|
startGameSound = 1;
|
||||||
_playGameSound();
|
_playGameSound();
|
||||||
}
|
}
|
||||||
/* move and zoom flipped cover */
|
/* move and zoom flipped cover */
|
||||||
if(coverFlipped &&
|
if(coverFlipped)
|
||||||
(BTN_PLUS_PRESSED || BTN_MINUS_PRESSED ||
|
|
||||||
BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED ||
|
|
||||||
BTN_UP_PRESSED || BTN_DOWN_PRESSED))
|
|
||||||
{
|
{
|
||||||
float step = 0.05f;
|
float step = 0.05f;
|
||||||
if(BTN_PLUS_PRESSED || BTN_MINUS_PRESSED)
|
if(BTN_PLUS_PRESSED || BTN_MINUS_PRESSED)
|
||||||
@ -494,54 +497,62 @@ void CMenu::_game(bool launch)
|
|||||||
}
|
}
|
||||||
CoverFlow.setCoverFlipPos(v);
|
CoverFlow.setCoverFlipPos(v);
|
||||||
}
|
}
|
||||||
/* if B on favorites btn goto game categories */
|
/* exit game menu */
|
||||||
if(BTN_B_PRESSED && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
if(BTN_HOME_PRESSED)
|
||||||
{
|
{
|
||||||
_hideGame();
|
_cleanupBanner();// also cleans up trailer movie including trailer sound
|
||||||
m_banner.SetShowBanner(false);
|
break;
|
||||||
if(m_locked)
|
|
||||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
|
||||||
else
|
|
||||||
_CategorySettings(true);
|
|
||||||
_showGame();
|
|
||||||
m_banner.SetShowBanner(true);
|
|
||||||
if(!m_gameSound.IsPlaying())
|
|
||||||
startGameSound = -6;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
/* exit game menu or reset flipped cover */
|
else if(BTN_B_PRESSED)
|
||||||
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
|
|
||||||
{
|
{
|
||||||
if(BTN_B_PRESSED && coverFlipped)
|
/* de flip cover */
|
||||||
|
if(coverFlipped)
|
||||||
{
|
{
|
||||||
CoverFlow.flip();
|
CoverFlow.flip();
|
||||||
coverFlipped = false;
|
coverFlipped = false;
|
||||||
|
m_banner.SetShowBanner(true);
|
||||||
}
|
}
|
||||||
|
/* if B on favorites btn goto game categories */
|
||||||
|
else if(m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff))
|
||||||
|
{
|
||||||
|
_hideGame();
|
||||||
|
if(m_locked)
|
||||||
|
{
|
||||||
|
m_banner.SetShowBanner(false);
|
||||||
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||||
|
m_banner.SetShowBanner(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// the mainloop handles drawing banner while in settings
|
||||||
|
m_banner.ToggleZoom();//zoom to full
|
||||||
|
m_banner.ToggleGameSettings();// dim brightness
|
||||||
|
_CategorySettings(true);
|
||||||
|
m_banner.ToggleGameSettings();//reset brightness
|
||||||
|
m_banner.ToggleZoom();//de zoom to small
|
||||||
|
}
|
||||||
|
_showGame();
|
||||||
|
if(m_newGame)
|
||||||
|
startGameSound = -10;
|
||||||
|
}
|
||||||
|
/* exit game selected menu */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_cleanupBanner();
|
_cleanupBanner();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* press + for game info screen */
|
/* display game info screen */
|
||||||
else if(BTN_PLUS_PRESSED && !NoGameID(hdr->type) && !coverFlipped)
|
else if(BTN_PLUS_PRESSED && !NoGameID(hdr->type) && !coverFlipped && !m_video_playing)
|
||||||
{
|
{
|
||||||
GameTDB m_gametdb;
|
_hideGame();// stops trailer movie too
|
||||||
m_gametdb.OpenFile(fmt("%s/wiitdb.xml", m_settingsDir.c_str()));
|
m_banner.SetShowBanner(false);
|
||||||
if(m_gametdb.IsLoaded())
|
_gameinfo();
|
||||||
{
|
_showGame();
|
||||||
_hideGame();
|
m_banner.SetShowBanner(true);
|
||||||
m_banner.SetShowBanner(false);
|
|
||||||
_gameinfo();
|
|
||||||
m_gametdb.CloseFile();
|
|
||||||
_showGame();
|
|
||||||
m_banner.SetShowBanner(true);
|
|
||||||
if(!m_gameSound.IsPlaying())// this makes the game sound play when we return
|
|
||||||
startGameSound = -6;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* play or stop a video (this is the old video play for non plugin games) */
|
/* play or stop a trailer video */
|
||||||
else if(BTN_MINUS_PRESSED && !coverFlipped && !NoGameID(hdr->type))
|
else if(BTN_MINUS_PRESSED && !coverFlipped)
|
||||||
{
|
{
|
||||||
if(m_video_playing)
|
if(m_video_playing)
|
||||||
{
|
{
|
||||||
@ -555,7 +566,8 @@ void CMenu::_game(bool launch)
|
|||||||
else
|
else
|
||||||
_startVideo();
|
_startVideo();
|
||||||
}
|
}
|
||||||
else if((BTN_1_PRESSED || BTN_2_PRESSED) && !coverFlipped)
|
/* switch coverflow layout */
|
||||||
|
else if((BTN_1_PRESSED || BTN_2_PRESSED) && !coverFlipped && !m_video_playing)
|
||||||
{
|
{
|
||||||
s8 direction = BTN_1_PRESSED ? 1 : -1;
|
s8 direction = BTN_1_PRESSED ? 1 : -1;
|
||||||
int cfVersion = loopNum((_getCFVersion() - 1) + direction, m_numCFVersions) + 1;
|
int cfVersion = loopNum((_getCFVersion() - 1) + direction, m_numCFVersions) + 1;
|
||||||
@ -565,6 +577,7 @@ void CMenu::_game(bool launch)
|
|||||||
}
|
}
|
||||||
else if(launch || BTN_A_PRESSED)
|
else if(launch || BTN_A_PRESSED)
|
||||||
{
|
{
|
||||||
|
/* delete button */
|
||||||
if(m_btnMgr.selected(m_gameBtnDelete))
|
if(m_btnMgr.selected(m_gameBtnDelete))
|
||||||
{
|
{
|
||||||
_hideGame();
|
_hideGame();
|
||||||
@ -573,32 +586,22 @@ void CMenu::_game(bool launch)
|
|||||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||||
else if(hdr->type == TYPE_CHANNEL)
|
else if(hdr->type == TYPE_CHANNEL)
|
||||||
error(_t("errgame17", L"Can not delete real NAND Channels!"));
|
error(_t("errgame17", L"Can not delete real NAND Channels!"));
|
||||||
else if(hdr->type == TYPE_PLUGIN)
|
else /* delete wii, gamecube, emunand game or plugin rom */
|
||||||
{
|
|
||||||
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));
|
|
||||||
else
|
|
||||||
wfcPath = fmt("%s/%s/%s.wfc", m_cacheDir.c_str(), coverDir, CoverFlow.getPathId(hdr, true));
|
|
||||||
fsop_deleteFile(wfcPath);
|
|
||||||
CoverFlow.stopCoverLoader(true);
|
|
||||||
CoverFlow.startCoverLoader();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if(_wbfsOp(WO_REMOVE_GAME))
|
if(_wbfsOp(WO_REMOVE_GAME))
|
||||||
{
|
{
|
||||||
|
m_refreshGameList = false;
|
||||||
|
_setCurrentItem(CoverFlow.getNextHdr());
|
||||||
_cleanupBanner();
|
_cleanupBanner();
|
||||||
break;
|
_loadList();
|
||||||
|
_initCF();
|
||||||
|
CoverFlow.select();
|
||||||
|
CoverFlow.applySettings();
|
||||||
|
startGameSound = -10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_showGame();
|
_showGame();
|
||||||
m_banner.SetShowBanner(true);
|
m_banner.SetShowBanner(true);
|
||||||
if(!m_gameSound.IsPlaying())
|
|
||||||
startGameSound = -6;
|
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameBtnSettings))
|
else if(m_btnMgr.selected(m_gameBtnSettings))
|
||||||
{
|
{
|
||||||
@ -609,21 +612,18 @@ void CMenu::_game(bool launch)
|
|||||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||||
m_banner.SetShowBanner(true);
|
m_banner.SetShowBanner(true);
|
||||||
}
|
}
|
||||||
/*else if(hdr->type == TYPE_PLUGIN)
|
|
||||||
{
|
|
||||||
m_banner.SetShowBanner(false);
|
|
||||||
error(_t("errgame16", L"Not available for plugin games!"));
|
|
||||||
m_banner.SetShowBanner(true);
|
|
||||||
}*/
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_banner.ToggleGameSettings();
|
// the mainloop handles drawing banner while in settings
|
||||||
|
m_banner.ToggleZoom();//zoom to full
|
||||||
|
m_banner.ToggleGameSettings();// dim brightness
|
||||||
_gameSettings(hdr);
|
_gameSettings(hdr);
|
||||||
m_banner.ToggleGameSettings();
|
m_banner.ToggleGameSettings();//reset brightness
|
||||||
|
m_banner.ToggleZoom();//de zoom to small
|
||||||
}
|
}
|
||||||
_showGame();
|
_showGame();
|
||||||
if(!m_gameSound.IsPlaying())
|
if(m_newGame)
|
||||||
startGameSound = -6;
|
startGameSound = -10;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff))
|
else if(m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff))
|
||||||
{
|
{
|
||||||
@ -631,6 +631,8 @@ void CMenu::_game(bool launch)
|
|||||||
m_gcfg1.setBool("FAVORITES_PLUGINS", id, !m_gcfg1.getBool("FAVORITES_PLUGINS", id, false));
|
m_gcfg1.setBool("FAVORITES_PLUGINS", id, !m_gcfg1.getBool("FAVORITES_PLUGINS", id, false));
|
||||||
else
|
else
|
||||||
m_gcfg1.setBool("FAVORITES", id, !m_gcfg1.getBool("FAVORITES", id, false));
|
m_gcfg1.setBool("FAVORITES", id, !m_gcfg1.getBool("FAVORITES", id, false));
|
||||||
|
if(m_favorites)
|
||||||
|
m_refreshGameList = true;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameBtnAdultOn) || m_btnMgr.selected(m_gameBtnAdultOff))
|
else if(m_btnMgr.selected(m_gameBtnAdultOn) || m_btnMgr.selected(m_gameBtnAdultOff))
|
||||||
{
|
{
|
||||||
@ -640,8 +642,6 @@ void CMenu::_game(bool launch)
|
|||||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||||
m_banner.SetShowBanner(true);
|
m_banner.SetShowBanner(true);
|
||||||
_showGame();
|
_showGame();
|
||||||
if(!m_gameSound.IsPlaying())
|
|
||||||
startGameSound = -6;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -649,6 +649,8 @@ void CMenu::_game(bool launch)
|
|||||||
m_gcfg1.setBool("ADULTONLY_PLUGINS", id, !m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false));
|
m_gcfg1.setBool("ADULTONLY_PLUGINS", id, !m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false));
|
||||||
else
|
else
|
||||||
m_gcfg1.setBool("ADULTONLY", id, !m_gcfg1.getBool("ADULTONLY", id, false));
|
m_gcfg1.setBool("ADULTONLY", id, !m_gcfg1.getBool("ADULTONLY", id, false));
|
||||||
|
if(m_locked)
|
||||||
|
m_refreshGameList = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_gameBtnBack) || m_btnMgr.selected(m_gameBtnBackFull))
|
else if(m_btnMgr.selected(m_gameBtnBack) || m_btnMgr.selected(m_gameBtnBackFull))
|
||||||
@ -657,17 +659,17 @@ void CMenu::_game(bool launch)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if((m_btnMgr.selected(m_gameBtnToggle) || m_btnMgr.selected(m_gameBtnToggleFull))
|
else if((m_btnMgr.selected(m_gameBtnToggle) || m_btnMgr.selected(m_gameBtnToggleFull))
|
||||||
&& (!NoGameID(hdr->type) || m_video_playing))
|
&& (!NoGameID(hdr->type) || m_pluginBanner))
|
||||||
{
|
{
|
||||||
m_zoom_banner = m_banner.ToggleZoom();
|
m_zoom_banner = m_banner.ToggleZoom();
|
||||||
m_cfg.setBool(_domainFromView(), "show_full_banner", m_zoom_banner);
|
m_cfg.setBool(_domainFromView(), "show_full_banner", m_zoom_banner);
|
||||||
currentMoviePos = (m_zoom_banner ? zoomedMoviePos : normalMoviePos);
|
|
||||||
m_show_zone_game = false;
|
m_show_zone_game = false;
|
||||||
m_btnMgr.hide(m_gameBtnPlayFull);
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
||||||
m_btnMgr.hide(m_gameBtnBackFull);
|
m_btnMgr.hide(m_gameBtnBackFull);
|
||||||
m_btnMgr.hide(m_gameBtnToggleFull);
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
||||||
}
|
}
|
||||||
else if(launch || m_btnMgr.selected(m_gameBtnPlay) || m_btnMgr.selected(m_gameBtnPlayFull) || !ShowPointer())
|
else if(launch || m_btnMgr.selected(m_gameBtnPlay) || m_btnMgr.selected(m_gameBtnPlayFull) ||
|
||||||
|
(!ShowPointer() && !m_video_playing && !coverFlipped))
|
||||||
{
|
{
|
||||||
_hideGame();
|
_hideGame();
|
||||||
MusicPlayer.Stop();
|
MusicPlayer.Stop();
|
||||||
@ -731,9 +733,9 @@ void CMenu::_game(bool launch)
|
|||||||
m_gcfg2.unload();
|
m_gcfg2.unload();
|
||||||
_showGame();
|
_showGame();
|
||||||
}
|
}
|
||||||
/* flip cover if mouse over */
|
|
||||||
else if(!coverFlipped)
|
else if(!coverFlipped)
|
||||||
{
|
{
|
||||||
|
/* flip cover if mouse over */
|
||||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||||
{
|
{
|
||||||
if(CoverFlow.mouseOver(m_cursor[chan].x(), m_cursor[chan].y()))
|
if(CoverFlow.mouseOver(m_cursor[chan].x(), m_cursor[chan].y()))
|
||||||
@ -746,40 +748,39 @@ void CMenu::_game(bool launch)
|
|||||||
v = m_coverflow.getVector3D(domain, key);
|
v = m_coverflow.getVector3D(domain, key);
|
||||||
coverFlipped = true;
|
coverFlipped = true;
|
||||||
CoverFlow.flip();
|
CoverFlow.flip();
|
||||||
|
m_banner.SetShowBanner(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!coverFlipped)
|
if(!coverFlipped && !m_video_playing)
|
||||||
{
|
{
|
||||||
|
/* move to new cover if needed */
|
||||||
if((startGameSound == 1 || startGameSound < -8) && (BTN_UP_REPEAT || RIGHT_STICK_UP))
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_UP_REPEAT || RIGHT_STICK_UP))
|
||||||
{
|
{
|
||||||
//_cleanupBanner(true);
|
|
||||||
CoverFlow.up();
|
CoverFlow.up();
|
||||||
startGameSound = -10;
|
startGameSound = -10;
|
||||||
}
|
}
|
||||||
if((startGameSound == 1 || startGameSound < -8) && (BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT))
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT))
|
||||||
{
|
{
|
||||||
//_cleanupBanner(true);
|
|
||||||
CoverFlow.right();
|
CoverFlow.right();
|
||||||
startGameSound = -10;
|
startGameSound = -10;
|
||||||
}
|
}
|
||||||
if((startGameSound == 1 || startGameSound < -8) && (BTN_DOWN_REPEAT || RIGHT_STICK_DOWN))
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_DOWN_REPEAT || RIGHT_STICK_DOWN))
|
||||||
{
|
{
|
||||||
//_cleanupBanner(true);
|
|
||||||
CoverFlow.down();
|
CoverFlow.down();
|
||||||
startGameSound = -10;
|
startGameSound = -10;
|
||||||
}
|
}
|
||||||
if((startGameSound == 1 || startGameSound < -8) && (BTN_LEFT_REPEAT || RIGHT_STICK_LEFT))
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_LEFT_REPEAT || RIGHT_STICK_LEFT))
|
||||||
{
|
{
|
||||||
//_cleanupBanner(true);
|
|
||||||
CoverFlow.left();
|
CoverFlow.left();
|
||||||
startGameSound = -10;
|
startGameSound = -10;
|
||||||
}
|
}
|
||||||
if(startGameSound == -10)// if -10 then we moved to new cover
|
if(startGameSound == -10)// if -10 then we moved to new cover
|
||||||
{
|
{
|
||||||
//m_gameSelected = false; // deselect game if moved to new cover
|
|
||||||
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));// get new game header
|
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));// get new game header
|
||||||
|
_setCurrentItem(hdr);
|
||||||
|
|
||||||
memset(tmp1, 0, 74);
|
memset(tmp1, 0, 74);
|
||||||
memset(tmp2, 0, 64);
|
memset(tmp2, 0, 64);
|
||||||
if(hdr->type == TYPE_PLUGIN)
|
if(hdr->type == TYPE_PLUGIN)
|
||||||
@ -799,25 +800,22 @@ void CMenu::_game(bool launch)
|
|||||||
id = tmp1;
|
id = tmp1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
if(m_newGame)
|
||||||
if(NoGameID(hdr->type))
|
|
||||||
{
|
{
|
||||||
bool video_available = (hdr->type == TYPE_PLUGIN &&
|
m_newGame = false;
|
||||||
(fsop_FileExist(fmt("%s.thp", getVideoPath(m_videoDir, CoverFlow.getPathId(hdr)))) ||
|
startGameSound = 1;
|
||||||
fsop_FileExist(fmt("%s.thp", getVideoDefaultPath(m_videoDir)))));
|
_playGameSound();
|
||||||
m_zoom_banner = m_zoom_banner && video_available;
|
|
||||||
}
|
}
|
||||||
currentMoviePos = (m_zoom_banner ? zoomedMoviePos : normalMoviePos);
|
|
||||||
if(m_banner.GetZoomSetting() != m_zoom_banner)
|
|
||||||
m_banner.ToggleZoom();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* show small banner frame if available */
|
/* show small banner frame if available */
|
||||||
if(m_gameLblUser[4] != -1 && !NoGameID(hdr->type) && !m_zoom_banner)
|
if(!coverFlipped && m_gameLblUser[4] != -1 && (!NoGameID(hdr->type) || m_pluginBanner) && !m_zoom_banner && !m_video_playing)
|
||||||
m_btnMgr.show(m_gameLblUser[4]);
|
m_btnMgr.show(m_gameLblUser[4]);
|
||||||
else
|
else
|
||||||
m_btnMgr.hide(m_gameLblUser[4]);
|
m_btnMgr.hide(m_gameLblUser[4]);
|
||||||
if(m_show_zone_game && !m_zoom_banner)
|
|
||||||
|
/* show regular buttons if pointer is in game zone && banner is not zoomed && trailer video is not playing */
|
||||||
|
if(m_show_zone_game && !coverFlipped && (!m_zoom_banner || (NoGameID(hdr->type) && !m_pluginBanner)) && !m_video_playing)
|
||||||
{
|
{
|
||||||
m_btnMgr.hide(m_gameBtnPlayFull);
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
||||||
m_btnMgr.hide(m_gameBtnBackFull);
|
m_btnMgr.hide(m_gameBtnBackFull);
|
||||||
@ -846,14 +844,20 @@ void CMenu::_game(bool launch)
|
|||||||
m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff);
|
m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff);
|
||||||
m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
|
m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
|
||||||
}
|
}
|
||||||
else
|
else /* show zoomed banner play and back buttons */
|
||||||
{
|
{
|
||||||
if(m_zoom_banner)
|
if(m_zoom_banner && (!NoGameID(hdr->type) || m_pluginBanner) && !m_video_playing)
|
||||||
{
|
{
|
||||||
m_btnMgr.show(m_gameBtnPlayFull);
|
m_btnMgr.show(m_gameBtnPlayFull);
|
||||||
m_btnMgr.show(m_gameBtnBackFull);
|
m_btnMgr.show(m_gameBtnBackFull);
|
||||||
m_btnMgr.show(m_gameBtnToggleFull);
|
m_btnMgr.show(m_gameBtnToggleFull);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
||||||
|
m_btnMgr.hide(m_gameBtnBackFull);
|
||||||
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
||||||
|
}
|
||||||
m_btnMgr.hide(m_gameBtnFavoriteOn);
|
m_btnMgr.hide(m_gameBtnFavoriteOn);
|
||||||
m_btnMgr.hide(m_gameBtnFavoriteOff);
|
m_btnMgr.hide(m_gameBtnFavoriteOff);
|
||||||
m_btnMgr.hide(m_gameBtnAdultOn);
|
m_btnMgr.hide(m_gameBtnAdultOn);
|
||||||
@ -929,52 +933,53 @@ void CMenu::_launch(const dir_discHdr *hdr)
|
|||||||
_launchChannel(&launchHdr);
|
_launchChannel(&launchHdr);
|
||||||
else if(launchHdr.type == TYPE_PLUGIN)
|
else if(launchHdr.type == TYPE_PLUGIN)
|
||||||
{
|
{
|
||||||
//get dol name and name length for music plugin
|
/* get dol name and name length for music plugin */
|
||||||
const char *plugin_dol_name = m_plugin.GetDolName(launchHdr.settings[0]);
|
const char *plugin_dol_name = m_plugin.GetDolName(launchHdr.settings[0]);
|
||||||
u8 plugin_dol_len = strlen(plugin_dol_name);
|
u8 plugin_dol_len = strlen(plugin_dol_name);
|
||||||
//get title and path from hdr
|
/* check if music player plugin, if so set wiiflow's bckgrnd music player to play this song */
|
||||||
//example rom path - sd:/roms/super mario bros.zip
|
if(plugin_dol_len == 5 && strcasecmp(plugin_dol_name, "music") == 0)
|
||||||
//example scummvm path - kq1-coco3
|
{
|
||||||
char title[101];
|
MusicPlayer.LoadFile(launchHdr.path, false);
|
||||||
memset(&title, 0, sizeof(title));
|
m_exit = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* get title from hdr */
|
||||||
u32 title_len_no_ext = 0;
|
u32 title_len_no_ext = 0;
|
||||||
|
const char *title = CoverFlow.getPathId(hdr, true);// with extension
|
||||||
|
//m_cfg.setString(_domainFromView(), "current_item", title);
|
||||||
|
|
||||||
|
/* get path from hdr */
|
||||||
|
// example rom path - dev:/roms/super mario bros.zip
|
||||||
|
// example scummvm path - kq1-coco3
|
||||||
const char *path = NULL;
|
const char *path = NULL;
|
||||||
if(strchr(launchHdr.path, ':') != NULL)//it's a rom path
|
if(strchr(launchHdr.path, ':') != NULL)//it's a rom path
|
||||||
{
|
{
|
||||||
//check if music player plugin, if so set wiiflow's bckgrnd music player to play this song
|
// if there's extension get length of title without extension
|
||||||
if(plugin_dol_len == 5 && strcasecmp(plugin_dol_name, "music") == 0)
|
|
||||||
{
|
|
||||||
MusicPlayer.LoadFile(launchHdr.path, false);
|
|
||||||
m_exit = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//get rom title after last '/'
|
|
||||||
strncpy(title, strrchr(launchHdr.path, '/') + 1, 100);
|
|
||||||
//if there's extension get length of title without extension
|
|
||||||
if(strchr(launchHdr.path, '.') != NULL)
|
if(strchr(launchHdr.path, '.') != NULL)
|
||||||
title_len_no_ext = strlen(title) - strlen(strrchr(title, '.'));
|
title_len_no_ext = strlen(title) - strlen(strrchr(title, '.'));
|
||||||
//get path
|
// get path
|
||||||
*strrchr(launchHdr.path, '/') = '\0'; //cut title off end of path
|
*strrchr(launchHdr.path, '/') = '\0'; //cut title off end of path
|
||||||
path = strchr(launchHdr.path, '/') + 1; //cut sd:/ off of path
|
path = strchr(launchHdr.path, '/') + 1; //cut dev:/ off of path
|
||||||
}
|
}
|
||||||
else //it's a scummvm game
|
else // it's a scummvm game
|
||||||
{
|
|
||||||
path = launchHdr.path;// kq1-coco3
|
path = launchHdr.path;// kq1-coco3
|
||||||
wcstombs(title, launchHdr.title, 63);// King's Quest I: Quest for the Crown (CoCo3/English)
|
|
||||||
}
|
|
||||||
m_cfg.setString(_domainFromView(), "current_item", title);
|
|
||||||
|
|
||||||
|
/* get device */
|
||||||
const char *device = (currentPartition == 0 ? "sd" : (DeviceHandle.GetFSType(currentPartition) == PART_FS_NTFS ? "ntfs" : "usb"));
|
const char *device = (currentPartition == 0 ? "sd" : (DeviceHandle.GetFSType(currentPartition) == PART_FS_NTFS ? "ntfs" : "usb"));
|
||||||
|
|
||||||
|
/* get loader */
|
||||||
// I believe the loader is set just in case the user is using a old plugin where the arguments line still requires loader
|
// I believe the loader is set just in case the user is using a old plugin where the arguments line still requires loader
|
||||||
const char *loader = fmt("%s:/%s/WiiFlowLoader.dol", device, strchr(m_pluginsDir.c_str(), '/') + 1);
|
const char *loader = fmt("%s:/%s/WiiFlowLoader.dol", device, strchr(m_pluginsDir.c_str(), '/') + 1);
|
||||||
|
|
||||||
|
/* set arguments */
|
||||||
vector<string> arguments = m_plugin.CreateArgs(device, path, title, loader, title_len_no_ext, launchHdr.settings[0]);
|
vector<string> arguments = m_plugin.CreateArgs(device, path, title, loader, title_len_no_ext, launchHdr.settings[0]);
|
||||||
// find plugin dol - it does not have to be in dev:/wiiflow/plugins
|
|
||||||
const char *plugin_file = plugin_dol_name; /* try full path */
|
/* find plugin dol - it does not have to be in dev:/wiiflow/plugins */
|
||||||
if(strchr(plugin_file, ':') == NULL || !fsop_FileExist(plugin_file)) /* if not found try wiiflow plugin folder */
|
const char *plugin_file = plugin_dol_name; // try full path
|
||||||
|
if(strchr(plugin_file, ':') == NULL || !fsop_FileExist(plugin_file)) // if not found try wiiflow plugin folder
|
||||||
{
|
{
|
||||||
plugin_file = fmt("%s/%s", m_pluginsDir.c_str(), plugin_dol_name);
|
plugin_file = fmt("%s/%s", m_pluginsDir.c_str(), plugin_dol_name);
|
||||||
if(!fsop_FileExist(plugin_file)) /* not found - try device search */
|
if(!fsop_FileExist(plugin_file)) // not found - try device search
|
||||||
{
|
{
|
||||||
for(u8 i = SD; i < MAXDEVICES; ++i)
|
for(u8 i = SD; i < MAXDEVICES; ++i)
|
||||||
{
|
{
|
||||||
@ -984,6 +989,7 @@ void CMenu::_launch(const dir_discHdr *hdr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* launch plugin with args */
|
||||||
_launchHomebrew(plugin_file, arguments);
|
_launchHomebrew(plugin_file, arguments);
|
||||||
}
|
}
|
||||||
else if(launchHdr.type == TYPE_HOMEBREW)
|
else if(launchHdr.type == TYPE_HOMEBREW)
|
||||||
@ -1028,7 +1034,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
|||||||
|
|
||||||
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
||||||
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
||||||
m_cfg.setString(_domainFromView(), "current_item", id);
|
|
||||||
|
|
||||||
if(has_enabled_providers() && _initNetwork() == 0)
|
if(has_enabled_providers() && _initNetwork() == 0)
|
||||||
add_game_to_card(id);
|
add_game_to_card(id);
|
||||||
@ -1416,16 +1421,15 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
|||||||
if(has_enabled_providers() && _initNetwork() == 0)
|
if(has_enabled_providers() && _initNetwork() == 0)
|
||||||
add_game_to_card(id.c_str());
|
add_game_to_card(id.c_str());
|
||||||
}
|
}
|
||||||
m_cfg.setString(_domainFromView(), "current_item", id);
|
|
||||||
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
||||||
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
||||||
|
|
||||||
string emuPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str());
|
string emuPath = fmt("/%s/%s", emu_nands_dir, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str());
|
||||||
int emulate_mode = min(max(0, m_cfg.getInt(CHANNEL_DOMAIN, "emulation", 1)), (int)ARRAY_SIZE(CMenu::_NandEmu) - 1);
|
int emulate_mode = min(max(0, m_cfg.getInt(CHANNEL_DOMAIN, "emulation", 1)), (int)ARRAY_SIZE(CMenu::_NandEmu) - 1);
|
||||||
|
|
||||||
int userIOS = m_gcfg2.getInt(id, "ios", 0);
|
int userIOS = m_gcfg2.getInt(id, "ios", 0);
|
||||||
u64 gameTitle = TITLE_ID(hdr->settings[0],hdr->settings[1]);
|
u64 gameTitle = TITLE_ID(hdr->settings[0],hdr->settings[1]);
|
||||||
bool useNK2o = (m_gcfg2.getBool(id, "useneek", false) && !neek2o());
|
bool useNK2o = (m_gcfg2.getBool(id, "useneek", false) && !neek2o());//if not in neek2o and use neek is set
|
||||||
bool use_led = m_gcfg2.getBool(id, "led", false);
|
bool use_led = m_gcfg2.getBool(id, "led", false);
|
||||||
u32 gameIOS = ChannelHandle.GetRequestedIOS(gameTitle);
|
u32 gameIOS = ChannelHandle.GetRequestedIOS(gameTitle);
|
||||||
|
|
||||||
@ -1441,14 +1445,23 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
|||||||
{
|
{
|
||||||
if(!Load_Neek2o_Kernel())
|
if(!Load_Neek2o_Kernel())
|
||||||
{
|
{
|
||||||
error(_t("errneek1", L"Cannot launch neek2o. Verify your neek2o setup"));
|
error(_t("errneek1", L"Cannot launch neek2o. Verify your neek2o setup"));//kernal.bin not found
|
||||||
_exitWiiflow();
|
_exitWiiflow();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const char *nkrtrn = NULL;
|
||||||
|
if(IsOnWiiU())
|
||||||
|
nkrtrn = "HCVA";// Return to WiiU system channel
|
||||||
|
else
|
||||||
|
nkrtrn = "NK2O";
|
||||||
|
u32 nkreturnTo = nkrtrn[0] << 24 | nkrtrn[1] << 16 | nkrtrn[2] << 8 | nkrtrn[3];
|
||||||
cleanup();
|
cleanup();
|
||||||
ShutdownBeforeExit();
|
ShutdownBeforeExit();
|
||||||
Launch_nk(gameTitle, NandHandle.Get_NandPath(), returnTo ? (((u64)(0x00010001) << 32) | (returnTo & 0xFFFFFFFF)) : 0);
|
if(IsOnWiiU())
|
||||||
|
Launch_nk(gameTitle, NandHandle.Get_NandPath(), ((u64)(0x00010002) << 32) | (nkreturnTo & 0xFFFFFFFF));
|
||||||
|
else
|
||||||
|
Launch_nk(gameTitle, NandHandle.Get_NandPath(), ((u64)(0x00010001) << 32) | (nkreturnTo & 0xFFFFFFFF));
|
||||||
while(1) usleep(500);
|
while(1) usleep(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1515,7 +1528,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg)
|
|||||||
if(neek2o())
|
if(neek2o())
|
||||||
{
|
{
|
||||||
int discID = id.c_str()[0] << 24 | id.c_str()[1] << 16 | id.c_str()[2] << 8 | id.c_str()[3];
|
int discID = id.c_str()[0] << 24 | id.c_str()[1] << 16 | id.c_str()[2] << 8 | id.c_str()[3];
|
||||||
if(WDVD_NEEK_LoadDisc((discID&0xFFFFFFFF), 0x5D1C9EA3) > 0)
|
if(WDVD_NEEK_LoadDisc((discID&0xFFFFFFFF), 0x5D1C9EA3) > 0)//5D1C9EA3 is wii disc magic
|
||||||
{
|
{
|
||||||
dvd = true;
|
dvd = true;
|
||||||
sleep(3);
|
sleep(3);
|
||||||
@ -1679,7 +1692,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg)
|
|||||||
u8 *gameconfig = NULL;
|
u8 *gameconfig = NULL;
|
||||||
u32 cheatSize = 0, gameconfigSize = 0, returnTo = 0;
|
u32 cheatSize = 0, gameconfigSize = 0, returnTo = 0;
|
||||||
|
|
||||||
m_cfg.setString(_domainFromView(), "current_item", id);
|
|
||||||
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
||||||
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
||||||
|
|
||||||
@ -1884,15 +1896,6 @@ void CMenu::_gameSoundThread(CMenu *m)
|
|||||||
CurrentBanner.ClearBanner();
|
CurrentBanner.ClearBanner();
|
||||||
|
|
||||||
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
||||||
if(GameHdr->type == TYPE_PLUGIN)
|
|
||||||
{
|
|
||||||
m_banner.DeleteBanner();
|
|
||||||
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;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
u8 *custom_bnr_file = NULL;
|
u8 *custom_bnr_file = NULL;
|
||||||
u32 custom_bnr_size = 0;
|
u32 custom_bnr_size = 0;
|
||||||
|
|
||||||
@ -1903,18 +1906,40 @@ void CMenu::_gameSoundThread(CMenu *m)
|
|||||||
cached_banner[255] = '\0';
|
cached_banner[255] = '\0';
|
||||||
char custom_banner[256];
|
char custom_banner[256];
|
||||||
custom_banner[255] = '\0';
|
custom_banner[255] = '\0';
|
||||||
/* check custom ID6 first */
|
if(GameHdr->type == TYPE_PLUGIN)
|
||||||
strncpy(custom_banner, fmt("%s/%s.bnr", m->m_customBnrDir.c_str(), GameHdr->id), 255);
|
|
||||||
fsop_GetFileSizeBytes(custom_banner, &custom_bnr_size);
|
|
||||||
if(custom_bnr_size > 0)
|
|
||||||
{
|
{
|
||||||
custom_bnr_file = (u8*)MEM2_lo_alloc(custom_bnr_size);
|
const char *coverDir = NULL;
|
||||||
if(custom_bnr_file != NULL)
|
coverDir = m_plugin.GetCoverFolderName(GameHdr->settings[0]);
|
||||||
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
|
||||||
|
if(coverDir == NULL || strlen(coverDir) == 0)
|
||||||
|
strncpy(custom_banner, fmt("%s/%s.bnr", m->m_customBnrDir.c_str(), CoverFlow.getPathId(GameHdr)), 255);
|
||||||
|
else
|
||||||
|
strncpy(custom_banner, fmt("%s/%s/%s.bnr", m->m_customBnrDir.c_str(), coverDir, CoverFlow.getPathId(GameHdr)), 255);
|
||||||
|
fsop_GetFileSizeBytes(custom_banner, &custom_bnr_size);
|
||||||
|
if(custom_bnr_size > 0)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
m_pluginBanner = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_pluginBanner = false;
|
||||||
|
m_banner.DeleteBanner();
|
||||||
|
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;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else /* no custom ID6 or too big, try ID3 */
|
else
|
||||||
{
|
{
|
||||||
strncpy(custom_banner, fmt("%s/%.3s.bnr", m->m_customBnrDir.c_str(), GameHdr->id), 255);
|
/* 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);
|
fsop_GetFileSizeBytes(custom_banner, &custom_bnr_size);
|
||||||
if(custom_bnr_size > 0)
|
if(custom_bnr_size > 0)
|
||||||
{
|
{
|
||||||
@ -1922,10 +1947,21 @@ void CMenu::_gameSoundThread(CMenu *m)
|
|||||||
if(custom_bnr_file != NULL)
|
if(custom_bnr_file != NULL)
|
||||||
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
||||||
}
|
}
|
||||||
|
else /* no custom ID6 or too big, try ID3 */
|
||||||
|
{
|
||||||
|
strncpy(custom_banner, fmt("%s/%.3s.bnr", m->m_customBnrDir.c_str(), GameHdr->id), 255);
|
||||||
|
fsop_GetFileSizeBytes(custom_banner, &custom_bnr_size);
|
||||||
|
if(custom_bnr_size > 0)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(custom_bnr_file == NULL && GameHdr->type == TYPE_GC_GAME)
|
if(custom_bnr_file == NULL && GameHdr->type == TYPE_GC_GAME)
|
||||||
{
|
{
|
||||||
//get the gc games banner without sound
|
//get the gc games banner without sound from ISO
|
||||||
GC_Disc_Reader.init(GameHdr->path);
|
GC_Disc_Reader.init(GameHdr->path);
|
||||||
u8 *opening_bnr = GC_Disc_Reader.GetGameCubeBanner();
|
u8 *opening_bnr = GC_Disc_Reader.GetGameCubeBanner();
|
||||||
if(opening_bnr != NULL)
|
if(opening_bnr != NULL)
|
||||||
@ -1971,9 +2007,11 @@ void CMenu::_gameSoundThread(CMenu *m)
|
|||||||
if(cached_bnr_file == NULL && custom_bnr_file == NULL)
|
if(cached_bnr_file == NULL && custom_bnr_file == NULL)
|
||||||
fsop_WriteFile(cached_banner, CurrentBanner.GetBannerFile(), CurrentBanner.GetBannerFileSize());
|
fsop_WriteFile(cached_banner, CurrentBanner.GetBannerFile(), CurrentBanner.GetBannerFileSize());
|
||||||
|
|
||||||
|
//load and init banner
|
||||||
|
m_banner.LoadBanner(m->m_wbf1_font, m->m_wbf2_font);
|
||||||
|
|
||||||
//get sound from wii, channel, or custom banner and load it to play with the banner
|
//get sound from wii, channel, or custom banner and load it to play with the banner
|
||||||
u32 sndSize = 0;
|
u32 sndSize = 0;
|
||||||
m_banner.LoadBanner(m->m_wbf1_font, m->m_wbf2_font);
|
|
||||||
u8 *soundBin = CurrentBanner.GetFile("sound.bin", &sndSize);
|
u8 *soundBin = CurrentBanner.GetFile("sound.bin", &sndSize);
|
||||||
CurrentBanner.ClearBanner();
|
CurrentBanner.ClearBanner();
|
||||||
|
|
||||||
@ -2016,17 +2054,7 @@ u8 *GameSoundStack = NULL;
|
|||||||
u32 GameSoundSize = 0x10000; //64kb
|
u32 GameSoundSize = 0x10000; //64kb
|
||||||
void CMenu::_playGameSound(void)// starts banner and gamesound loading thread
|
void CMenu::_playGameSound(void)// starts banner and gamesound loading thread
|
||||||
{
|
{
|
||||||
if(NoGameID(CoverFlow.getHdr()->type))
|
_cleanupBanner(true);
|
||||||
{
|
|
||||||
if(_startVideo())
|
|
||||||
return;
|
|
||||||
if(m_zoom_banner == true)
|
|
||||||
{
|
|
||||||
m_zoom_banner = m_banner.ToggleZoom();
|
|
||||||
//m_cfg.setBool(_domainFromView(), "show_full_banner", m_zoom_banner);
|
|
||||||
currentMoviePos = normalMoviePos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_gamesound_changed = false;
|
m_gamesound_changed = false;
|
||||||
if(m_bnrSndVol == 0)
|
if(m_bnrSndVol == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -24,7 +24,7 @@ void CMenu::_gameinfo(void)
|
|||||||
while(!m_exit)
|
while(!m_exit)
|
||||||
{
|
{
|
||||||
_mainLoopCommon();
|
_mainLoopCommon();
|
||||||
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
|
if(BTN_HOME_PRESSED || BTN_B_PRESSED || !tdb_found)
|
||||||
break;
|
break;
|
||||||
if((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && page == 2 && synopsis_th > synopsis_h)
|
if((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && page == 2 && synopsis_th > synopsis_h)
|
||||||
{
|
{
|
||||||
@ -174,6 +174,8 @@ void CMenu::_showGameInfo(void)
|
|||||||
if(m_gameinfoLblControls[i] != -1 && i < cnt_controls)
|
if(m_gameinfoLblControls[i] != -1 && i < cnt_controls)
|
||||||
m_btnMgr.show(m_gameinfoLblControls[i]);
|
m_btnMgr.show(m_gameinfoLblControls[i]);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
error(_t("errgame18", L"No game info!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_initGameInfoMenu()
|
void CMenu::_initGameInfoMenu()
|
||||||
@ -246,6 +248,12 @@ void CMenu::_textGameInfo(void)
|
|||||||
gameinfo_Title_w.fromUTF8(TMP_Char);
|
gameinfo_Title_w.fromUTF8(TMP_Char);
|
||||||
m_btnMgr.setText(m_gameinfoLblTitle, gameinfo_Title_w);
|
m_btnMgr.setText(m_gameinfoLblTitle, gameinfo_Title_w);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tdb_found = false;
|
||||||
|
gametdb.CloseFile();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(gametdb.GetSynopsis(GameID, TMP_Char))
|
if(gametdb.GetSynopsis(GameID, TMP_Char))
|
||||||
{
|
{
|
||||||
gameinfo_Synopsis_w.fromUTF8(TMP_Char);
|
gameinfo_Synopsis_w.fromUTF8(TMP_Char);
|
||||||
|
@ -195,10 +195,10 @@ bool CMenu::_ExitTo(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool nkWiiflow = m_cfg.getBool("NEEK2O", "launchwiiflow", true);
|
//bool nkWiiflow = m_cfg.getBool("NEEK2O", "launchwiiflow", true);
|
||||||
if(nkWiiflow)
|
//if(nkWiiflow)
|
||||||
exitHandler(EXIT_TO_WFNK2O);
|
// exitHandler(EXIT_TO_WFNK2O);
|
||||||
else
|
//else
|
||||||
exitHandler(EXIT_TO_SMNK2O);
|
exitHandler(EXIT_TO_SMNK2O);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -126,7 +126,7 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
break;
|
break;
|
||||||
case COVERFLOW_CHANNEL:
|
case COVERFLOW_CHANNEL:
|
||||||
Msg = _t("main3", L"No titles found in ");
|
Msg = _t("main3", L"No titles found in ");
|
||||||
Pth = wstringEx(fmt("%s:/%s/%s", DeviceName[currentPartition], EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str()));
|
Pth = wstringEx(fmt("%s:/%s/%s", DeviceName[currentPartition], emu_nands_dir, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str()));
|
||||||
break;
|
break;
|
||||||
case COVERFLOW_HOMEBREW:
|
case COVERFLOW_HOMEBREW:
|
||||||
Msg = _t("main4", L"No apps found in ");
|
Msg = _t("main4", L"No apps found in ");
|
||||||
@ -235,8 +235,8 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_catStartPage = m_cfg.getInt("GENERAL", "cat_startpage", 1);
|
m_catStartPage = m_cfg.getInt("GENERAL", "cat_startpage", 1);
|
||||||
if(m_source_cnt == 1)
|
//if(m_source_cnt == 1)
|
||||||
m_cfg.remove("GENERAL", "cat_startpage");
|
// m_cfg.remove("GENERAL", "cat_startpage");
|
||||||
|
|
||||||
if(m_cfg.getBool("GENERAL", "update_cache", false))
|
if(m_cfg.getBool("GENERAL", "update_cache", false))
|
||||||
{
|
{
|
||||||
@ -307,6 +307,7 @@ int CMenu::main(void)
|
|||||||
if(BTN_HOME_PRESSED)
|
if(BTN_HOME_PRESSED)
|
||||||
{
|
{
|
||||||
_hideMain();
|
_hideMain();
|
||||||
|
/* sourceflow config menu */
|
||||||
if(m_sourceflow)
|
if(m_sourceflow)
|
||||||
{
|
{
|
||||||
_CfgSrc();
|
_CfgSrc();
|
||||||
@ -324,6 +325,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
_showMain();
|
_showMain();
|
||||||
}
|
}
|
||||||
|
/* homebrew flow config menu */
|
||||||
else if(m_current_view == COVERFLOW_HOMEBREW)
|
else if(m_current_view == COVERFLOW_HOMEBREW)
|
||||||
{
|
{
|
||||||
_CfgHB();
|
_CfgHB();
|
||||||
@ -334,10 +336,11 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
_showMain();
|
_showMain();
|
||||||
}
|
}
|
||||||
|
/* Home menu */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(_Home()) //home menu
|
if(_Home())
|
||||||
break;
|
break;// exit wiiflow
|
||||||
if(BTN_B_HELD)
|
if(BTN_B_HELD)
|
||||||
bUsed = true;
|
bUsed = true;
|
||||||
_showMain();
|
_showMain();
|
||||||
@ -351,15 +354,17 @@ int CMenu::main(void)
|
|||||||
CoverFlow.pageDown();
|
CoverFlow.pageDown();
|
||||||
else if(m_btnMgr.selected(m_mainBtnHome))
|
else if(m_btnMgr.selected(m_mainBtnHome))
|
||||||
{
|
{
|
||||||
|
/* home menu via main menu button */
|
||||||
_hideMain();
|
_hideMain();
|
||||||
if(_Home()) //home menu
|
if(_Home())
|
||||||
break;
|
break;// exit wiiflow
|
||||||
if(BTN_B_HELD)
|
if(BTN_B_HELD)
|
||||||
bUsed = true;
|
bUsed = true;
|
||||||
_showMain();
|
_showMain();
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnWii) || m_btnMgr.selected(m_mainBtnGamecube) || m_btnMgr.selected(m_mainBtnPlugin))
|
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnWii) || m_btnMgr.selected(m_mainBtnGamecube) || m_btnMgr.selected(m_mainBtnPlugin))
|
||||||
{
|
{
|
||||||
|
/* change source via view button on main menu */
|
||||||
if(m_current_view == COVERFLOW_WII)
|
if(m_current_view == COVERFLOW_WII)
|
||||||
m_current_view = show_gamecube ? COVERFLOW_GAMECUBE : (show_channel ? COVERFLOW_CHANNEL : (show_plugin ? COVERFLOW_PLUGIN : COVERFLOW_WII));
|
m_current_view = show_gamecube ? COVERFLOW_GAMECUBE : (show_channel ? COVERFLOW_CHANNEL : (show_plugin ? COVERFLOW_PLUGIN : COVERFLOW_WII));
|
||||||
else if(m_current_view == COVERFLOW_GAMECUBE)
|
else if(m_current_view == COVERFLOW_GAMECUBE)
|
||||||
@ -375,10 +380,12 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnConfig))
|
else if(m_btnMgr.selected(m_mainBtnConfig))
|
||||||
{
|
{
|
||||||
|
/* main menu global settings */
|
||||||
_hideMain();
|
_hideMain();
|
||||||
_config(1);
|
_config(1);
|
||||||
if(strcmp(prevTheme, m_cfg.getString("GENERAL", "theme").c_str()) != 0)
|
if(strcmp(prevTheme, m_cfg.getString("GENERAL", "theme").c_str()) != 0)
|
||||||
{
|
{
|
||||||
|
/* new theme - exit wiiflow and reload */
|
||||||
m_reload = true;
|
m_reload = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -388,6 +395,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnHomebrew))
|
else if(m_btnMgr.selected(m_mainBtnHomebrew))
|
||||||
{
|
{
|
||||||
|
/* launch homebrew flow */
|
||||||
if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false))
|
if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false))
|
||||||
{
|
{
|
||||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||||
@ -404,9 +412,8 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnDVD))
|
else if(m_btnMgr.selected(m_mainBtnDVD))
|
||||||
{
|
{
|
||||||
/* Cleanup for Disc Booter */
|
/* Boot DVD in drive */
|
||||||
_hideMain(true);
|
_hideMain(true);
|
||||||
//CoverFlow.clear();
|
|
||||||
/* Create Fake Header */
|
/* Create Fake Header */
|
||||||
dir_discHdr hdr;
|
dir_discHdr hdr;
|
||||||
memset(&hdr, 0, sizeof(dir_discHdr));
|
memset(&hdr, 0, sizeof(dir_discHdr));
|
||||||
@ -419,13 +426,14 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff))
|
else if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff))
|
||||||
{
|
{
|
||||||
|
/* switch favorite games only on/off */
|
||||||
m_favorites = !m_favorites;
|
m_favorites = !m_favorites;
|
||||||
m_cfg.setBool(_domainFromView(), "favorites", m_favorites);
|
m_cfg.setBool(_domainFromView(), "favorites", m_favorites);
|
||||||
_initCF();
|
_initCF();
|
||||||
}
|
}
|
||||||
/* select game cover or sourceflow cover */
|
|
||||||
else if(!CoverFlow.empty() && CoverFlow.select())
|
else if(!CoverFlow.empty() && CoverFlow.select())
|
||||||
{
|
{
|
||||||
|
/* select game cover or sourceflow cover */
|
||||||
_hideMain();
|
_hideMain();
|
||||||
if(m_sourceflow)
|
if(m_sourceflow)
|
||||||
{
|
{
|
||||||
@ -440,10 +448,14 @@ int CMenu::main(void)
|
|||||||
break;
|
break;
|
||||||
if(BTN_B_HELD)
|
if(BTN_B_HELD)
|
||||||
bUsed = true;
|
bUsed = true;
|
||||||
CoverFlow.cancel();
|
|
||||||
if(m_refreshGameList)
|
if(m_refreshGameList)
|
||||||
//_initCF();
|
{
|
||||||
_showCF(m_refreshGameList);
|
/* if changes were made to favorites, parental lock, or categories */
|
||||||
|
_initCF();
|
||||||
|
m_refreshGameList = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CoverFlow.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -734,6 +746,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
Sys_SetNeekPath(ReturnPath);
|
Sys_SetNeekPath(ReturnPath);
|
||||||
}
|
}
|
||||||
|
cleanup();
|
||||||
//gprintf("Saving configuration files\n");
|
//gprintf("Saving configuration files\n");
|
||||||
m_gcfg1.save(true);// save configs on power off or exit wiiflow
|
m_gcfg1.save(true);// save configs on power off or exit wiiflow
|
||||||
m_gcfg2.save(true);
|
m_gcfg2.save(true);
|
||||||
|
@ -114,7 +114,7 @@ void CMenu::_checkEmuNandSettings(bool savesnand)
|
|||||||
emuNand = m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str();
|
emuNand = m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str();
|
||||||
emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition", 0);
|
emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition", 0);
|
||||||
}
|
}
|
||||||
const char *tmpPath = fmt("/%s/%s", EMU_NANDS_DIR, emuNand);
|
const char *tmpPath = fmt("/%s/%s", emu_nands_dir, emuNand);
|
||||||
/* check if partition is FAT && emuNAND directory exist*/
|
/* check if partition is FAT && emuNAND directory exist*/
|
||||||
if(!DeviceHandle.PartitionUsableForNandEmu(emuPart) || !_TestEmuNand(emuPart, tmpPath, false))
|
if(!DeviceHandle.PartitionUsableForNandEmu(emuPart) || !_TestEmuNand(emuPart, tmpPath, false))
|
||||||
{
|
{
|
||||||
@ -138,12 +138,12 @@ int CMenu::_FindEmuPart(string &emuPath, bool skipchecks, bool savesnand)
|
|||||||
if(savesnand)
|
if(savesnand)
|
||||||
{
|
{
|
||||||
emuPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
emuPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||||
tmpPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
tmpPath = fmt("/%s/%s", emu_nands_dir, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
|
emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
|
||||||
tmpPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str());
|
tmpPath = fmt("/%s/%s", emu_nands_dir, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str());
|
||||||
}
|
}
|
||||||
if(!DeviceHandle.PartitionUsableForNandEmu(emuPart))
|
if(!DeviceHandle.PartitionUsableForNandEmu(emuPart))
|
||||||
return -1;
|
return -1;
|
||||||
@ -211,7 +211,7 @@ bool CMenu::_checkSave(string id, bool nand)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int emuPartition = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
int emuPartition = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||||
const char *emuPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
const char *emuPath = fmt("/%s/%s", emu_nands_dir, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
||||||
if(emuPartition < 0 || emuPath == NULL)
|
if(emuPartition < 0 || emuPath == NULL)
|
||||||
return false;
|
return false;
|
||||||
struct stat fstat;
|
struct stat fstat;
|
||||||
@ -435,7 +435,7 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
string savesNand = m_cfg.getString(WII_DOMAIN, "current_save_emunand");
|
string savesNand = m_cfg.getString(WII_DOMAIN, "current_save_emunand");
|
||||||
int savesPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
int savesPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||||
|
|
||||||
_listEmuNands(fmt("%s:/%s", DeviceName[emuPart], EMU_NANDS_DIR), emuNands);
|
_listEmuNands(fmt("%s:/%s", DeviceName[emuPart], emu_nands_dir), emuNands);
|
||||||
int curEmuNand = 0;
|
int curEmuNand = 0;
|
||||||
for(u8 i = 0; i < emuNands.size(); ++i)
|
for(u8 i = 0; i < emuNands.size(); ++i)
|
||||||
{
|
{
|
||||||
@ -446,7 +446,7 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_listEmuNands(fmt("%s:/%s", DeviceName[savesPart], EMU_NANDS_DIR), savesNands);
|
_listEmuNands(fmt("%s:/%s", DeviceName[savesPart], emu_nands_dir), savesNands);
|
||||||
int curSavesNand = 0;
|
int curSavesNand = 0;
|
||||||
for(u8 i = 0; i < savesNands.size(); ++i)
|
for(u8 i = 0; i < savesNands.size(); ++i)
|
||||||
{
|
{
|
||||||
@ -623,7 +623,7 @@ int CMenu::_FlashSave(string gameId)
|
|||||||
{
|
{
|
||||||
int emuPartition = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
int emuPartition = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||||
char basepath[MAX_FAT_PATH];
|
char basepath[MAX_FAT_PATH];
|
||||||
snprintf(basepath, sizeof(basepath), "%s:/%s/%s", DeviceName[emuPartition], EMU_NANDS_DIR, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
snprintf(basepath, sizeof(basepath), "%s:/%s/%s", DeviceName[emuPartition], emu_nands_dir, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
||||||
|
|
||||||
if(!_checkSave(gameId, false))// if save not on emu nand
|
if(!_checkSave(gameId, false))// if save not on emu nand
|
||||||
return 0;
|
return 0;
|
||||||
@ -751,7 +751,7 @@ int CMenu::_AutoExtractSave(string gameId)// called from wii game config menu or
|
|||||||
else if(BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnDisable))//create new save
|
else if(BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnDisable))//create new save
|
||||||
{
|
{
|
||||||
int emuPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
int emuPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||||
const char *emuPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
const char *emuPath = fmt("/%s/%s", emu_nands_dir, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
||||||
char basepath[MAX_FAT_PATH];
|
char basepath[MAX_FAT_PATH];
|
||||||
snprintf(basepath, sizeof(basepath), "%s:%s", DeviceName[emuPart], emuPath);
|
snprintf(basepath, sizeof(basepath), "%s:%s", DeviceName[emuPart], emuPath);
|
||||||
NandHandle.CreatePath("%s/import", basepath);
|
NandHandle.CreatePath("%s/import", basepath);
|
||||||
|
@ -147,18 +147,20 @@ void CMenu::_PluginSettings()
|
|||||||
m_refreshGameList = true;
|
m_refreshGameList = true;
|
||||||
if(m_current_view != COVERFLOW_PLUGIN)
|
if(m_current_view != COVERFLOW_PLUGIN)
|
||||||
{
|
{
|
||||||
|
/* clear all plugins */
|
||||||
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
||||||
m_plugin.SetEnablePlugin(m_cfg, j, 1);
|
m_plugin.SetEnablePlugin(m_cfg, j, 1);
|
||||||
m_current_view = COVERFLOW_PLUGIN;
|
m_current_view = COVERFLOW_PLUGIN;
|
||||||
}
|
}
|
||||||
if(i == 0)
|
if(i == 0)// all button to clear all or set all
|
||||||
{
|
{
|
||||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);// get enabled plugins count
|
||||||
|
// if all clear then set(2) them else clear(1) them all
|
||||||
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
||||||
m_plugin.SetEnablePlugin(m_cfg, j, (enabledPluginsCount == 0) ? 2 : 1);
|
m_plugin.SetEnablePlugin(m_cfg, j, (enabledPluginsCount == 0) ? 2 : 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_plugin.SetEnablePlugin(m_cfg, i+IteratorHelp-1);
|
m_plugin.SetEnablePlugin(m_cfg, i+IteratorHelp-1);// switch plugin from off to on or vice versa
|
||||||
_updatePluginCheckboxes();
|
_updatePluginCheckboxes();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -171,6 +173,7 @@ void CMenu::_PluginSettings()
|
|||||||
{
|
{
|
||||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||||
m_source_cnt = 1;
|
m_source_cnt = 1;
|
||||||
|
m_catStartPage = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_current_view = m_cfg.getUInt("GENERAL", "sources");
|
m_current_view = m_cfg.getUInt("GENERAL", "sources");
|
||||||
|
@ -438,7 +438,7 @@ void CMenu::_Wad(const char *wad_path)
|
|||||||
vector<string> emuNands;
|
vector<string> emuNands;
|
||||||
string emuNand = m_cfg.getString(CHANNEL_DOMAIN, "current_emunand");
|
string emuNand = m_cfg.getString(CHANNEL_DOMAIN, "current_emunand");
|
||||||
int emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
|
int emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
|
||||||
_listEmuNands(fmt("%s:/%s", DeviceName[emuPart], EMU_NANDS_DIR), emuNands);
|
_listEmuNands(fmt("%s:/%s", DeviceName[emuPart], emu_nands_dir), emuNands);
|
||||||
int curEmuNand = 0;
|
int curEmuNand = 0;
|
||||||
for(u8 i = 0; i < emuNands.size(); ++i)
|
for(u8 i = 0; i < emuNands.size(); ++i)
|
||||||
{
|
{
|
||||||
@ -476,7 +476,7 @@ void CMenu::_Wad(const char *wad_path)
|
|||||||
/* mios is real nand, chans are emu */
|
/* mios is real nand, chans are emu */
|
||||||
if(mios == false)
|
if(mios == false)
|
||||||
{
|
{
|
||||||
const char *emu_char = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str());
|
const char *emu_char = fmt("/%s/%s", emu_nands_dir, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand", "default").c_str());
|
||||||
NandHandle.SetPaths(emu_char, DeviceName[currentPartition]);
|
NandHandle.SetPaths(emu_char, DeviceName[currentPartition]);
|
||||||
}
|
}
|
||||||
_start_pThread();
|
_start_pThread();
|
||||||
|
@ -119,8 +119,7 @@ cfgg44=Video Deflicker
|
|||||||
cfgg45=Private Server
|
cfgg45=Private Server
|
||||||
cfgg46=WiiU Widescreen
|
cfgg46=WiiU Widescreen
|
||||||
cfgg47=Emulated MemCard
|
cfgg47=Emulated MemCard
|
||||||
cfgg48=EmuNAND not on USB1!
|
cfgg48=Triforce Arcade Mode
|
||||||
cfgg49=Neek2o Not Found!
|
|
||||||
cfgg50=No save to extract!
|
cfgg50=No save to extract!
|
||||||
cfgg51=No save to flash to real NAND!
|
cfgg51=No save to flash to real NAND!
|
||||||
cfgg52=Wiimote CC Rumble
|
cfgg52=Wiimote CC Rumble
|
||||||
@ -290,6 +289,7 @@ errgame14=app_booter.bin not found!
|
|||||||
errgame15=WiiFlow locked! Unlock WiiFlow to use this feature.
|
errgame15=WiiFlow locked! Unlock WiiFlow to use this feature.
|
||||||
errgame16=Not available for plugin games!
|
errgame16=Not available for plugin games!
|
||||||
errgame17=Can not delete real NAND Channels!
|
errgame17=Can not delete real NAND Channels!
|
||||||
|
errgame18=No game info!
|
||||||
errneek1=Cannot launch neek2o. Verify your neek2o setup
|
errneek1=Cannot launch neek2o. Verify your neek2o setup
|
||||||
errsource1=Homebrew locked!
|
errsource1=Homebrew locked!
|
||||||
errsource2=Homebrew and multisource not allowed!
|
errsource2=Homebrew and multisource not allowed!
|
||||||
|
Loading…
Reference in New Issue
Block a user