2012-01-21 21:57:41 +01:00
|
|
|
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "menu.hpp"
|
|
|
|
#include "banner/BannerWindow.hpp"
|
|
|
|
#include "gc/gcdisc.hpp"
|
|
|
|
#include "gui/WiiMovie.hpp"
|
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;
|
2017-09-22 00:03:41 +02:00
|
|
|
bool m_banner_loaded = 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;
|
2019-10-07 19:15:41 +02:00
|
|
|
s16 m_gameLblSnapBg;
|
2019-10-09 22:12:42 +02:00
|
|
|
s16 m_gameLblSnapFrame;
|
|
|
|
s16 m_gameLblBannerFrame;
|
2012-07-03 18:26:49 +02:00
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2018-07-16 15:08:45 +02:00
|
|
|
void CMenu::_extractBnr(const dir_discHdr *hdr)
|
|
|
|
{
|
|
|
|
u32 size = 0;
|
|
|
|
DeviceHandle.OpenWBFS(currentPartition);
|
|
|
|
wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) &hdr->id, (char *) hdr->path);
|
|
|
|
if(disc != NULL)
|
|
|
|
{
|
|
|
|
void *bnr = NULL;
|
|
|
|
size = wbfs_extract_file(disc, (char*)"opening.bnr", &bnr);
|
|
|
|
if(size > 0)
|
|
|
|
CurrentBanner.SetBanner((u8*)bnr, size, false, true);
|
|
|
|
WBFS_CloseDisc(disc);
|
|
|
|
}
|
|
|
|
WBFS_Close();
|
|
|
|
}
|
|
|
|
|
2017-05-15 19:50:24 +02:00
|
|
|
void CMenu::_setCurrentItem(const dir_discHdr *hdr)
|
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
const char *fn_id = CoverFlow.getFilenameId(hdr);
|
2018-12-02 01:39:33 +01:00
|
|
|
if(m_current_view == COVERFLOW_PLUGIN)
|
|
|
|
{
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
|
|
|
strncpy(m_plugin.PluginMagicWord, fmt("%08x", hdr->settings[0]), 8);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(hdr->type == TYPE_WII_GAME)
|
2022-12-10 22:10:29 +01:00
|
|
|
strncpy(m_plugin.PluginMagicWord, WII_PMAGIC, 9);
|
2018-12-02 01:39:33 +01:00
|
|
|
else if(hdr->type == TYPE_GC_GAME)
|
2022-12-10 22:10:29 +01:00
|
|
|
strncpy(m_plugin.PluginMagicWord, GC_PMAGIC, 9);
|
2019-02-11 21:55:44 +01:00
|
|
|
else if(hdr->type == TYPE_CHANNEL)
|
2022-12-10 22:10:29 +01:00
|
|
|
strncpy(m_plugin.PluginMagicWord, NAND_PMAGIC, 9);
|
2019-02-11 21:55:44 +01:00
|
|
|
else if(hdr->type == TYPE_EMUCHANNEL)
|
2022-12-10 22:10:29 +01:00
|
|
|
strncpy(m_plugin.PluginMagicWord, ENAND_PMAGIC, 9);
|
2019-02-11 21:55:44 +01:00
|
|
|
else //HOMEBREW
|
2022-12-10 22:10:29 +01:00
|
|
|
strncpy(m_plugin.PluginMagicWord, HB_PMAGIC, 9);
|
2018-12-02 01:39:33 +01:00
|
|
|
}
|
|
|
|
m_cfg.setString(PLUGIN_DOMAIN, "cur_magic", m_plugin.PluginMagicWord);
|
2022-01-14 22:10:56 +01:00
|
|
|
m_cfg.setString("plugin_item", m_plugin.PluginMagicWord, fn_id);
|
2018-12-02 01:39:33 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
m_cfg.setString(_domainFromView(), "current_item", fn_id);
|
2018-12-02 01:39:33 +01:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
}
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
void CMenu::_hideGame(bool instant)
|
|
|
|
{
|
2014-03-18 03:39:42 +01:00
|
|
|
_cleanupVideo();
|
2018-10-16 01:43:49 +02:00
|
|
|
m_fa.unload();
|
|
|
|
CoverFlow.showCover();
|
|
|
|
|
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);
|
2019-03-04 21:29:46 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnCategories, instant);
|
2019-10-17 01:22:40 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapBg, instant);
|
2019-09-30 18:07:04 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnap, instant);
|
|
|
|
m_btnMgr.hide(m_gameLblOverlay, instant);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapFrame, instant);
|
|
|
|
m_btnMgr.hide(m_gameLblBannerFrame, 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)
|
|
|
|
{
|
2018-10-17 20:01:54 +02:00
|
|
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
2019-09-30 18:07:04 +02:00
|
|
|
const char *FanartPath = NULL;
|
2018-10-17 16:00:01 +02:00
|
|
|
|
2022-01-14 22:10:56 +01:00
|
|
|
/* set fanart path */
|
|
|
|
if(GameHdr->type == TYPE_PLUGIN)
|
|
|
|
FanartPath = fmt("%s/%s", m_fanartDir.c_str(), m_plugin.GetCoverFolderName(GameHdr->settings[0]));
|
2018-10-17 16:00:01 +02:00
|
|
|
else
|
2022-01-14 22:10:56 +01:00
|
|
|
FanartPath = fmt("%s", m_fanartDir.c_str());
|
|
|
|
|
|
|
|
/* Load fanart config if available */
|
|
|
|
if(m_fa.load(m_cfg, FanartPath, GameHdr))
|
2018-10-16 01:43:49 +02:00
|
|
|
{
|
|
|
|
const TexData *bg = NULL;
|
|
|
|
const TexData *bglq = NULL;
|
|
|
|
m_fa.getBackground(bg, bglq);
|
2019-02-17 22:35:36 +01:00
|
|
|
_setBg(*bg, *bglq);
|
2018-10-25 00:05:02 +02:00
|
|
|
CoverFlow.hideCover();
|
2018-10-16 01:43:49 +02:00
|
|
|
}
|
2022-01-14 22:10:56 +01:00
|
|
|
else // no fanart config so we show the cover and game menu background
|
2019-02-17 22:35:36 +01:00
|
|
|
{
|
|
|
|
CoverFlow.showCover();
|
2019-11-24 00:54:38 +01:00
|
|
|
if(customBg)
|
|
|
|
_setBg(m_mainCustomBg[curCustBg], m_mainCustomBg[curCustBg]);
|
|
|
|
else
|
|
|
|
_setBg(m_gameBg, m_gameBgLQ);
|
2019-02-17 22:35:36 +01: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();
|
2017-04-18 01:23:50 +02:00
|
|
|
_stopGameSoundThread();// stop banner and gamesound loading
|
2014-03-18 03:39:42 +01:00
|
|
|
m_banner.DeleteBanner(gamechange);
|
|
|
|
//movie
|
|
|
|
_cleanupVideo();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_cleanupVideo()
|
|
|
|
{
|
|
|
|
m_video_playing = false;
|
|
|
|
movie.DeInit();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CMenu::_startVideo()
|
|
|
|
{
|
2016-12-01 01:05:39 +01:00
|
|
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
2022-01-14 22:10:56 +01:00
|
|
|
const char *videoPath = NULL;
|
|
|
|
const char *THP_Path = NULL;
|
2019-03-18 19:39:28 +01:00
|
|
|
|
2022-01-14 22:10:56 +01:00
|
|
|
if(GameHdr->type == TYPE_PLUGIN)
|
2014-03-22 22:32:40 +01:00
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
const char *fn = CoverFlow.getFilenameId(GameHdr);//title.ext
|
|
|
|
const char *coverDir = m_plugin.GetCoverFolderName(GameHdr->settings[0]);
|
|
|
|
videoPath = fmt("%s/%s/%s", m_videoDir.c_str(), coverDir, fn);
|
|
|
|
THP_Path = fmt("%s.thp", videoPath);
|
|
|
|
if(!fsop_FileExist(THP_Path))
|
2014-05-25 22:54:39 +02:00
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
if(strrchr(videoPath, '.') != NULL)
|
|
|
|
{
|
|
|
|
*strrchr(videoPath, '.') = '\0';
|
|
|
|
THP_Path = fmt("%s.thp", videoPath);
|
|
|
|
}
|
|
|
|
if(!fsop_FileExist(THP_Path))//default video for all games of this plugin
|
|
|
|
{
|
|
|
|
videoPath = fmt("%s/%s", m_videoDir.c_str(), m_plugin.PluginMagicWord);// use magic number as the filename
|
|
|
|
THP_Path = fmt("%s.thp", videoPath);
|
|
|
|
}
|
2014-05-25 22:54:39 +02:00
|
|
|
}
|
2022-01-14 22:10:56 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
videoPath = fmt("%s/%s.3", m_videoDir.c_str(), GameHdr->id);// try id3 first
|
|
|
|
THP_Path = fmt("%s.thp", videoPath);
|
|
|
|
if(!fsop_FileExist(THP_Path))
|
2014-05-25 22:54:39 +02:00
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
videoPath = fmt("%s/%s", m_videoDir.c_str(), 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();
|
2017-04-18 01:23:50 +02:00
|
|
|
_stopGameSoundThread();
|
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
|
|
|
{
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = false;
|
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));
|
2017-05-15 19:50:24 +02:00
|
|
|
_setCurrentItem(hdr);
|
2016-06-10 01:02:40 +02:00
|
|
|
|
2023-01-09 00:25:45 +01:00
|
|
|
char gcfg1Key[74];
|
|
|
|
char gameTitle[64];
|
|
|
|
memset(gcfg1Key, 0, sizeof(gcfg1Key));
|
|
|
|
memset(gameTitle, 0, sizeof(gameTitle));
|
2019-02-11 21:55:44 +01:00
|
|
|
|
|
|
|
if(hdr->type == TYPE_HOMEBREW)
|
2023-01-09 00:25:45 +01:00
|
|
|
wcstombs(gcfg1Key, hdr->title, 63);// uses title which is the folder name in apps.
|
2019-02-11 21:55:44 +01:00
|
|
|
else if(hdr->type == TYPE_PLUGIN)
|
-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", hdr->settings[0]), 8);
|
2023-01-09 00:25:45 +01:00
|
|
|
|
|
|
|
// if game has an id from the plugin database we use the new method which uses platform name/id
|
|
|
|
if(strcmp(hdr->id, "PLUGIN") != 0 && !m_platform.getString("PLUGINS", m_plugin.PluginMagicWord, "").empty())
|
|
|
|
strncpy(gcfg1Key, fmt("%s/%s", m_platform.getString("PLUGINS", m_plugin.PluginMagicWord).c_str(), hdr->id), 73);
|
|
|
|
else // old pre 5.4.4 method which uses plugin magic/title of game
|
|
|
|
{
|
|
|
|
if(strrchr(hdr->path, '/') != NULL)
|
|
|
|
wcstombs(gameTitle, hdr->title, 63);
|
|
|
|
else
|
|
|
|
memcpy(gameTitle, hdr->path, 63);// scummvm
|
|
|
|
strncpy(gcfg1Key, fmt("%s/%s", m_plugin.PluginMagicWord, gameTitle), 73);
|
|
|
|
}
|
-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
|
|
|
}
|
2023-01-09 00:25:45 +01:00
|
|
|
else // wii, gc, channels
|
|
|
|
strcpy(gcfg1Key, hdr->id);
|
-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
|
|
|
|
2014-03-18 03:39:42 +01:00
|
|
|
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
2017-05-15 19:50:24 +02:00
|
|
|
|
2014-03-18 03:39:42 +01:00
|
|
|
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
|
|
|
|
2017-05-15 19:50:24 +02:00
|
|
|
if(m_banner.GetInGameSettings())
|
|
|
|
m_banner.ToggleGameSettings();
|
|
|
|
m_gameSelected = true;
|
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
|
|
|
{
|
2018-10-25 00:05:02 +02:00
|
|
|
if(m_fa.isLoaded() && m_fa.isAnimationComplete())
|
|
|
|
{
|
|
|
|
if(m_fa.noLoop())
|
|
|
|
{
|
|
|
|
m_fa.unload();
|
|
|
|
CoverFlow.showCover();
|
2019-11-24 00:54:38 +01:00
|
|
|
if(customBg)
|
|
|
|
_setBg(m_mainCustomBg[curCustBg], m_mainCustomBg[curCustBg]);
|
|
|
|
else
|
|
|
|
_setBg(m_gameBg, m_gameBgLQ);
|
2018-10-25 00:05:02 +02:00
|
|
|
}
|
|
|
|
else //loop fanart
|
|
|
|
m_fa.reset();
|
|
|
|
}
|
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)
|
2018-10-25 00:05:02 +02:00
|
|
|
_showGame();// this also starts fanart with unloading previous fanart.
|
2016-04-13 16:16:41 +02:00
|
|
|
|
2016-04-13 17:52:33 +02:00
|
|
|
if(!launch)
|
|
|
|
_mainLoopCommon(true);
|
2017-04-18 01:23:50 +02:00
|
|
|
|
2012-06-01 07:34:52 +02:00
|
|
|
if(startGameSound == 0)
|
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 */
|
2017-05-15 19:50:24 +02:00
|
|
|
if(coverFlipped)
|
2016-06-10 01:02:40 +02:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
/* exit game menu */
|
|
|
|
if(BTN_HOME_PRESSED)
|
2012-05-04 21:31:05 +02:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
_cleanupBanner();// also cleans up trailer movie including trailer sound
|
|
|
|
break;
|
2012-05-04 21:31:05 +02:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
else if(BTN_B_PRESSED)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
/* de flip cover */
|
|
|
|
if(coverFlipped)
|
2016-06-22 21:34:58 +02:00
|
|
|
{
|
|
|
|
CoverFlow.flip();
|
|
|
|
coverFlipped = false;
|
2017-05-15 19:50:24 +02:00
|
|
|
m_banner.SetShowBanner(true);
|
|
|
|
}
|
|
|
|
/* exit game selected menu */
|
2016-06-22 21:34:58 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
_cleanupBanner();
|
|
|
|
break;
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
/* display game info screen */
|
2018-12-30 23:00:51 +01:00
|
|
|
else if(BTN_PLUS_PRESSED && hdr->type != TYPE_HOMEBREW && hdr->type != TYPE_SOURCE && !coverFlipped && !m_video_playing)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2019-03-18 19:39:28 +01:00
|
|
|
_hideGame();
|
2017-05-15 19:50:24 +02:00
|
|
|
m_banner.SetShowBanner(false);
|
2020-02-02 21:25:05 +01:00
|
|
|
m_gameSelected = false;
|
|
|
|
launch = _gameinfo();
|
|
|
|
m_gameSelected = true;
|
2019-03-18 19:39:28 +01:00
|
|
|
_showGame();
|
2020-02-02 21:25:05 +01:00
|
|
|
if(m_newGame)
|
|
|
|
startGameSound = -10;
|
2017-05-15 19:50:24 +02:00
|
|
|
m_banner.SetShowBanner(true);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
/* play or stop a trailer video */
|
|
|
|
else if(BTN_MINUS_PRESSED && !coverFlipped)
|
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
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
/* switch coverflow layout */
|
2019-03-06 19:52:12 +01:00
|
|
|
else if((BTN_1_PRESSED || BTN_2_PRESSED) && !CFLocked && !coverFlipped && !m_video_playing)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2019-02-18 21:40:07 +01:00
|
|
|
u32 curPos = CoverFlow._currentPos();
|
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;
|
2019-02-18 21:40:07 +01:00
|
|
|
_setCFVersion(cfVersion);
|
2012-01-21 21:57:41 +01:00
|
|
|
_loadCFLayout(cfVersion);
|
2019-02-18 21:40:07 +01:00
|
|
|
CoverFlow._setCurPos(curPos);
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
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
|
|
|
{
|
2019-02-11 21:55:44 +01:00
|
|
|
if(m_fa.isLoaded() && ShowPointer())// stop and unload fanart
|
2018-10-25 00:05:02 +02:00
|
|
|
{
|
|
|
|
m_fa.unload();
|
|
|
|
CoverFlow.showCover();
|
2019-11-24 01:25:49 +01:00
|
|
|
if(customBg)
|
|
|
|
_setBg(m_mainCustomBg[curCustBg], m_mainCustomBg[curCustBg]);
|
|
|
|
else
|
|
|
|
_setBg(m_gameBg, m_gameBgLQ);
|
2018-10-25 00:05:02 +02:00
|
|
|
continue;
|
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
/* delete button */
|
2020-04-08 19:06:21 +02:00
|
|
|
else 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)
|
2022-07-14 00:11:44 +02:00
|
|
|
_error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
2016-12-01 01:05:39 +01:00
|
|
|
else if(hdr->type == TYPE_CHANNEL)
|
2022-07-14 00:11:44 +02:00
|
|
|
_error(_t("errgame17", L"Can not delete real NAND Channels!"));
|
2020-04-08 19:06:21 +02:00
|
|
|
else if(hdr->type == TYPE_HOMEBREW)
|
|
|
|
{
|
|
|
|
bool smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
|
|
|
|
const char *gameNameOrID = CoverFlow.getFilenameId(hdr);
|
|
|
|
if(smallBox)
|
|
|
|
fsop_deleteFile(fmt("%s/homebrew/%s_small.wfc", m_cacheDir.c_str(), gameNameOrID));
|
|
|
|
else
|
|
|
|
fsop_deleteFile(fmt("%s/homebrew/%s.wfc", m_cacheDir.c_str(), gameNameOrID));
|
|
|
|
_initCF();
|
|
|
|
CoverFlow.select();
|
|
|
|
CoverFlow.applySettings();
|
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
else /* delete wii, gamecube, emunand game or plugin rom */
|
-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(_wbfsOp(WO_REMOVE_GAME))
|
2016-06-10 01:02:40 +02:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
m_refreshGameList = false;
|
|
|
|
_setCurrentItem(CoverFlow.getNextHdr());
|
-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();
|
2017-05-15 19:50:24 +02:00
|
|
|
_loadList();
|
|
|
|
_initCF();
|
|
|
|
CoverFlow.select();
|
|
|
|
CoverFlow.applySettings();
|
|
|
|
startGameSound = -10;
|
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);
|
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);
|
2022-07-14 00:11:44 +02:00
|
|
|
_error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
2016-12-01 01:05:39 +01:00
|
|
|
m_banner.SetShowBanner(true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
// the mainloop handles drawing banner while in settings
|
|
|
|
m_banner.ToggleZoom();//zoom to full
|
|
|
|
m_banner.ToggleGameSettings();// dim brightness
|
2022-08-05 22:04:05 +02:00
|
|
|
if(hdr->type == TYPE_GC_GAME)
|
|
|
|
_configGCGame(hdr);
|
|
|
|
else
|
|
|
|
_configGame(hdr);
|
2017-05-15 19:50:24 +02:00
|
|
|
m_banner.ToggleGameSettings();//reset brightness
|
|
|
|
m_banner.ToggleZoom();//de zoom to small
|
2016-12-01 01:05:39 +01:00
|
|
|
}
|
2016-11-07 16:06:00 +01:00
|
|
|
_showGame();
|
|
|
|
}
|
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)
|
2023-01-09 00:25:45 +01:00
|
|
|
{
|
|
|
|
m_gcfg1.setBool("FAVORITES_PLUGINS", gcfg1Key, !m_gcfg1.getBool("FAVORITES_PLUGINS", gcfg1Key, false));
|
|
|
|
if(!m_gcfg1.getBool("FAVORITES_PLUGINS", gcfg1Key, false))
|
|
|
|
m_gcfg1.remove("FAVORITES_PLUGINS", gcfg1Key);
|
|
|
|
}
|
-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
|
2023-01-09 00:25:45 +01:00
|
|
|
{
|
|
|
|
m_gcfg1.setBool("FAVORITES", gcfg1Key, !m_gcfg1.getBool("FAVORITES", gcfg1Key, false));
|
|
|
|
if(!m_gcfg1.getBool("FAVORITES", gcfg1Key, false))
|
|
|
|
m_gcfg1.remove("FAVORITES", gcfg1Key);
|
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
if(m_favorites)
|
|
|
|
m_refreshGameList = true;
|
-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
|
|
|
}
|
2019-03-04 21:29:46 +01:00
|
|
|
else if(m_btnMgr.selected(m_gameBtnCategories))
|
-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);
|
2022-07-14 00:11:44 +02:00
|
|
|
_error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
2016-12-01 01:05:39 +01:00
|
|
|
m_banner.SetShowBanner(true);
|
|
|
|
}
|
-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
|
|
|
{
|
2019-03-04 21:29:46 +01:00
|
|
|
_hideGame();
|
|
|
|
// 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
|
2016-12-01 01:05:39 +01:00
|
|
|
}
|
2019-03-04 21:29:46 +01:00
|
|
|
_showGame();
|
|
|
|
if(m_newGame)
|
|
|
|
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
|
|
|
}
|
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;
|
|
|
|
}
|
2017-09-22 00:03:41 +02:00
|
|
|
else if(m_btnMgr.selected(m_gameBtnToggle) || m_btnMgr.selected(m_gameBtnToggleFull))
|
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);
|
|
|
|
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
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
else if(launch || m_btnMgr.selected(m_gameBtnPlay) || m_btnMgr.selected(m_gameBtnPlayFull) ||
|
|
|
|
(!ShowPointer() && !m_video_playing && !coverFlipped))
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
_hideGame();
|
2018-08-01 14:27:12 +02:00
|
|
|
if(isWiiVC && (hdr->type == TYPE_WII_GAME || hdr->type == TYPE_EMUCHANNEL))
|
2013-01-15 14:54:33 +01:00
|
|
|
{
|
2022-07-14 00:11:44 +02:00
|
|
|
_error(_t("errgame19", L"Can't launch in Wii virtual console mode!"));
|
2018-08-01 14:27:12 +02:00
|
|
|
launch = false;
|
|
|
|
_showGame();
|
2013-01-15 14:54:33 +01:00
|
|
|
}
|
2018-08-01 14:27:12 +02:00
|
|
|
else
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2018-08-01 14:27:12 +02:00
|
|
|
_cleanupBanner();
|
|
|
|
_launch(hdr);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2018-08-01 14:27:12 +02:00
|
|
|
if(m_exit)
|
|
|
|
break;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2018-08-01 14:27:12 +02: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());
|
|
|
|
m_gcfg2.unload();
|
|
|
|
_showGame();
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-06-22 21:34:58 +02:00
|
|
|
else if(!coverFlipped)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
/* flip cover if mouse over */
|
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();
|
2017-05-15 19:50:24 +02:00
|
|
|
m_banner.SetShowBanner(false);
|
2016-06-10 01:02:40 +02:00
|
|
|
}
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
if(!coverFlipped && !m_video_playing)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
/* move to new cover if needed */
|
2016-06-10 01:02:40 +02:00
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_UP_REPEAT || RIGHT_STICK_UP))
|
|
|
|
{
|
|
|
|
CoverFlow.up();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT))
|
|
|
|
{
|
|
|
|
CoverFlow.right();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_DOWN_REPEAT || RIGHT_STICK_DOWN))
|
|
|
|
{
|
|
|
|
CoverFlow.down();
|
|
|
|
startGameSound = -10;
|
|
|
|
}
|
|
|
|
if((startGameSound == 1 || startGameSound < -8) && (BTN_LEFT_REPEAT || RIGHT_STICK_LEFT))
|
|
|
|
{
|
|
|
|
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
|
|
|
{
|
-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
|
2017-05-15 19:50:24 +02:00
|
|
|
_setCurrentItem(hdr);
|
|
|
|
|
2023-01-09 00:25:45 +01:00
|
|
|
memset(gcfg1Key, 0, sizeof(gcfg1Key));
|
|
|
|
memset(gameTitle, 0, sizeof(gameTitle));
|
|
|
|
|
2019-02-11 21:55:44 +01:00
|
|
|
if(hdr->type == TYPE_HOMEBREW)
|
2023-01-09 00:25:45 +01:00
|
|
|
wcstombs(gcfg1Key, hdr->title, 63);// uses title which is the folder name in apps.
|
2019-02-11 21:55:44 +01:00
|
|
|
else if(hdr->type == TYPE_PLUGIN)
|
-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", hdr->settings[0]), 8);
|
2023-01-09 00:25:45 +01:00
|
|
|
|
|
|
|
// if game has an id from the plugin database we use the new method which uses platform name/id
|
|
|
|
if(strcmp(hdr->id, "PLUGIN") != 0 && !m_platform.getString("PLUGINS", m_plugin.PluginMagicWord, "").empty())
|
|
|
|
strncpy(gcfg1Key, fmt("%s/%s", m_platform.getString("PLUGINS", m_plugin.PluginMagicWord).c_str(), hdr->id), 73);
|
|
|
|
else // old pre 5.4.4 method which uses plugin magic/title of game
|
|
|
|
{
|
|
|
|
if(strrchr(hdr->path, '/') != NULL)
|
|
|
|
wcstombs(gameTitle, hdr->title, 63);
|
|
|
|
else
|
|
|
|
memcpy(gameTitle, hdr->path, 63);// scummvm
|
|
|
|
strncpy(gcfg1Key, fmt("%s/%s", m_plugin.PluginMagicWord, gameTitle), 73);
|
|
|
|
}
|
-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
|
|
|
}
|
2023-01-09 00:25:45 +01:00
|
|
|
else // wii, gc, channels
|
|
|
|
strcpy(gcfg1Key, hdr->id);
|
|
|
|
|
2017-05-15 19:50:24 +02:00
|
|
|
if(m_newGame)
|
2016-12-05 15:12:23 +01:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
m_newGame = false;
|
|
|
|
startGameSound = 1;
|
|
|
|
_playGameSound();
|
2016-12-05 15:12:23 +01:00
|
|
|
}
|
2016-06-10 01:02:40 +02:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
|
2019-10-07 19:15:41 +02:00
|
|
|
if(!m_fa.isLoaded() && !coverFlipped && !m_video_playing)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2019-10-07 19:15:41 +02:00
|
|
|
if(m_banner_loaded && !m_soundThrdBusy && 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);
|
2017-09-22 00:03:41 +02:00
|
|
|
|
2019-10-07 19:15:41 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapBg, true);
|
|
|
|
m_btnMgr.hide(m_gameLblSnap, true);
|
|
|
|
m_btnMgr.hide(m_gameLblOverlay, true);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggle, true);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapFrame, true);
|
|
|
|
m_btnMgr.hide(m_gameLblBannerFrame, true);
|
2019-10-07 19:15:41 +02:00
|
|
|
|
2017-09-22 00:03:41 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOn);
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOff);
|
2019-03-04 21:29:46 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnCategories);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnSettings);
|
|
|
|
m_btnMgr.hide(m_gameBtnDelete);
|
|
|
|
m_btnMgr.hide(m_gameBtnPlay);
|
|
|
|
m_btnMgr.hide(m_gameBtnBack);
|
2019-10-09 22:12:42 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
|
2018-06-11 00:55:24 +02:00
|
|
|
if(m_gameLblUser[i] != -1)
|
2017-09-22 00:03:41 +02:00
|
|
|
m_btnMgr.hide(m_gameLblUser[i]);
|
2012-07-04 00:08:51 +02:00
|
|
|
}
|
2019-10-07 19:15:41 +02:00
|
|
|
else
|
2017-05-15 19:50:24 +02:00
|
|
|
{
|
2019-11-27 16:31:18 +01:00
|
|
|
if((!Auto_hide_icons || m_show_zone_game) && !m_soundThrdBusy)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
|
|
|
m_btnMgr.show(m_gameBtnPlay);
|
|
|
|
m_btnMgr.show(m_gameBtnBack);
|
|
|
|
m_btnMgr.show(m_gameBtnSettings);
|
|
|
|
m_btnMgr.show(m_gameBtnDelete);
|
2019-03-04 21:29:46 +01:00
|
|
|
m_btnMgr.show(m_gameBtnCategories);
|
2017-09-22 00:03:41 +02:00
|
|
|
bool b;
|
|
|
|
if(hdr->type == TYPE_PLUGIN)
|
2023-01-09 00:25:45 +01:00
|
|
|
{
|
|
|
|
b = m_gcfg1.getBool("FAVORITES_PLUGINS", gcfg1Key, false);
|
|
|
|
if(!b) m_gcfg1.remove("FAVORITES_PLUGINS", gcfg1Key);
|
|
|
|
}
|
2017-09-22 00:03:41 +02:00
|
|
|
else
|
2023-01-09 00:25:45 +01:00
|
|
|
{
|
|
|
|
b = m_gcfg1.getBool("FAVORITES", gcfg1Key, false);
|
|
|
|
if(!b) m_gcfg1.remove("FAVORITES", gcfg1Key);
|
|
|
|
}
|
2017-09-22 00:03:41 +02:00
|
|
|
m_btnMgr.show(b ? m_gameBtnFavoriteOn : m_gameBtnFavoriteOff);
|
|
|
|
m_btnMgr.hide(b ? m_gameBtnFavoriteOff : m_gameBtnFavoriteOn);
|
2019-10-09 22:12:42 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
|
2017-09-22 00:03:41 +02:00
|
|
|
if(m_gameLblUser[i] != -1)
|
|
|
|
m_btnMgr.show(m_gameLblUser[i]);
|
|
|
|
}
|
2019-11-27 16:31:18 +01:00
|
|
|
else if(!m_soundThrdBusy)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOn);
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOff);
|
2019-03-04 21:29:46 +01:00
|
|
|
m_btnMgr.hide(m_gameBtnCategories);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_btnMgr.hide(m_gameBtnSettings);
|
|
|
|
m_btnMgr.hide(m_gameBtnDelete);
|
|
|
|
m_btnMgr.hide(m_gameBtnPlay);
|
|
|
|
m_btnMgr.hide(m_gameBtnBack);
|
2019-10-09 22:12:42 +02:00
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
|
2017-09-22 00:03:41 +02:00
|
|
|
if (m_gameLblUser[i] != -1)
|
|
|
|
m_btnMgr.hide(m_gameLblUser[i]);
|
|
|
|
}
|
2019-10-07 19:15:41 +02:00
|
|
|
if(m_banner_loaded && !m_soundThrdBusy && !m_zoom_banner)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
|
|
|
|
|
|
|
m_btnMgr.hide(m_gameLblSnapBg, true);
|
|
|
|
m_btnMgr.hide(m_gameLblSnap, true);
|
|
|
|
m_btnMgr.hide(m_gameLblOverlay, true);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapFrame, true);
|
2019-10-07 19:15:41 +02:00
|
|
|
|
|
|
|
m_btnMgr.show(m_gameBtnToggle);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.show(m_gameLblBannerFrame);
|
2019-10-07 19:15:41 +02:00
|
|
|
}
|
|
|
|
if(m_snapshot_loaded && !m_soundThrdBusy)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggle);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.hide(m_gameLblBannerFrame);
|
2019-10-07 19:15:41 +02:00
|
|
|
|
|
|
|
m_btnMgr.show(m_gameLblSnapBg);
|
|
|
|
m_btnMgr.show(m_gameLblSnap);
|
|
|
|
m_btnMgr.show(m_gameLblOverlay);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.show(m_gameLblSnapFrame);
|
2019-10-07 19:15:41 +02:00
|
|
|
}
|
|
|
|
if(!m_banner_loaded && !m_snapshot_loaded && !m_soundThrdBusy)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggle);
|
|
|
|
m_btnMgr.hide(m_gameLblSnapBg);
|
|
|
|
m_btnMgr.hide(m_gameLblSnap);
|
|
|
|
m_btnMgr.hide(m_gameLblOverlay);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapFrame);
|
|
|
|
m_btnMgr.hide(m_gameLblBannerFrame);
|
2019-10-07 19:15:41 +02:00
|
|
|
}
|
|
|
|
|
2017-05-15 19:50:24 +02:00
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2019-10-07 19:15:41 +02:00
|
|
|
else
|
|
|
|
{
|
2019-10-09 22:12:42 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapFrame);
|
|
|
|
m_btnMgr.hide(m_gameLblBannerFrame);
|
2019-10-07 19:15:41 +02:00
|
|
|
m_btnMgr.hide(m_gameLblSnapBg);
|
|
|
|
m_btnMgr.hide(m_gameLblSnap);
|
|
|
|
m_btnMgr.hide(m_gameLblOverlay);
|
|
|
|
m_btnMgr.hide(m_gameBtnPlayFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnBackFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggle);
|
|
|
|
m_btnMgr.hide(m_gameBtnToggleFull);
|
|
|
|
m_btnMgr.hide(m_gameBtnPlay);
|
|
|
|
m_btnMgr.hide(m_gameBtnBack);
|
|
|
|
m_btnMgr.hide(m_gameBtnDelete);
|
|
|
|
m_btnMgr.hide(m_gameBtnSettings);
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOn);
|
|
|
|
m_btnMgr.hide(m_gameBtnFavoriteOff);
|
|
|
|
m_btnMgr.hide(m_gameBtnCategories);
|
|
|
|
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser); ++i)
|
|
|
|
if(m_gameLblUser[i] != -1)
|
|
|
|
m_btnMgr.hide(m_gameLblUser[i]);
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2016-06-10 01:02:40 +02:00
|
|
|
if(coverFlipped)
|
|
|
|
{
|
|
|
|
m_coverflow.setVector3D(domain, key, savedv);
|
2018-10-31 20:51:15 +01:00
|
|
|
_loadCFLayout(cf_version, true);// true?
|
2016-06-10 01:02:40 +02:00
|
|
|
CoverFlow.applySettings();
|
|
|
|
}
|
2019-09-30 18:07:04 +02:00
|
|
|
m_snapshot_loaded = false;
|
|
|
|
TexData emptyTex;
|
|
|
|
m_btnMgr.setTexture(m_gameLblSnap, emptyTex);
|
|
|
|
m_btnMgr.setTexture(m_gameLblOverlay, emptyTex);
|
2020-02-02 21:25:05 +01:00
|
|
|
TexHandle.Cleanup(m_game_snap);
|
|
|
|
TexHandle.Cleanup(m_game_overlay);
|
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();
|
|
|
|
}
|
|
|
|
|
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;
|
2019-03-04 21:29:46 +01:00
|
|
|
TexData texCategories;
|
|
|
|
TexData texCategoriesSel;
|
2012-12-28 15:19:40 +01:00
|
|
|
TexData texDelete;
|
|
|
|
TexData texDeleteSel;
|
|
|
|
TexData texSettings;
|
|
|
|
TexData texSettingsSel;
|
2013-11-19 16:27:52 +01:00
|
|
|
TexData texToggleBanner;
|
2019-10-07 19:15:41 +02:00
|
|
|
TexData texSnapShotBg;
|
2019-10-09 22:12:42 +02:00
|
|
|
TexData texSnapShotFrame;
|
|
|
|
TexData texBannerFrame;
|
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()));
|
2019-03-04 21:29:46 +01:00
|
|
|
TexHandle.fromImageFile(texCategories, fmt("%s/btncat.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texCategoriesSel, fmt("%s/btncats.png", m_imgsDir.c_str()));
|
2013-11-19 16:27:52 +01:00
|
|
|
TexHandle.fromImageFile(texDelete, fmt("%s/delete.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texDeleteSel, fmt("%s/deletes.png", m_imgsDir.c_str()));
|
2019-03-04 21:29:46 +01:00
|
|
|
TexHandle.fromImageFile(texSettings, fmt("%s/btnconfig.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texSettingsSel, fmt("%s/btnconfigs.png", m_imgsDir.c_str()));
|
2013-11-19 16:27:52 +01:00
|
|
|
TexHandle.fromImageFile(texToggleBanner, fmt("%s/blank.png", m_imgsDir.c_str()));
|
2019-10-07 19:15:41 +02:00
|
|
|
TexHandle.fromImageFile(texSnapShotBg, fmt("%s/blank.png", m_imgsDir.c_str()));
|
2019-10-09 22:12:42 +02:00
|
|
|
TexHandle.fromImageFile(texSnapShotFrame, fmt("%s/blank.png", m_imgsDir.c_str()));
|
|
|
|
TexHandle.fromImageFile(texBannerFrame, 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);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_gameBtnFavoriteOn = _addPicButton("GAME/FAVORITE_ON", texGameFavOn, texGameFavOnSel, 460, 220, 48, 48);
|
2019-09-30 18:07:04 +02:00
|
|
|
m_gameBtnFavoriteOff = _addPicButton("GAME/FAVORITE_OFF", texGameFavOff, texGameFavOffSel, 460, 220, 48, 48);
|
|
|
|
m_gameBtnCategories = _addPicButton("GAME/CATEGORIES_BTN", texCategories, texCategoriesSel, 532, 220, 48, 48);
|
|
|
|
m_gameBtnSettings = _addPicButton("GAME/SETTINGS_BTN", texSettings, texSettingsSel, 460, 280, 48, 48);
|
|
|
|
m_gameBtnDelete = _addPicButton("GAME/DELETE_BTN", texDelete, texDeleteSel, 532, 280, 48, 48);
|
2012-11-03 20:16:03 +01:00
|
|
|
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);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_gameBtnToggle = _addPicButton("GAME/TOOGLE_BTN", texToggleBanner, texToggleBanner, 385, 31, 246, 135);
|
2016-04-02 19:19:19 +02:00
|
|
|
m_gameBtnToggleFull = _addPicButton("GAME/TOOGLE_FULL_BTN", texToggleBanner, texToggleBanner, 20, 12, 608, 344);
|
2019-10-09 22:12:42 +02:00
|
|
|
m_gameLblSnapBg = _addLabel("GAME/SNAP_BG", theme.txtFont, L"", 385, 31, 246, 170, theme.txtFontColor, 0, texSnapShotBg);
|
2020-02-02 21:25:05 +01:00
|
|
|
m_gameLblSnap = _addLabel("GAME/SNAP", theme.txtFont, L"", 385, 31, 100, 100, theme.txtFontColor, 0, m_game_snap);
|
|
|
|
m_gameLblOverlay = _addLabel("GAME/OVERLAY", theme.txtFont, L"", 385, 31, 100, 100, theme.txtFontColor, 0, m_game_overlay);
|
2019-10-09 22:12:42 +02:00
|
|
|
// 8 pixel width frames
|
|
|
|
m_gameLblSnapFrame = _addLabel("GAME/SNAP_FRAME", theme.txtFont, L"", 377, 23, 262, 186, theme.txtFontColor, 0, texSnapShotFrame);
|
|
|
|
m_gameLblBannerFrame = _addLabel("GAME/BANNER_FRAME", theme.txtFont, L"", 377, 23, 262, 151, theme.txtFontColor, 0, texBannerFrame);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2018-10-17 16:00:01 +02:00
|
|
|
m_gameButtonsZone.x = m_theme.getInt("GAME/ZONES", "buttons_x", 380);
|
2012-01-21 21:57:41 +01:00
|
|
|
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);
|
2019-03-04 21:29:46 +01:00
|
|
|
_setHideAnim(m_gameBtnCategories, "GAME/CATEGORIES_BTN", 0, 0, 1.f, -1.f);
|
2013-11-04 20:46:23 +01:00
|
|
|
_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);
|
2019-10-09 22:12:42 +02:00
|
|
|
_setHideAnim(m_gameLblSnapBg, "GAME/SNAP_BG", 0, 0, 1.f, 1.f);
|
|
|
|
_setHideAnim(m_gameLblSnap, "GAME/SNAP", 0, 0, 1.f, 1.f);
|
|
|
|
_setHideAnim(m_gameLblOverlay, "GAME/OVERLAY", 0, 0, 1.f, 1.f);
|
|
|
|
_setHideAnim(m_gameLblSnapFrame, "GAME/SNAP_FRAME", 0, 0, 1.f, 1.f);
|
|
|
|
_setHideAnim(m_gameLblBannerFrame, "GAME/BANNER_FRAME", 0, 0, 1.f, 1.f);
|
|
|
|
|
2012-01-21 21:57:41 +01:00
|
|
|
_hideGame(true);
|
|
|
|
_textGame();
|
2019-10-07 19:15:41 +02:00
|
|
|
snapbg_x = m_theme.getInt("GAME/SNAP_BG", "x", 385);
|
|
|
|
snapbg_y = m_theme.getInt("GAME/SNAP_BG", "y", 31);
|
|
|
|
snapbg_w = m_theme.getInt("GAME/SNAP_BG", "width", 246);
|
2019-10-09 22:12:42 +02:00
|
|
|
snapbg_h = m_theme.getInt("GAME/SNAP_BG", "height", 170);
|
2019-12-15 23:02:10 +01:00
|
|
|
|
|
|
|
/* gc disc prompt menu */
|
|
|
|
m_promptBg = _texture("PROMPT/BG", "texture", theme.bg, false);
|
|
|
|
m_promptLblQuestion = _addLabel("PROMPT/QUESTION", theme.lblFont, L"", 112, 0, 500, 420, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
|
|
|
m_promptBtnChoice1 = _addButton("PROMPT/CHOICE1", theme.btnFont, L"", 112, 320, 200, 48, theme.btnFontColor);
|
|
|
|
m_promptBtnChoice2 = _addButton("PROMPT/CHOICE2", theme.btnFont, L"", 332, 320, 200, 48, theme.btnFontColor);
|
|
|
|
|
|
|
|
_setHideAnim(m_promptLblQuestion, "PROMPT/QUESTION", 0, 0, 0.f, 0.f);
|
|
|
|
_setHideAnim(m_promptBtnChoice1, "PROMPT/CHOICE1", 0, 0, 1.f, -1.f);
|
|
|
|
_setHideAnim(m_promptBtnChoice2, "PROMPT/CHOICE2", 0, 0, 1.f, -1.f);
|
|
|
|
|
|
|
|
m_btnMgr.hide(m_promptLblQuestion, true);
|
|
|
|
m_btnMgr.hide(m_promptBtnChoice1, true);
|
|
|
|
m_btnMgr.hide(m_promptBtnChoice2, true);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
2017-04-18 01:23:50 +02:00
|
|
|
// loads game banner and sound to be played by mainloop
|
2018-05-29 11:59:57 +02:00
|
|
|
void * CMenu::_gameSoundThread(void *obj)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2018-05-29 11:59:57 +02:00
|
|
|
CMenu *m = (CMenu*)obj;
|
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;
|
2019-10-17 01:22:40 +02:00
|
|
|
m->m_snapshot_loaded = false;
|
|
|
|
m_banner_loaded = false;
|
|
|
|
|
2017-09-22 00:03:41 +02:00
|
|
|
CurrentBanner.ClearBanner();//clear current banner from memory
|
2012-11-04 15:13:42 +01:00
|
|
|
|
2019-10-17 01:22:40 +02:00
|
|
|
/* Set to empty textures to clear current snapshot from screen */
|
|
|
|
TexData emptyTex;
|
|
|
|
m_btnMgr.setTexture(m->m_gameLblSnap, emptyTex);
|
|
|
|
m_btnMgr.setTexture(m->m_gameLblOverlay, emptyTex);
|
|
|
|
|
2012-07-04 15:45:39 +02:00
|
|
|
u8 *custom_bnr_file = NULL;
|
|
|
|
u32 custom_bnr_size = 0;
|
2017-09-22 00:03:41 +02:00
|
|
|
char custom_banner[256];
|
|
|
|
custom_banner[255] = '\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';
|
2018-12-28 01:47:00 +01:00
|
|
|
|
2019-10-17 01:22:40 +02:00
|
|
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
|
|
|
|
2017-05-15 19:50:24 +02:00
|
|
|
if(GameHdr->type == TYPE_PLUGIN)
|
2013-10-19 20:59:17 +02:00
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
char game_sound[256];
|
|
|
|
game_sound[255] = '\0';
|
|
|
|
char fileNameFull[128];
|
|
|
|
fileNameFull[127] = '\0';
|
|
|
|
char fileName[128];
|
|
|
|
fileName[127] = '\0';
|
|
|
|
|
|
|
|
strncpy(fileNameFull, CoverFlow.getFilenameId(GameHdr), sizeof(fileNameFull) - 1);
|
|
|
|
strcpy(fileName, fileNameFull);
|
|
|
|
if(strrchr(fileName, '.') != NULL)
|
|
|
|
*strrchr(fileName, '.') = '\0';// remove .ext
|
2017-05-15 19:50:24 +02:00
|
|
|
|
2022-01-14 22:10:56 +01:00
|
|
|
const char *coverDir = m_plugin.GetCoverFolderName(GameHdr->settings[0]);
|
|
|
|
|
|
|
|
strncpy(custom_banner, fmt("%s/%s/%s.bnr", m->m_customBnrDir.c_str(), coverDir, fileNameFull), sizeof(custom_banner) - 1);
|
|
|
|
if(!fsop_FileExist(custom_banner))
|
|
|
|
strncpy(custom_banner, fmt("%s/%s/%s.bnr", m->m_customBnrDir.c_str(), coverDir, fileName), sizeof(custom_banner) - 1);
|
|
|
|
|
|
|
|
strncpy(game_sound, fmt("%s/gamesounds/%s/%s", m->m_dataDir.c_str(), coverDir, fileNameFull), sizeof(game_sound) - 1);
|
|
|
|
if(!fsop_FileExist(game_sound))
|
|
|
|
strncpy(game_sound, fmt("%s/gamesounds/%s/%s", m->m_dataDir.c_str(), coverDir, fileName), sizeof(game_sound) - 1);
|
2018-10-17 20:01:54 +02:00
|
|
|
|
|
|
|
/* get plugin rom custom banner */
|
2017-05-15 19:50:24 +02:00
|
|
|
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);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
2017-05-15 19:50:24 +02:00
|
|
|
}
|
|
|
|
}
|
2019-09-30 18:07:04 +02:00
|
|
|
/* if no banner try getting snap shot */
|
|
|
|
if((custom_bnr_size == 0 || custom_bnr_file == NULL) && m->m_platform.loaded())
|
2017-05-15 19:50:24 +02:00
|
|
|
{
|
2022-01-14 22:10:56 +01:00
|
|
|
//gprintf("trying to get snapshot\n");
|
2019-10-17 01:22:40 +02:00
|
|
|
m_banner.DeleteBanner();
|
2019-09-30 18:07:04 +02:00
|
|
|
char GameID[7];
|
2022-01-14 22:10:56 +01:00
|
|
|
char platformName[16];
|
2019-09-30 18:07:04 +02:00
|
|
|
const char *TMP_Char = NULL;
|
|
|
|
GameTDB gametdb;
|
2019-10-07 19:15:41 +02:00
|
|
|
|
2019-10-17 01:22:40 +02:00
|
|
|
strncpy(m_plugin.PluginMagicWord, fmt("%08x", GameHdr->settings[0]), 8);
|
2022-01-14 22:10:56 +01:00
|
|
|
snprintf(platformName, sizeof(platformName), "%s", m->m_platform.getString("PLUGINS", m_plugin.PluginMagicWord, "").c_str());
|
|
|
|
strcpy(GameID, GameHdr->id);// GameHdr->id is null terminated
|
2019-09-30 18:07:04 +02:00
|
|
|
|
|
|
|
if(strlen(platformName) != 0 && strcasecmp(GameID, "PLUGIN") != 0)
|
|
|
|
{
|
|
|
|
string newName = m->m_platform.getString("COMBINED", platformName);
|
|
|
|
if(newName.empty())
|
|
|
|
m->m_platform.remove("COMBINED", platformName);
|
|
|
|
else
|
|
|
|
snprintf(platformName, sizeof(platformName), "%s", newName.c_str());
|
|
|
|
|
|
|
|
/* Load platform name.xml database to get game's info using the gameID */
|
|
|
|
gametdb.OpenFile(fmt("%s/%s/%s.xml", m->m_pluginDataDir.c_str(), platformName, platformName));
|
|
|
|
if(gametdb.IsLoaded())
|
|
|
|
{
|
|
|
|
gametdb.SetLanguageCode(m->m_loc.getString(m->m_curLanguage, "gametdb_code", "EN").c_str());
|
|
|
|
|
|
|
|
/* Get roms's title without the extra ()'s or []'s */
|
2019-10-17 01:22:40 +02:00
|
|
|
string ShortName;
|
|
|
|
if(strrchr(GameHdr->path, '/') != NULL)
|
|
|
|
ShortName = m_plugin.GetRomName(GameHdr->path);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char title[64];
|
|
|
|
title[63] = '\0';
|
2022-01-14 22:10:56 +01:00
|
|
|
wcstombs(title, GameHdr->title, sizeof(title) - 1);
|
2019-10-17 01:22:40 +02:00
|
|
|
ShortName = title;
|
|
|
|
}
|
2019-09-30 18:07:04 +02:00
|
|
|
|
|
|
|
const char *snap_path = NULL;
|
|
|
|
if(strcasestr(platformName, "ARCADE") || strcasestr(platformName, "CPS") || !strncasecmp(platformName, "NEOGEO", 6))
|
|
|
|
snap_path = fmt("%s/%s/%s.png", m->m_snapDir.c_str(), platformName, ShortName.c_str());
|
|
|
|
else if(gametdb.GetName(GameID, TMP_Char))
|
|
|
|
snap_path = fmt("%s/%s/%s.png", m->m_snapDir.c_str(), platformName, TMP_Char);
|
|
|
|
|
|
|
|
gametdb.CloseFile();
|
|
|
|
if(snap_path == NULL || !fsop_FileExist(snap_path))
|
|
|
|
snap_path = fmt("%s/%s/%s.png", m->m_snapDir.c_str(), platformName, GameID);
|
|
|
|
|
|
|
|
if(fsop_FileExist(snap_path))
|
|
|
|
{
|
|
|
|
m->m_snapshot_loaded = true;
|
2020-02-02 21:25:05 +01:00
|
|
|
TexHandle.fromImageFile(m->m_game_snap, snap_path);
|
2019-10-07 19:15:41 +02:00
|
|
|
/* get snapshot position and dimensions to center it on the snap background */
|
2020-02-02 21:25:05 +01:00
|
|
|
int snap_w = m->m_game_snap.width;
|
|
|
|
int snap_h = m->m_game_snap.height;
|
2019-10-07 19:15:41 +02:00
|
|
|
int width_over = snap_w - m->snapbg_w;
|
|
|
|
int height_over = snap_h - m->snapbg_h;
|
|
|
|
float aspect_ratio = (float)snap_w / (float)snap_h;
|
|
|
|
if(width_over > 0 || height_over > 0)
|
|
|
|
{
|
|
|
|
if(width_over > height_over)
|
|
|
|
{
|
|
|
|
snap_w = m->snapbg_w;
|
|
|
|
snap_h = (int)((float)snap_w / aspect_ratio);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
snap_h = m->snapbg_h;
|
|
|
|
snap_w = (int)((float)snap_h * aspect_ratio);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int x_pos = (m->snapbg_w - snap_w) / 2 + m->snapbg_x;
|
|
|
|
int y_pos = (m->snapbg_h - snap_h) / 2 + m->snapbg_y;
|
2020-02-02 21:25:05 +01:00
|
|
|
m_btnMgr.setTexture(m->m_gameLblSnap, m->m_game_snap, x_pos, y_pos, snap_w, snap_h);
|
2019-09-30 18:07:04 +02:00
|
|
|
|
2019-10-07 19:15:41 +02:00
|
|
|
/* get possible overlay */
|
2019-09-30 18:07:04 +02:00
|
|
|
const char *overlay_path = fmt("%s/%s_overlay.png", m->m_snapDir.c_str(), platformName);
|
|
|
|
if(fsop_FileExist(overlay_path))
|
|
|
|
{
|
2020-02-02 21:25:05 +01:00
|
|
|
TexHandle.fromImageFile(m->m_game_overlay, overlay_path);
|
|
|
|
m_btnMgr.setTexture(m->m_gameLblOverlay, m->m_game_overlay, x_pos, y_pos, snap_w, snap_h);
|
2019-09-30 18:07:04 +02:00
|
|
|
}
|
|
|
|
else
|
2020-02-02 21:25:05 +01:00
|
|
|
TexHandle.Cleanup(m->m_game_overlay);
|
2019-09-30 18:07:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-07 19:15:41 +02:00
|
|
|
if(!m->m_snapshot_loaded)
|
|
|
|
{
|
2020-02-02 21:25:05 +01:00
|
|
|
TexHandle.Cleanup(m->m_game_snap);
|
|
|
|
TexHandle.Cleanup(m->m_game_overlay);
|
2019-10-07 19:15:41 +02:00
|
|
|
}
|
2019-09-30 18:07:04 +02:00
|
|
|
/* try to get plugin rom gamesound or just the default plugin gamesound */
|
2018-10-17 20:01:54 +02:00
|
|
|
bool found = false;
|
|
|
|
if(fsop_FileExist(fmt("%s.mp3", game_sound)))
|
|
|
|
{
|
2018-12-28 01:47:00 +01:00
|
|
|
strcat(game_sound, ".mp3");
|
2018-10-17 20:01:54 +02:00
|
|
|
found = true;
|
|
|
|
}
|
|
|
|
else if(fsop_FileExist(fmt("%s.wav", game_sound)))
|
|
|
|
{
|
2018-12-28 01:47:00 +01:00
|
|
|
strcat(game_sound, ".wav");
|
2018-10-17 20:01:54 +02:00
|
|
|
found = true;
|
|
|
|
}
|
|
|
|
else if(fsop_FileExist(fmt("%s.ogg", game_sound)))
|
|
|
|
{
|
2018-12-28 01:47:00 +01:00
|
|
|
strcat(game_sound, ".ogg");
|
2018-10-17 20:01:54 +02:00
|
|
|
found = true;
|
|
|
|
}
|
|
|
|
if(found)
|
|
|
|
{
|
|
|
|
u32 size = 0;
|
2018-12-28 01:47:00 +01:00
|
|
|
u8 *sf = fsop_ReadFile(game_sound, &size);
|
2018-10-17 20:01:54 +02:00
|
|
|
m->m_gameSound.Load(sf, size);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
m->m_gameSound.Load(m_plugin.GetBannerSound(GameHdr->settings[0]), m_plugin.GetBannerSoundSize());
|
2017-05-15 19:50:24 +02:00
|
|
|
if(m->m_gameSound.IsLoaded())
|
|
|
|
m->m_gamesound_changed = true;
|
|
|
|
m->m_soundThrdBusy = false;
|
2018-05-29 11:59:57 +02:00
|
|
|
return NULL;
|
2017-05-15 19:50:24 +02:00
|
|
|
}
|
2013-10-19 20:59:17 +02:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
else
|
2012-07-05 18:18:23 +02:00
|
|
|
{
|
2019-10-07 19:15:41 +02:00
|
|
|
/* try to get custom banner for wii, gc, and channels */
|
2017-05-15 19:50:24 +02:00
|
|
|
/* check custom ID6 first */
|
|
|
|
strncpy(custom_banner, fmt("%s/%s.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)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
2014-03-01 00:11:02 +01:00
|
|
|
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
|
|
|
}
|
2013-10-19 20:59:17 +02:00
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
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)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
fsop_ReadFileLoc(custom_banner, custom_bnr_size, (void*)custom_bnr_file);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
|
|
|
}
|
2017-05-15 19:50:24 +02:00
|
|
|
}
|
|
|
|
}
|
2013-10-28 19:36:52 +01:00
|
|
|
}
|
2017-09-22 00:03:41 +02:00
|
|
|
if(GameHdr->type == TYPE_GC_GAME && custom_bnr_file == NULL)
|
2013-10-28 19:36:52 +01:00
|
|
|
{
|
2019-10-07 19:15:41 +02:00
|
|
|
/* gc game but no custom banner. so we make one ourselves. and exit sound thread. */
|
2017-09-22 00:03:41 +02:00
|
|
|
//get the gc game's opening.bnr from ISO - a 96x32 image to add to the gc banner included with wiiflow
|
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)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
|
|
|
//creategcbanner adds the opening.bnr image and game title to the wiiflow gc banner
|
2016-04-03 02:31:02 +02:00
|
|
|
m_banner.CreateGCBanner(opening_bnr, m->m_wbf1_font, m->m_wbf2_font, GameHdr->title);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
m_banner.DeleteBanner();
|
2016-04-03 02:31:02 +02:00
|
|
|
GC_Disc_Reader.clear();
|
2018-05-30 22:45:48 +02:00
|
|
|
if(m->m_gc_play_default_sound)
|
|
|
|
{
|
|
|
|
//get wiiflow gc ogg sound to play with banner
|
|
|
|
m->m_gameSound.Load(gc_ogg, gc_ogg_size, false);
|
|
|
|
if(m->m_gameSound.IsLoaded())
|
|
|
|
m->m_gamesound_changed = true;
|
|
|
|
}
|
2013-10-28 19:36:52 +01:00
|
|
|
m->m_soundThrdBusy = false;
|
2018-05-29 11:59:57 +02:00
|
|
|
return NULL;
|
2013-10-28 19:36:52 +01:00
|
|
|
}
|
2019-10-07 19:15:41 +02:00
|
|
|
if(custom_bnr_file == NULL)/* no custom banner load and if wii or channel game try cached banner id6 only*/
|
2013-10-28 19:36:52 +01:00
|
|
|
{
|
|
|
|
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)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
2014-03-01 00:11:02 +01:00
|
|
|
fsop_ReadFileLoc(cached_banner, cached_bnr_size, (void*)cached_bnr_file);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
|
|
|
}
|
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)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
2018-07-16 15:08:45 +02:00
|
|
|
m->_extractBnr(GameHdr);
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
|
|
|
}
|
2016-06-20 23:03:40 +02:00
|
|
|
else if(GameHdr->type == TYPE_CHANNEL || GameHdr->type == TYPE_EMUCHANNEL)
|
2017-09-22 00:03:41 +02:00
|
|
|
{
|
2018-07-16 15:08:45 +02:00
|
|
|
ChannelHandle.GetBanner(TITLE_ID(GameHdr->settings[0], GameHdr->settings[1]));
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = true;
|
|
|
|
}
|
|
|
|
|
2012-10-15 21:16:14 +02:00
|
|
|
if(!CurrentBanner.IsValid())
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2017-09-22 00:03:41 +02:00
|
|
|
m_banner_loaded = false;
|
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;
|
2018-05-29 11:59:57 +02:00
|
|
|
return NULL;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2017-04-18 01:23:50 +02:00
|
|
|
//save new wii or channel banner to cache folder, gc and custom banners are not cached
|
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());
|
|
|
|
|
2021-10-07 23:38:32 +02:00
|
|
|
//load and init banner
|
|
|
|
m_banner.LoadBanner(m->m_wbf1_font, m->m_wbf2_font);
|
|
|
|
|
2017-04-18 01:23:50 +02:00
|
|
|
//get sound from wii, channel, or custom banner and load it to play with the banner
|
2013-09-24 23:24:03 +02:00
|
|
|
u32 sndSize = 0;
|
|
|
|
u8 *soundBin = CurrentBanner.GetFile("sound.bin", &sndSize);
|
2021-10-07 23:38:32 +02:00
|
|
|
CurrentBanner.ClearBanner();// got sound.bin and banner for displaying is loaded so no longer need current banner.
|
|
|
|
|
2018-05-30 22:45:48 +02:00
|
|
|
if(soundBin != NULL && (GameHdr->type != TYPE_GC_GAME || m->m_gc_play_banner_sound))
|
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);
|
2018-12-26 21:24:01 +01:00
|
|
|
free(soundBin);// no longer needed, now using decompressed newSound
|
2021-10-07 23:38:32 +02:00
|
|
|
if(newSound == NULL || newSize == 0 || !m->m_gameSound.Load(newSound, newSize))
|
|
|
|
{
|
|
|
|
m->m_gameSound.FreeMemory();// frees newSound
|
|
|
|
m_banner.DeleteBanner();// the same as UnloadBanner
|
|
|
|
m->m_soundThrdBusy = false;
|
|
|
|
return NULL;
|
|
|
|
}
|
2012-08-13 07:09:40 +02:00
|
|
|
}
|
|
|
|
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
|
2021-10-07 23:38:32 +02:00
|
|
|
{
|
|
|
|
m->m_gameSound.FreeMemory();// frees soundBin
|
|
|
|
m_banner.DeleteBanner();
|
|
|
|
}
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2021-10-07 23:38:32 +02:00
|
|
|
else
|
2012-08-13 07:09:40 +02:00
|
|
|
{
|
2018-12-26 21:24:01 +01:00
|
|
|
if(soundBin != NULL)
|
|
|
|
free(soundBin);
|
2021-10-07 23:38:32 +02:00
|
|
|
//gprintf("WARNING: No sound found in banner!\n");
|
2012-07-27 19:26:49 +02:00
|
|
|
m->m_gamesound_changed = true;
|
2018-12-26 21:24:01 +01:00
|
|
|
m->m_gameSound.FreeMemory();// frees previous game sound
|
2012-08-13 07:09:40 +02:00
|
|
|
}
|
2012-11-04 15:13:42 +01:00
|
|
|
m->m_soundThrdBusy = false;
|
2018-05-29 11:59:57 +02:00
|
|
|
return NULL;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-11-17 18:30:24 +01:00
|
|
|
u8 *GameSoundStack = NULL;
|
|
|
|
u32 GameSoundSize = 0x10000; //64kb
|
2017-04-18 01:23:50 +02:00
|
|
|
void CMenu::_playGameSound(void)// starts banner and gamesound loading thread
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2017-05-15 19:50:24 +02:00
|
|
|
_cleanupBanner(true);
|
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)
|
2017-04-18 01:23:50 +02:00
|
|
|
_stopGameSoundThread();
|
2014-03-17 18:38:32 +01:00
|
|
|
GameSoundStack = (u8*)MEM2_lo_alloc(GameSoundSize);
|
2018-05-29 11:59:57 +02:00
|
|
|
LWP_CreateThread(&m_gameSoundThread, _gameSoundThread, this, GameSoundStack, GameSoundSize, 60);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
2017-04-18 01:23:50 +02:00
|
|
|
void CMenu::_stopGameSoundThread()//stops banner and gamesound loading thread
|
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
|
|
|
}
|