2012-01-21 21:57:41 +01:00
# include <fstream>
# include <sys/stat.h>
# include <dirent.h>
# include <time.h>
# include <wchar.h>
2012-05-11 00:20:18 +02:00
# include <network.h>
# include <errno.h>
2012-01-21 21:57:41 +01:00
2012-08-05 15:48:15 +02:00
# include "menu.hpp"
2012-06-16 19:03:23 +02:00
# include "types.h"
2012-01-21 21:57:41 +01:00
# include "fonts.h"
2012-08-05 15:48:15 +02:00
# include "banner/BannerWindow.hpp"
# include "channel/nand.hpp"
2012-12-27 02:08:16 +01:00
# include "channel/nand_save.hpp"
2012-08-05 15:48:15 +02:00
# include "gc/gc.hpp"
2013-12-21 18:02:36 +01:00
# include "hw/Gekko.h"
2014-03-18 03:39:42 +01:00
# include "gui/WiiMovie.hpp"
2012-08-05 15:48:15 +02:00
# include "loader/alt_ios.h"
# include "loader/cios.h"
# include "loader/fs.h"
2012-08-11 14:27:38 +02:00
# include "loader/nk.h"
2012-01-21 21:57:41 +01:00
# include "loader/playlog.h"
2012-08-05 15:48:15 +02:00
# include "loader/wbfs.h"
# include "music/SoundHandler.hpp"
# include "network/gcard.h"
# include "unzip/U8Archive.h"
2020-09-07 22:27:42 +02:00
# include "network/proxysettings.h"
2018-08-01 14:27:12 +02:00
2012-01-21 21:57:41 +01:00
// Sounds
extern const u8 click_wav [ ] ;
extern const u32 click_wav_size ;
extern const u8 hover_wav [ ] ;
extern const u32 hover_wav_size ;
extern const u8 camera_wav [ ] ;
extern const u32 camera_wav_size ;
2014-03-17 18:38:32 +01:00
CMenu mainMenu ;
2022-07-14 00:11:44 +02:00
//u8 CMenu::downloadStack[8192] ATTRIBUTE_ALIGN(32);
//const u32 CMenu::downloadStackSize = 8192;
2014-03-17 18:38:32 +01:00
2012-10-13 18:57:03 +02:00
CMenu : : CMenu ( )
2012-01-21 21:57:41 +01:00
{
m_aa = 0 ;
m_thrdWorking = false ;
m_thrdStop = false ;
m_thrdProgress = 0.f ;
m_locked = false ;
m_favorites = false ;
m_thrdNetwork = false ;
m_mutex = 0 ;
m_showtimer = 0 ;
m_gameSoundThread = LWP_THREAD_NULL ;
2012-11-04 15:13:42 +01:00
m_soundThrdBusy = false ;
2012-01-21 21:57:41 +01:00
m_numCFVersions = 0 ;
m_bgCrossFade = 0 ;
m_bnrSndVol = 0 ;
m_directLaunch = false ;
m_exit = false ;
m_reload = false ;
m_gamesound_changed = false ;
2012-08-16 00:33:54 +02:00
m_video_playing = false ;
2012-09-07 20:13:04 +02:00
m_base_font = NULL ;
2012-01-21 21:57:41 +01:00
m_base_font_size = 0 ;
2012-09-07 20:13:04 +02:00
m_wbf1_font = NULL ;
m_wbf2_font = NULL ;
2016-04-02 18:00:47 +02:00
m_current_view = COVERFLOW_WII ;
2012-11-29 21:30:05 +01:00
m_prevBg = NULL ;
2012-11-16 23:00:20 +01:00
m_nextBg = NULL ;
2012-11-16 23:40:20 +01:00
m_lqBg = NULL ;
2012-12-08 17:17:35 +01:00
m_use_sd_logging = false ;
m_use_wifi_gecko = false ;
2020-08-24 01:09:13 +02:00
//m_init_network = false;
2013-04-08 23:45:13 +02:00
m_use_source = true ;
2013-09-12 15:04:50 +02:00
m_sourceflow = false ;
2019-10-10 01:00:54 +02:00
m_clearCats = false ;
m_getFavs = true ;
2013-07-29 23:06:50 +02:00
m_catStartPage = 1 ;
2018-11-05 20:57:01 +01:00
cacheCovers = false ;
2019-03-27 17:45:43 +01:00
SF_cacheCovers = true ;
2019-09-30 18:07:04 +02:00
m_snapshot_loaded = false ;
2019-11-24 00:54:38 +01:00
curCustBg = 1 ;
2013-08-05 22:58:26 +02:00
/* Explorer stuff */
m_txt_view = false ;
m_txt_path = NULL ;
2013-08-08 20:21:11 +02:00
/* download stuff */
m_file = NULL ;
2013-08-09 16:52:17 +02:00
m_buffer = NULL ;
2013-08-08 20:21:11 +02:00
m_filesize = 0 ;
2013-08-14 21:11:38 +02:00
/* thread stuff */
m_thrdPtr = LWP_THREAD_NULL ;
m_thrdInstalling = false ;
m_thrdUpdated = false ;
m_thrdDone = false ;
m_thrdWritten = 0 ;
m_thrdTotal = 0 ;
2013-09-15 23:22:19 +02:00
/* screensaver */
no_input_time = 0 ;
2013-10-19 17:31:08 +02:00
/* Autoboot stuff */
m_source_autoboot = false ;
2012-01-21 21:57:41 +01:00
}
2019-10-27 01:45:55 +02:00
bool CMenu : : init ( bool usb_mounted )
2012-01-21 21:57:41 +01:00
{
2020-08-25 00:58:09 +02:00
/* Clear Playlog to prevent wiiflow from being added to it */
2012-01-21 21:57:41 +01:00
Playlog_Delete ( ) ;
2018-10-31 20:51:15 +01:00
/* Find the first partition with apps/wiiflow folder */
2021-10-07 23:38:32 +02:00
const char * drive = NULL ;
2016-04-03 03:03:39 +02:00
struct stat dummy ;
2016-06-20 23:03:40 +02:00
for ( int i = SD ; i < = USB8 ; i + + )
2016-04-03 03:03:39 +02:00
{
2016-04-30 16:19:30 +02:00
if ( DeviceHandle . IsInserted ( i ) & & DeviceHandle . GetFSType ( i ) ! = PART_FS_WBFS & & stat ( fmt ( " %s:/%s " , DeviceName [ i ] , APPS_DIR ) , & dummy ) = = 0 )
2012-01-21 21:57:41 +01:00
{
drive = DeviceName [ i ] ;
break ;
}
2016-04-03 03:03:39 +02:00
}
2021-10-07 23:38:32 +02:00
if ( drive = = NULL ) // Could not find apps/wiiflow so we can't go on
2017-09-22 00:03:41 +02:00
return false ;
2016-04-03 03:03:39 +02:00
2016-04-30 16:19:30 +02:00
m_appDir = fmt ( " %s:/%s " , drive , APPS_DIR ) ;
2012-11-18 14:40:26 +01:00
gprintf ( " Wiiflow boot.dol Location: %s \n " , m_appDir . c_str ( ) ) ;
2021-10-07 23:38:32 +02:00
m_imgsDir = fmt ( " %s/imgs " , m_appDir . c_str ( ) ) ;
m_binsDir = fmt ( " %s/bins " , m_appDir . c_str ( ) ) ;
/* Set data folder on same device as the apps/wiiflow folder */
m_dataDir = fmt ( " %s:/%s " , drive , APP_DATA_DIR ) ;
gprintf ( " Data Directory: %s \n " , m_dataDir . c_str ( ) ) ;
2016-04-03 03:03:39 +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
/* Load/Create wiiflow.ini so we can get settings to start Gecko and Network */
2012-11-18 14:40:26 +01:00
m_cfg . load ( fmt ( " %s/ " CFG_FILENAME , m_appDir . c_str ( ) ) ) ;
2021-10-07 23:38:32 +02:00
/* ------------------------------------------------------*/
/* setup debugging stuff after loading wiiflow.ini */
2017-09-22 00:03:41 +02:00
show_mem = m_cfg . getBool ( " DEBUG " , " show_mem " , false ) ;
2020-08-24 01:09:13 +02:00
2012-12-08 17:17:35 +01:00
/* Check if we want WiFi Gecko */
m_use_wifi_gecko = m_cfg . getBool ( " DEBUG " , " wifi_gecko " , false ) ;
WiFiDebugger . SetBuffer ( m_use_wifi_gecko ) ;
2020-08-24 01:09:13 +02:00
if ( m_use_wifi_gecko )
_initAsyncNetwork ( ) ;
2012-12-08 17:17:35 +01:00
/* Check if we want SD Gecko */
m_use_sd_logging = m_cfg . getBool ( " DEBUG " , " sd_write_log " , false ) ;
LogToSD_SetBuffer ( m_use_sd_logging ) ;
2021-10-07 23:38:32 +02:00
/* ------------------------------------------------------*/
2020-08-24 01:09:13 +02:00
2020-03-19 23:38:32 +01:00
/* Init gamer tags now in case we need to init network on boot */
m_cfg . setString ( " GAMERCARD " , " gamercards " , " wiinnertag " ) ;
m_cfg . getString ( " GAMERCARD " , " wiinnertag_url " , WIINNERTAG_URL ) ;
m_cfg . getString ( " GAMERCARD " , " wiinnertag_key " , " " ) ;
2021-10-07 23:38:32 +02:00
if ( m_cfg . getBool ( " GAMERCARD " , " gamercards_enable " , false ) )
2020-03-19 23:38:32 +01:00
{
vector < string > gamercards = stringToVector ( m_cfg . getString ( " GAMERCARD " , " gamercards " ) , ' | ' ) ;
if ( gamercards . size ( ) = = 0 )
{
gamercards . push_back ( " wiinnertag " ) ;
}
for ( vector < string > : : iterator itr = gamercards . begin ( ) ; itr ! = gamercards . end ( ) ; itr + + )
{
gprintf ( " Found gamercard provider: %s \n " , ( * itr ) . c_str ( ) ) ;
register_card_provider (
m_cfg . getString ( " GAMERCARD " , fmt ( " %s_url " , ( * itr ) . c_str ( ) ) ) . c_str ( ) ,
m_cfg . getString ( " GAMERCARD " , fmt ( " %s_key " , ( * itr ) . c_str ( ) ) ) . c_str ( )
) ;
}
}
2020-08-24 01:09:13 +02:00
/* Init Network if wanted for gamercard if it isn't already inited */
if ( has_enabled_providers ( ) )
_initAsyncNetwork ( ) ;
2021-10-07 23:38:32 +02:00
2020-09-07 22:27:42 +02:00
/* Set the proxy settings */
proxyUseSystem = m_cfg . getBool ( " PROXY " , " proxy_use_system " , true ) ;
memset ( proxyAddress , 0 , sizeof ( proxyAddress ) ) ;
strncpy ( proxyAddress , m_cfg . getString ( " PROXY " , " proxy_address " , " " ) . c_str ( ) , sizeof ( proxyAddress ) - 1 ) ;
proxyPort = m_cfg . getInt ( " PROXY " , " proxy_port " , 0 ) ;
memset ( proxyUsername , 0 , sizeof ( proxyUsername ) ) ;
strncpy ( proxyUsername , m_cfg . getString ( " PROXY " , " proxy_username " , " " ) . c_str ( ) , sizeof ( proxyUsername ) - 1 ) ;
memset ( proxyPassword , 0 , sizeof ( proxyPassword ) ) ;
strncpy ( proxyPassword , m_cfg . getString ( " PROXY " , " proxy_password " , " " ) . c_str ( ) , sizeof ( proxyPassword ) - 1 ) ;
getProxyInfo ( ) ;
2016-04-03 03:03:39 +02:00
2021-10-07 23:38:32 +02:00
/* Set SD only to off if any usb device is attached */
2022-06-18 00:29:09 +02:00
bool cfg_sdonly = m_cfg . getBool ( " GENERAL " , " sd_only " , usb_mounted ? false : true ) ; // will only set it if this doesn't already exist - very first boot up
if ( cfg_sdonly ! = sdOnly ) // done for backwards compatibility with older wiiflow lite's
InternalSave . SaveSDOnly ( cfg_sdonly ) ;
2021-10-07 23:38:32 +02:00
/* set default wii games partition in case this is the first boot */
2021-11-11 00:56:44 +01:00
int wp = m_cfg . getInt ( WII_DOMAIN , " partition " , - 1 ) ;
if ( wp < 0 )
2018-06-27 14:47:03 +02:00
{
2021-10-07 23:38:32 +02:00
if ( ! m_cfg . getBool ( " GENERAL " , " sd_only " ) )
{
for ( int i = SD ; i < = USB8 ; i + + ) // Find first wbfs folder or a partition of wbfs file system
{
if ( DeviceHandle . IsInserted ( i ) & & ( DeviceHandle . GetFSType ( i ) = = PART_FS_WBFS | | stat ( fmt ( GAMES_DIR , DeviceName [ i ] ) , & dummy ) = = 0 ) )
{
wp = i ;
break ;
}
}
}
if ( wp < 0 ) // not found
{
if ( DeviceHandle . IsInserted ( SD ) ) // set to sd if inserted otherwise USB1
wp = 0 ;
else
wp = 1 ;
}
m_cfg . setInt ( WII_DOMAIN , " partition " , wp ) ;
}
/* preferred partition setting - negative 1 means not set by user so skip this */
2021-11-11 00:56:44 +01:00
int pp = m_cfg . getInt ( WII_DOMAIN , " preferred_partition " , - 1 ) ;
if ( pp > = 0 )
2021-10-07 23:38:32 +02:00
{
if ( usb_mounted & & pp > 0 )
m_cfg . setInt ( WII_DOMAIN , " partition " , pp ) ;
else
m_cfg . setInt ( WII_DOMAIN , " partition " , SD ) ;
}
2021-11-11 00:56:44 +01:00
pp = m_cfg . getInt ( GC_DOMAIN , " preferred_partition " , - 1 ) ;
if ( pp > = 0 )
2021-10-07 23:38:32 +02:00
{
if ( usb_mounted & & pp > 0 )
m_cfg . setInt ( GC_DOMAIN , " partition " , USB1 ) ;
else
m_cfg . setInt ( GC_DOMAIN , " partition " , SD ) ;
2012-01-21 21:57:41 +01:00
}
2016-04-03 03:03:39 +02:00
2018-10-31 20:51:15 +01:00
/* Our Wii games dir */
2021-10-07 23:38:32 +02:00
u8 partition = m_cfg . getInt ( WII_DOMAIN , " partition " ) ;
gprintf ( " Setting Wii games partition to: %i \n " , partition ) ;
2016-04-03 03:03:39 +02:00
memset ( wii_games_dir , 0 , 64 ) ;
2018-11-12 21:38:37 +01:00
strncpy ( wii_games_dir , m_cfg . getString ( WII_DOMAIN , " wii_games_dir " , GAMES_DIR ) . c_str ( ) , 63 ) ;
2016-04-03 03:03:39 +02:00
if ( strncmp ( wii_games_dir , " %s:/ " , 4 ) ! = 0 )
strcpy ( wii_games_dir , GAMES_DIR ) ;
gprintf ( " Wii Games Directory: %s \n " , wii_games_dir ) ;
2020-08-24 01:09:13 +02:00
2016-04-03 02:31:02 +02:00
/* GameCube stuff */
memset ( gc_games_dir , 0 , 64 ) ;
2018-11-12 21:38:37 +01:00
strncpy ( gc_games_dir , m_cfg . getString ( GC_DOMAIN , " gc_games_dir " , DF_GC_GAMES_DIR ) . c_str ( ) , 63 ) ;
2016-04-03 02:31:02 +02:00
if ( strncmp ( gc_games_dir , " %s:/ " , 4 ) ! = 0 )
strcpy ( gc_games_dir , DF_GC_GAMES_DIR ) ;
gprintf ( " GameCube Games Directory: %s \n " , gc_games_dir ) ;
2021-10-07 23:38:32 +02:00
m_devo_installed = DEVO_Installed ( m_dataDir . c_str ( ) ) ;
m_nintendont_installed = Nintendont_Installed ( ) ;
2018-05-30 22:45:48 +02:00
m_gc_play_banner_sound = m_cfg . getBool ( GC_DOMAIN , " play_banner_sound " , true ) ;
m_gc_play_default_sound = m_cfg . getBool ( GC_DOMAIN , " play_default_sound " , true ) ;
2016-04-25 02:04:38 +02:00
2021-10-07 23:38:32 +02:00
/* init directories */
2012-11-18 14:40:26 +01:00
m_cacheDir = m_cfg . getString ( " GENERAL " , " dir_cache " , fmt ( " %s/cache " , m_dataDir . c_str ( ) ) ) ;
m_listCacheDir = m_cfg . getString ( " GENERAL " , " dir_list_cache " , fmt ( " %s/lists " , m_cacheDir . c_str ( ) ) ) ;
m_bnrCacheDir = m_cfg . getString ( " GENERAL " , " dir_banner_cache " , fmt ( " %s/banners " , m_cacheDir . c_str ( ) ) ) ;
2019-07-24 18:23:05 +02:00
m_customBnrDir = m_cfg . getString ( " GENERAL " , " dir_custom_banners " , fmt ( " %s/custom_banners " , m_dataDir . c_str ( ) ) ) ;
2012-11-18 14:40:26 +01:00
m_txtCheatDir = m_cfg . getString ( " GENERAL " , " dir_txtcheat " , fmt ( " %s/codes " , m_dataDir . c_str ( ) ) ) ;
m_cheatDir = m_cfg . getString ( " GENERAL " , " dir_cheat " , fmt ( " %s/gct " , m_txtCheatDir . c_str ( ) ) ) ;
m_wipDir = m_cfg . getString ( " GENERAL " , " dir_wip " , fmt ( " %s/wip " , m_txtCheatDir . c_str ( ) ) ) ;
m_settingsDir = m_cfg . getString ( " GENERAL " , " dir_settings " , fmt ( " %s/settings " , m_dataDir . c_str ( ) ) ) ;
m_languagesDir = m_cfg . getString ( " GENERAL " , " dir_languages " , fmt ( " %s/languages " , m_dataDir . c_str ( ) ) ) ;
2019-07-24 18:23:05 +02:00
m_helpDir = m_cfg . getString ( " GENERAL " , " dir_help " , fmt ( " %s/help " , m_dataDir . c_str ( ) ) ) ;
m_screenshotDir = m_cfg . getString ( " GENERAL " , " dir_screenshot " , fmt ( " %s/screenshots " , m_dataDir . c_str ( ) ) ) ;
2012-11-18 14:40:26 +01:00
m_boxPicDir = m_cfg . getString ( " GENERAL " , " dir_box_covers " , fmt ( " %s/boxcovers " , m_dataDir . c_str ( ) ) ) ;
m_picDir = m_cfg . getString ( " GENERAL " , " dir_flat_covers " , fmt ( " %s/covers " , m_dataDir . c_str ( ) ) ) ;
2016-04-30 16:19:30 +02:00
m_themeDir = m_cfg . getString ( " GENERAL " , " dir_themes_lite " , fmt ( " %s/themes_lite " , m_dataDir . c_str ( ) ) ) ;
2019-07-24 18:23:05 +02:00
m_coverflowsDir = m_cfg . getString ( " GENERAL " , " dir_coverflows " , fmt ( " %s/coverflows " , m_themeDir . c_str ( ) ) ) ;
2012-11-18 14:40:26 +01:00
m_musicDir = m_cfg . getString ( " GENERAL " , " dir_music " , fmt ( " %s/music " , m_dataDir . c_str ( ) ) ) ;
m_videoDir = m_cfg . getString ( " GENERAL " , " dir_trailers " , fmt ( " %s/trailers " , m_dataDir . c_str ( ) ) ) ;
m_fanartDir = m_cfg . getString ( " GENERAL " , " dir_fanart " , fmt ( " %s/fanart " , m_dataDir . c_str ( ) ) ) ;
2019-07-24 18:23:05 +02:00
m_bckgrndsDir = m_cfg . getString ( " GENERAL " , " dir_backgrounds " , fmt ( " %s/backgrounds " , m_dataDir . c_str ( ) ) ) ;
m_sourceDir = m_cfg . getString ( " GENERAL " , " dir_Source " , fmt ( " %s/source_menu " , m_dataDir . c_str ( ) ) ) ;
m_pluginsDir = m_cfg . getString ( " GENERAL " , " dir_plugins " , fmt ( " %s/plugins " , m_dataDir . c_str ( ) ) ) ;
m_pluginDataDir = m_cfg . getString ( " GENERAL " , " dir_plugins_data " , fmt ( " %s/plugins_data " , m_dataDir . c_str ( ) ) ) ;
2018-12-30 23:00:51 +01:00
m_cartDir = m_cfg . getString ( " GENERAL " , " dir_cart " , fmt ( " %s/cart_disk " , m_dataDir . c_str ( ) ) ) ;
m_snapDir = m_cfg . getString ( " GENERAL " , " dir_snap " , fmt ( " %s/snapshots " , m_dataDir . c_str ( ) ) ) ;
2019-07-24 18:23:05 +02:00
2012-11-18 14:40:26 +01:00
/* Create our Folder Structure */
fsop_MakeFolder ( m_dataDir . c_str ( ) ) ; //D'OH!
2012-07-05 18:18:23 +02:00
2012-11-18 14:40:26 +01:00
fsop_MakeFolder ( m_cacheDir . c_str ( ) ) ;
fsop_MakeFolder ( m_listCacheDir . c_str ( ) ) ;
fsop_MakeFolder ( m_bnrCacheDir . c_str ( ) ) ;
2019-07-24 18:23:05 +02:00
fsop_MakeFolder ( m_customBnrDir . c_str ( ) ) ;
2012-07-05 18:18:23 +02:00
2012-11-18 14:40:26 +01:00
fsop_MakeFolder ( m_txtCheatDir . c_str ( ) ) ;
fsop_MakeFolder ( m_cheatDir . c_str ( ) ) ;
fsop_MakeFolder ( m_wipDir . c_str ( ) ) ;
2012-07-05 18:18:23 +02:00
2012-11-18 14:40:26 +01:00
fsop_MakeFolder ( m_settingsDir . c_str ( ) ) ;
fsop_MakeFolder ( m_languagesDir . c_str ( ) ) ;
2019-07-24 18:23:05 +02:00
fsop_MakeFolder ( m_screenshotDir . c_str ( ) ) ;
fsop_MakeFolder ( m_helpDir . c_str ( ) ) ;
2012-11-18 14:40:26 +01:00
fsop_MakeFolder ( m_boxPicDir . c_str ( ) ) ;
fsop_MakeFolder ( m_picDir . c_str ( ) ) ;
fsop_MakeFolder ( m_themeDir . c_str ( ) ) ;
2019-07-24 18:23:05 +02:00
fsop_MakeFolder ( m_coverflowsDir . c_str ( ) ) ;
2012-11-18 14:40:26 +01:00
fsop_MakeFolder ( m_musicDir . c_str ( ) ) ;
fsop_MakeFolder ( m_videoDir . c_str ( ) ) ;
fsop_MakeFolder ( m_fanartDir . c_str ( ) ) ;
2019-07-24 18:23:05 +02:00
fsop_MakeFolder ( m_bckgrndsDir . c_str ( ) ) ;
2012-01-21 21:57:41 +01:00
2019-07-24 18:23:05 +02:00
fsop_MakeFolder ( m_sourceDir . c_str ( ) ) ;
fsop_MakeFolder ( m_pluginsDir . c_str ( ) ) ;
fsop_MakeFolder ( m_pluginDataDir . c_str ( ) ) ;
fsop_MakeFolder ( m_cartDir . c_str ( ) ) ;
fsop_MakeFolder ( m_snapDir . c_str ( ) ) ;
2021-11-11 00:56:44 +01:00
if ( ! isWiiVC )
{
/* Emu nands init even if not being used */
memset ( emu_nands_dir , 0 , sizeof ( emu_nands_dir ) ) ;
2022-02-19 00:20:12 +01:00
bool vwiinands = IsOnWiiU ( ) & & m_cfg . getBool ( CHANNEL_DOMAIN , " use_vwiinands " , true ) ;
strncpy ( emu_nands_dir , vwiinands ? " vwiinands " : " nands " , sizeof ( emu_nands_dir ) - 1 ) ;
2021-11-11 00:56:44 +01:00
2022-02-19 00:20:12 +01:00
int dev = DeviceHandle . PartitionUsableForNandEmu ( SD ) ? 0 : 1 ;
2021-11-11 00:56:44 +01:00
string emuNand = m_cfg . getString ( CHANNEL_DOMAIN , " current_emunand " , " default " ) ; // just to set to default on first boot
2022-02-19 00:20:12 +01:00
int emuPart = m_cfg . getInt ( CHANNEL_DOMAIN , " partition " , dev ) ;
2021-11-11 00:56:44 +01:00
string savesNand = m_cfg . getString ( WII_DOMAIN , " current_save_emunand " , " default " ) ;
2022-02-19 00:20:12 +01:00
int savesPart = m_cfg . getInt ( WII_DOMAIN , " savepartition " , dev ) ;
2021-11-11 00:56:44 +01:00
gprintf ( " emunand = %s:/%s/%s \n " , DeviceName [ emuPart ] , emu_nands_dir , emuNand . c_str ( ) ) ;
gprintf ( " savesnand = %s:/%s/%s \n " , DeviceName [ savesPart ] , emu_nands_dir , savesNand . c_str ( ) ) ;
2022-02-07 14:19:27 +01:00
m_cfg . getInt ( CHANNEL_DOMAIN , " emulation " , 0 ) ; // partial by default
m_cfg . getInt ( WII_DOMAIN , " save_emulation " , 0 ) ; // off by default
2021-11-11 00:56:44 +01:00
}
2016-05-15 02:29:16 +02:00
2021-10-07 23:38:32 +02:00
/* misc. setup */
SoundHandle . Init ( ) ;
m_gameSound . SetVoice ( 1 ) ;
_loadDefaultFont ( ) ; // load default font
LWP_MutexInit ( & m_mutex , 0 ) ;
2016-04-30 16:19:30 +02:00
2021-10-07 23:38:32 +02:00
/* Load cIOS Map */
_installed_cios . clear ( ) ;
_load_installed_cioses ( ) ;
/* Check if wiiflow is parental locked */
m_locked = m_cfg . getString ( " GENERAL " , " parent_code " , " " ) . size ( ) > = 4 ;
/* Switch WFLA to DWFA in case they were using old wiiflow lite */
if ( m_cfg . getString ( " GENERAL " , " returnto " ) = = " WFLA " )
m_cfg . setString ( " GENERAL " , " returnto " , " DWFA " ) ;
/* set WIIFLOW_DEF exit to option */
/* 0 thru 2 of exit to enum (EXIT_TO_MENU, EXIT_TO_HBC, EXIT_TO_WIIU) in sys.h */
int exit_to = min ( max ( 0 , m_cfg . getInt ( " GENERAL " , " exit_to " , 0 ) ) , ( int ) ARRAY_SIZE ( CMenu : : _exitTo ) - 1 ) ;
Sys_ExitTo ( exit_to ) ;
/* load misc config files */
2012-05-04 14:30:43 +02:00
m_cat . load ( fmt ( " %s/ " CAT_FILENAME , m_settingsDir . c_str ( ) ) ) ;
-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_gcfg1 . load ( fmt ( " %s/ " GAME_SETTINGS1_FILENAME , m_settingsDir . c_str ( ) ) ) ;
2019-04-08 18:10:30 +02:00
m_platform . load ( fmt ( " %s/platform.ini " , m_pluginDataDir . c_str ( ) ) ) ;
2016-04-03 02:51:40 +02:00
2020-07-17 22:23:42 +02:00
/* Init plugins */
2018-10-31 20:51:15 +01:00
m_plugin . init ( m_pluginsDir ) ;
2020-07-17 22:23:42 +02:00
vector < string > magics = m_cfg . getStrings ( PLUGIN_DOMAIN , " enabled_plugins " , ' , ' ) ;
if ( magics . size ( ) > 0 )
2016-04-03 02:51:40 +02:00
{
2020-07-17 22:23:42 +02:00
enabledPluginsCount = 0 ;
string enabledMagics ;
for ( u8 i = 0 ; i < magics . size ( ) ; i + + )
2016-04-03 02:51:40 +02:00
{
2020-07-17 22:23:42 +02:00
u8 pos = m_plugin . GetPluginPosition ( strtoul ( magics [ i ] . c_str ( ) , NULL , 16 ) ) ;
if ( pos < 255 )
2016-04-03 02:51:40 +02:00
{
2020-07-17 22:23:42 +02:00
enabledPluginsCount + + ;
m_plugin . SetEnablePlugin ( pos , 2 ) ;
2020-09-01 01:23:52 +02:00
if ( enabledPluginsCount = = 1 )
enabledMagics = magics [ i ] ;
2020-07-17 22:23:42 +02:00
else
enabledMagics . append ( ' , ' + magics [ i ] ) ;
2016-04-03 02:51:40 +02:00
}
}
2020-07-17 22:23:42 +02:00
m_cfg . setString ( PLUGIN_DOMAIN , " enabled_plugins " , enabledMagics ) ;
magics . clear ( ) ;
2016-04-03 02:51:40 +02:00
}
2018-10-31 20:51:15 +01:00
2016-06-20 23:03:40 +02:00
/* Set wiiflow language */
2013-08-08 20:21:11 +02:00
const char * defLang = " Default " ;
2012-01-21 21:57:41 +01:00
switch ( CONF_GetLanguage ( ) )
{
case CONF_LANG_JAPANESE :
2013-08-08 20:21:11 +02:00
defLang = " japanese " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_GERMAN :
2013-08-08 20:21:11 +02:00
defLang = " german " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_FRENCH :
2013-08-08 20:21:11 +02:00
defLang = " french " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_SPANISH :
2013-08-08 20:21:11 +02:00
defLang = " spanish " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_ITALIAN :
2013-08-08 20:21:11 +02:00
defLang = " italian " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_DUTCH :
2013-08-08 20:21:11 +02:00
defLang = " dutch " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_SIMP_CHINESE :
2013-08-08 20:21:11 +02:00
defLang = " chinese_s " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_TRAD_CHINESE :
2013-08-08 20:21:11 +02:00
defLang = " chinese_t " ;
2012-01-21 21:57:41 +01:00
break ;
case CONF_LANG_KOREAN :
2013-08-08 20:21:11 +02:00
defLang = " korean " ;
2012-01-21 21:57:41 +01:00
break ;
2018-12-09 22:16:54 +01:00
case CONF_LANG_ENGLISH :
defLang = " english " ;
break ;
2012-01-21 21:57:41 +01:00
}
2018-12-09 22:16:54 +01:00
if ( CONF_GetArea ( ) = = CONF_AREA_BRA )
2013-08-08 20:21:11 +02:00
defLang = " brazilian " ;
2012-01-21 21:57:41 +01:00
2013-08-08 20:21:11 +02:00
m_curLanguage = m_cfg . getString ( " GENERAL " , " language " , defLang ) ;
if ( ! m_loc . load ( fmt ( " %s/%s.ini " , m_languagesDir . c_str ( ) , m_curLanguage . c_str ( ) ) ) )
2012-01-21 21:57:41 +01:00
{
2013-08-08 20:21:11 +02:00
m_curLanguage = " Default " ;
m_cfg . setString ( " GENERAL " , " language " , m_curLanguage . c_str ( ) ) ;
m_loc . unload ( ) ;
2012-01-21 21:57:41 +01:00
}
2012-10-03 23:34:37 +02:00
2016-06-20 23:03:40 +02:00
/* Init gametdb and custom titles for game list making */
2021-09-20 15:30:12 +02:00
m_cacheList . Init ( m_settingsDir . c_str ( ) , m_loc . getString ( m_curLanguage , " gametdb_code " , " EN " ) . c_str ( ) , m_pluginDataDir . c_str ( ) ,
2021-10-07 23:38:32 +02:00
m_cfg . getString ( CONFIG_FILENAME_SKIP_DOMAIN , CONFIG_FILENAME_SKIP_KEY , CONFIG_FILENAME_SKIP_DEFAULT ) ) ;
2012-01-21 21:57:41 +01:00
2021-10-07 23:38:32 +02:00
/* Coverflow init */
CoverFlow . init ( m_base_font , m_base_font_size , m_vid . vid_50hz ( ) ) ;
/* Load theme and coverflow files */
m_themeName = m_cfg . getString ( " GENERAL " , " theme " , " default " ) ;
m_themeDataDir = fmt ( " %s/%s " , m_themeDir . c_str ( ) , m_themeName . c_str ( ) ) ;
m_theme . load ( fmt ( " %s.ini " , m_themeDataDir . c_str ( ) ) ) ;
m_coverflow . load ( fmt ( " %s/%s.ini " , m_coverflowsDir . c_str ( ) , m_themeName . c_str ( ) ) ) ;
if ( ! m_coverflow . loaded ( ) )
m_coverflow . load ( fmt ( " %s/default.ini " , m_coverflowsDir . c_str ( ) ) ) ;
2016-06-20 23:03:40 +02:00
/* Init the onscreen pointer */
2012-01-21 21:57:41 +01:00
m_aa = 3 ;
CColor pShadowColor = m_theme . getColor ( " GENERAL " , " pointer_shadow_color " , CColor ( 0x3F000000 ) ) ;
float pShadowX = m_theme . getFloat ( " GENERAL " , " pointer_shadow_x " , 3.f ) ;
float pShadowY = m_theme . getFloat ( " GENERAL " , " pointer_shadow_y " , 3.f ) ;
bool pShadowBlur = m_theme . getBool ( " GENERAL " , " pointer_shadow_blur " , false ) ;
2018-08-01 14:27:12 +02:00
for ( int chan = WPAD_MAX_WIIMOTES - 1 ; chan > = 0 ; chan - - )
2012-01-21 21:57:41 +01:00
{
2012-05-04 14:30:43 +02:00
m_cursor [ chan ] . init ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( " GENERAL " , fmt ( " pointer%i " , chan + 1 ) ) . c_str ( ) ) ,
2012-01-21 21:57:41 +01:00
m_vid . wide ( ) , pShadowColor , pShadowX , pShadowY , pShadowBlur , chan ) ;
WPAD_SetVRes ( chan , m_vid . width ( ) + m_cursor [ chan ] . width ( ) , m_vid . height ( ) + m_cursor [ chan ] . height ( ) ) ;
}
2012-07-12 17:53:04 +02:00
2016-06-20 23:03:40 +02:00
/* Init background Music Player and song info */
2012-11-18 14:40:26 +01:00
MusicPlayer . Init ( m_cfg , m_musicDir , fmt ( " %s/music " , m_themeDataDir . c_str ( ) ) ) ;
-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_music_info = m_cfg . getBool ( " GENERAL " , " display_music_info " , false ) ;
2020-05-26 00:17:50 +02:00
MusicPlayer . SetResampleSetting ( m_cfg . getBool ( " general " , " resample_to_48khz " , false ) ) ;
2012-01-21 21:57:41 +01:00
2016-06-20 23:03:40 +02:00
/* set sound volumes */
2012-11-11 19:28:03 +01:00
CoverFlow . setSoundVolume ( m_cfg . getInt ( " GENERAL " , " sound_volume_coverflow " , 255 ) ) ;
2012-01-21 21:57:41 +01:00
m_bnrSndVol = m_cfg . getInt ( " GENERAL " , " sound_volume_bnr " , 255 ) ;
2012-07-10 14:02:06 +02:00
m_bnr_settings = m_cfg . getBool ( " GENERAL " , " banner_in_settings " , true ) ;
2021-10-07 23:38:32 +02:00
/* Init Button Manager and build the menus */
_buildMenus ( ) ;
2017-09-22 00:03:41 +02:00
return true ;
2012-01-21 21:57:41 +01:00
}
2012-05-22 22:08:56 +02:00
bool cleaned_up = false ;
2012-08-24 20:01:40 +02:00
void CMenu : : cleanup ( )
2012-01-21 21:57:41 +01:00
{
2012-05-22 22:08:56 +02:00
if ( cleaned_up )
return ;
2012-09-16 15:41:31 +02:00
//gprintf("MEM1_freesize(): %i\nMEM2_freesize(): %i\n", MEM1_freesize(), MEM2_freesize());
m_btnMgr . hide ( m_mainLblCurMusic ) ;
2017-05-15 19:50:24 +02:00
_stopSounds ( ) ;
MusicPlayer . Cleanup ( ) ;
2012-07-08 15:35:59 +02:00
_cleanupDefaultFont ( ) ;
2013-09-21 16:03:45 +02:00
CoverFlow . shutdown ( ) ; /* possibly plugin flow crash so cleanup early */
2012-10-13 18:57:03 +02:00
m_banner . DeleteBanner ( ) ;
2012-05-16 23:52:14 +02:00
m_plugin . Cleanup ( ) ;
2022-06-01 00:33:27 +02:00
m_source . save ( true ) ;
2019-04-08 18:10:30 +02:00
m_platform . unload ( ) ;
m_loc . unload ( ) ;
2012-11-03 20:16:03 +01:00
_Theme_Cleanup ( ) ;
2019-04-08 18:10:30 +02:00
for ( int chan = WPAD_MAX_WIIMOTES - 1 ; chan > = 0 ; chan - - )
m_cursor [ chan ] . cleanup ( ) ;
2012-11-03 20:16:03 +01:00
m_gameSound . FreeMemory ( ) ;
2012-10-15 21:16:14 +02:00
SoundHandle . Cleanup ( ) ;
2012-01-21 21:57:41 +01:00
soundDeinit ( ) ;
2012-05-09 20:47:25 +02:00
2012-08-13 18:30:34 +02:00
m_vid . cleanup ( ) ;
2012-07-21 19:05:58 +02:00
2012-07-08 15:35:59 +02:00
wiiLightOff ( ) ;
LWP_MutexDestroy ( m_mutex ) ;
m_mutex = 0 ;
2012-05-13 17:13:33 +02:00
2012-05-22 22:08:56 +02:00
cleaned_up = true ;
2012-09-16 15:41:31 +02:00
//gprintf(" \nMemory cleaned up\n");
2012-07-18 16:09:28 +02:00
gprintf ( " MEM1_freesize(): %i \n MEM2_freesize(): %i \n " , MEM1_freesize ( ) , MEM2_freesize ( ) ) ;
2012-05-12 19:14:25 +02:00
}
2012-11-03 20:16:03 +01:00
void CMenu : : _Theme_Cleanup ( void )
{
2012-11-04 20:22:02 +01:00
/* Backgrounds */
2012-12-28 15:19:40 +01:00
TexHandle . Cleanup ( theme . bg ) ;
2012-11-29 21:30:05 +01:00
m_prevBg = NULL ;
2012-11-16 23:00:20 +01:00
m_nextBg = NULL ;
2012-12-28 15:19:40 +01:00
TexHandle . Cleanup ( m_curBg ) ;
2012-11-16 23:40:20 +01:00
m_lqBg = NULL ;
2019-11-24 00:54:38 +01:00
TexHandle . Cleanup ( m_mainCustomBg [ 0 ] ) ;
TexHandle . Cleanup ( m_mainCustomBg [ 1 ] ) ;
2012-11-04 20:22:02 +01:00
/* Buttons */
2012-12-28 15:19:40 +01:00
TexHandle . Cleanup ( theme . btnTexL ) ;
TexHandle . Cleanup ( theme . btnTexR ) ;
TexHandle . Cleanup ( theme . btnTexC ) ;
TexHandle . Cleanup ( theme . btnTexLS ) ;
TexHandle . Cleanup ( theme . btnTexRS ) ;
TexHandle . Cleanup ( theme . btnTexCS ) ;
TexHandle . Cleanup ( theme . btnAUOn ) ;
TexHandle . Cleanup ( theme . btnAUOns ) ;
TexHandle . Cleanup ( theme . btnAUOff ) ;
TexHandle . Cleanup ( theme . btnAUOffs ) ;
TexHandle . Cleanup ( theme . btnENOn ) ;
TexHandle . Cleanup ( theme . btnENOns ) ;
TexHandle . Cleanup ( theme . btnENOff ) ;
TexHandle . Cleanup ( theme . btnENOffs ) ;
TexHandle . Cleanup ( theme . btnJAOn ) ;
TexHandle . Cleanup ( theme . btnJAOns ) ;
TexHandle . Cleanup ( theme . btnJAOff ) ;
TexHandle . Cleanup ( theme . btnJAOffs ) ;
TexHandle . Cleanup ( theme . btnFROn ) ;
TexHandle . Cleanup ( theme . btnFROns ) ;
TexHandle . Cleanup ( theme . btnFROff ) ;
TexHandle . Cleanup ( theme . btnFROffs ) ;
TexHandle . Cleanup ( theme . btnDEOn ) ;
TexHandle . Cleanup ( theme . btnDEOns ) ;
TexHandle . Cleanup ( theme . btnDEOff ) ;
TexHandle . Cleanup ( theme . btnDEOffs ) ;
TexHandle . Cleanup ( theme . btnESOn ) ;
TexHandle . Cleanup ( theme . btnESOns ) ;
TexHandle . Cleanup ( theme . btnESOff ) ;
TexHandle . Cleanup ( theme . btnESOffs ) ;
TexHandle . Cleanup ( theme . btnITOn ) ;
TexHandle . Cleanup ( theme . btnITOns ) ;
TexHandle . Cleanup ( theme . btnITOff ) ;
TexHandle . Cleanup ( theme . btnITOffs ) ;
TexHandle . Cleanup ( theme . btnNLOn ) ;
TexHandle . Cleanup ( theme . btnNLOns ) ;
TexHandle . Cleanup ( theme . btnNLOff ) ;
TexHandle . Cleanup ( theme . btnNLOffs ) ;
TexHandle . Cleanup ( theme . btnPTOn ) ;
TexHandle . Cleanup ( theme . btnPTOns ) ;
TexHandle . Cleanup ( theme . btnPTOff ) ;
TexHandle . Cleanup ( theme . btnPTOffs ) ;
TexHandle . Cleanup ( theme . btnRUOn ) ;
TexHandle . Cleanup ( theme . btnRUOns ) ;
TexHandle . Cleanup ( theme . btnRUOff ) ;
TexHandle . Cleanup ( theme . btnRUOffs ) ;
TexHandle . Cleanup ( theme . btnKOOn ) ;
TexHandle . Cleanup ( theme . btnKOOns ) ;
TexHandle . Cleanup ( theme . btnKOOff ) ;
TexHandle . Cleanup ( theme . btnKOOffs ) ;
TexHandle . Cleanup ( theme . btnZHCNOn ) ;
TexHandle . Cleanup ( theme . btnZHCNOns ) ;
TexHandle . Cleanup ( theme . btnZHCNOff ) ;
TexHandle . Cleanup ( theme . btnZHCNOffs ) ;
TexHandle . Cleanup ( theme . btnTexPlus ) ;
TexHandle . Cleanup ( theme . btnTexPlusS ) ;
TexHandle . Cleanup ( theme . btnTexMinus ) ;
TexHandle . Cleanup ( theme . btnTexMinusS ) ;
2012-11-04 20:22:02 +01:00
/* Checkboxes */
2012-12-28 15:19:40 +01:00
TexHandle . Cleanup ( theme . checkboxoff ) ;
TexHandle . Cleanup ( theme . checkboxoffs ) ;
TexHandle . Cleanup ( theme . checkboxon ) ;
TexHandle . Cleanup ( theme . checkboxons ) ;
TexHandle . Cleanup ( theme . checkboxHid ) ;
TexHandle . Cleanup ( theme . checkboxHids ) ;
TexHandle . Cleanup ( theme . checkboxReq ) ;
TexHandle . Cleanup ( theme . checkboxReqs ) ;
2012-11-04 20:22:02 +01:00
/* Progress Bars */
2012-12-28 15:19:40 +01:00
TexHandle . Cleanup ( theme . pbarTexL ) ;
TexHandle . Cleanup ( theme . pbarTexR ) ;
TexHandle . Cleanup ( theme . pbarTexC ) ;
TexHandle . Cleanup ( theme . pbarTexLS ) ;
TexHandle . Cleanup ( theme . pbarTexRS ) ;
TexHandle . Cleanup ( theme . pbarTexCS ) ;
2020-08-14 01:29:43 +02:00
/* plugin game snapshot and overlay */
TexHandle . Cleanup ( m_game_snap ) ;
TexHandle . Cleanup ( m_game_overlay ) ;
2012-11-04 20:22:02 +01:00
/* Other Theme Stuff */
2012-11-03 20:16:03 +01:00
for ( TexSet : : iterator texture = theme . texSet . begin ( ) ; texture ! = theme . texSet . end ( ) ; + + texture )
2012-12-28 15:19:40 +01:00
TexHandle . Cleanup ( texture - > second ) ;
2013-09-02 00:31:46 +02:00
for ( vector < SFont > : : iterator font = theme . fontSet . begin ( ) ; font ! = theme . fontSet . end ( ) ; + + font )
font - > ClearData ( ) ;
2012-11-03 20:16:03 +01:00
for ( SoundSet : : iterator sound = theme . soundSet . begin ( ) ; sound ! = theme . soundSet . end ( ) ; + + sound )
sound - > second - > FreeMemory ( ) ;
theme . texSet . clear ( ) ;
theme . fontSet . clear ( ) ;
theme . soundSet . clear ( ) ;
2019-01-09 13:28:59 +01:00
m_theme . unload ( ) ;
2016-04-30 16:19:30 +02:00
m_coverflow . unload ( ) ;
2012-11-03 20:16:03 +01:00
}
2012-01-21 21:57:41 +01:00
void CMenu : : _setAA ( int aa )
{
switch ( aa )
{
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
case 8 :
m_aa = aa ;
break ;
case 7 :
m_aa = 6 ;
break ;
default :
m_aa = 0 ;
}
}
2012-11-03 20:16:03 +01:00
void CMenu : : _loadCFCfg ( )
2012-01-21 21:57:41 +01:00
{
const char * domain = " _COVERFLOW " ;
//gprintf("Preparing to load sounds from %s\n", m_themeDataDir.c_str());
2022-01-14 22:10:56 +01:00
CoverFlow . setCachePath ( m_cacheDir . c_str ( ) ) ;
2012-11-11 19:28:03 +01:00
CoverFlow . setBufferSize ( m_cfg . getInt ( " GENERAL " , " cover_buffer " , 20 ) ) ;
2012-01-21 21:57:41 +01:00
// Coverflow Sounds
2012-11-11 19:28:03 +01:00
CoverFlow . setSounds (
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
new GuiSound ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( domain , " sound_flip " ) . c_str ( ) ) ) ,
_sound ( theme . soundSet , m_theme . getString ( domain , " sound_hover " , " " ) . c_str ( ) , hover_wav , hover_wav_size , " default_btn_hover " , false ) ,
_sound ( theme . soundSet , m_theme . getString ( domain , " sound_select " , " " ) . c_str ( ) , click_wav , click_wav_size , " default_btn_click " , false ) ,
new GuiSound ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( domain , " sound_cancel " ) . c_str ( ) ) )
2012-01-21 21:57:41 +01:00
) ;
2016-04-30 16:19:30 +02:00
2012-01-21 21:57:41 +01:00
// Textures
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
string texLoading = fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( domain , " loading_cover_box " ) . c_str ( ) ) ;
string texNoCover = fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( domain , " missing_cover_box " ) . c_str ( ) ) ;
string texLoadingFlat = fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( domain , " loading_cover_flat " ) . c_str ( ) ) ;
string texNoCoverFlat = fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , m_theme . getString ( domain , " missing_cover_flat " ) . c_str ( ) ) ;
2012-11-11 19:28:03 +01:00
CoverFlow . setTextures ( texLoading , texLoadingFlat , texNoCover , texNoCoverFlat ) ;
2012-01-21 21:57:41 +01:00
// Font
2019-01-30 23:37:36 +01:00
CoverFlow . setFont ( _font ( domain , " font " , theme . titleFont ) , m_theme . getColor ( domain , " font_color " , CColor ( 0xFFFFFFFF ) ) ) ;
2012-01-21 21:57:41 +01:00
}
Vector3D CMenu : : _getCFV3D ( const string & domain , const string & key , const Vector3D & def , bool otherScrnFmt )
{
string key169 ( key ) ;
string key43 ( key ) ;
key43 + = " _4_3 " ;
if ( m_vid . wide ( ) = = otherScrnFmt )
swap ( key169 , key43 ) ;
2016-04-30 16:19:30 +02:00
if ( m_coverflow . has ( domain , key169 ) )
2012-01-21 21:57:41 +01:00
{
2016-04-30 16:19:30 +02:00
Vector3D v ( m_coverflow . getVector3D ( domain , key169 ) ) ;
m_coverflow . getVector3D ( domain , key43 , v ) ;
2012-01-21 21:57:41 +01:00
return v ;
}
2016-04-30 16:19:30 +02:00
return m_coverflow . getVector3D ( domain , key169 , m_coverflow . getVector3D ( domain , key43 , def ) ) ;
2012-01-21 21:57:41 +01:00
}
int CMenu : : _getCFInt ( const string & domain , const string & key , int def , bool otherScrnFmt )
{
string key169 ( key ) ;
string key43 ( key ) ;
key43 + = " _4_3 " ;
if ( m_vid . wide ( ) = = otherScrnFmt )
swap ( key169 , key43 ) ;
2016-04-30 16:19:30 +02:00
if ( m_coverflow . has ( domain , key169 ) )
2012-01-21 21:57:41 +01:00
{
2016-04-30 16:19:30 +02:00
int v = m_coverflow . getInt ( domain , key169 ) ;
m_coverflow . getInt ( domain , key43 , v ) ;
2012-01-21 21:57:41 +01:00
return v ;
}
2016-04-30 16:19:30 +02:00
return m_coverflow . getInt ( domain , key169 , m_coverflow . getInt ( domain , key43 , def ) ) ;
2012-01-21 21:57:41 +01:00
}
float CMenu : : _getCFFloat ( const string & domain , const string & key , float def , bool otherScrnFmt )
{
string key169 ( key ) ;
string key43 ( key ) ;
key43 + = " _4_3 " ;
if ( m_vid . wide ( ) = = otherScrnFmt )
swap ( key169 , key43 ) ;
2016-04-30 16:19:30 +02:00
if ( m_coverflow . has ( domain , key169 ) )
2012-01-21 21:57:41 +01:00
{
2016-04-30 16:19:30 +02:00
float v = m_coverflow . getFloat ( domain , key169 ) ;
m_coverflow . getFloat ( domain , key43 , v ) ;
2012-01-21 21:57:41 +01:00
return v ;
}
2016-04-30 16:19:30 +02:00
return m_coverflow . getFloat ( domain , key169 , m_coverflow . getFloat ( domain , key43 , def ) ) ;
2012-01-21 21:57:41 +01:00
}
void CMenu : : _loadCFLayout ( int version , bool forceAA , bool otherScrnFmt )
{
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
string domain = fmt ( " %s_%i " , cf_domain , version ) ;
2016-04-30 16:19:30 +02:00
string domainSel = fmt ( " %s_%i_S " , cf_domain , version ) ;
2019-03-18 19:39:28 +01:00
bool smallflow = strcasecmp ( cf_domain , " _SMALLFLOW " ) = = 0 ;
2012-01-21 21:57:41 +01:00
bool sf = otherScrnFmt ;
2016-04-30 16:19:30 +02:00
int max_fsaa = m_coverflow . getInt ( domain , " max_fsaa " , 3 ) ;
2012-04-08 17:54:34 +02:00
_setAA ( forceAA ? max_fsaa : min ( max_fsaa , m_cfg . getInt ( " GENERAL " , " max_fsaa " , 3 ) ) ) ;
2012-01-21 21:57:41 +01:00
2016-04-30 16:19:30 +02:00
CoverFlow . setTextureQuality ( m_coverflow . getFloat ( domain , " tex_lod_bias " , - 3.f ) ,
m_coverflow . getInt ( domain , " tex_aniso " , 2 ) ,
m_coverflow . getBool ( domain , " tex_edge_lod " , true ) ) ;
2012-01-21 21:57:41 +01:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
CoverFlow . setRange ( _getCFInt ( domain , " rows " , ( smallflow ? 5 : 1 ) , sf ) , _getCFInt ( domain , " columns " , 11 , sf ) ) ;
2012-01-21 21:57:41 +01:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCameraPos ( false ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFV3D ( domain , " camera_pos " , Vector3D ( 0.f , 0.f , 5.f ) , sf ) ,
_getCFV3D ( domain , " camera_aim " , Vector3D ( 0.f , 0.f , 0.f ) , sf ) ) ;
2012-01-21 21:57:41 +01:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCameraPos ( true ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFV3D ( domainSel , " camera_pos " , Vector3D ( 0.f , 0.f , 5.f ) , sf ) ,
_getCFV3D ( domainSel , " camera_aim " , Vector3D ( 0.f , 0.f , 0.f ) , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCameraOsc ( false ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFV3D ( domain , " camera_osc_speed " , Vector3D ( 2.f , 0.f , 0.f ) , sf ) ,
_getCFV3D ( domain , " camera_osc_amp " , Vector3D ( 0.1f , 0.f , 0.f ) , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCameraOsc ( true ,
2012-04-08 17:54:34 +02:00
_getCFV3D ( domainSel , " camera_osc_speed " , Vector3D ( ) , sf ) ,
_getCFV3D ( domainSel , " camera_osc_amp " , Vector3D ( ) , sf ) ) ;
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
float def_cvr_posX = smallflow ? 1.f : 1.6f ;
float def_cvr_posY = smallflow ? - 0.8f : - 1.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverPos ( false ,
2012-04-08 17:54:34 +02:00
_getCFV3D ( domain , " left_pos " , Vector3D ( - def_cvr_posX , def_cvr_posY , 0.f ) , sf ) ,
_getCFV3D ( domain , " right_pos " , Vector3D ( def_cvr_posX , def_cvr_posY , 0.f ) , sf ) ,
2019-06-20 21:41:18 +02:00
_getCFV3D ( domain , " center_pos " , Vector3D ( 0.f , def_cvr_posY , 1.f ) , sf ) ,
2012-04-08 17:54:34 +02:00
_getCFV3D ( domain , " row_center_pos " , Vector3D ( 0.f , def_cvr_posY , 0.f ) , sf ) ) ;
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
if ( smallflow )
CoverFlow . setCoverPos ( true ,
_getCFV3D ( domainSel , " left_pos " , Vector3D ( - 4.05f , - 0.6f , - 1.f ) , sf ) ,
_getCFV3D ( domainSel , " right_pos " , Vector3D ( 3.35f , - 0.6f , - 1.f ) , sf ) ,
_getCFV3D ( domainSel , " center_pos " , Vector3D ( - 0.5f , - 0.8f , 2.6f ) , sf ) ,
_getCFV3D ( domainSel , " row_center_pos " , Vector3D ( - 3.05f , - 0.6f , - 1.f ) , sf ) ) ;
else
CoverFlow . setCoverPos ( true ,
_getCFV3D ( domainSel , " left_pos " , Vector3D ( - 4.7f , - 1.f , 0.f ) , sf ) ,
_getCFV3D ( domainSel , " right_pos " , Vector3D ( 4.7f , - 1.f , 0.f ) , sf ) ,
_getCFV3D ( domainSel , " center_pos " , Vector3D ( - 0.6f , - 1.f , 2.6f ) , sf ) ,
_getCFV3D ( domainSel , " row_center_pos " , Vector3D ( 0.f , 0.f , 0.f ) , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverAngleOsc ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " cover_osc_speed " , Vector3D ( 2.f , 2.f , 0.f ) ) ,
m_coverflow . getVector3D ( domain , " cover_osc_amp " , Vector3D ( 5.f , 10.f , 0.f ) ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverAngleOsc ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " cover_osc_speed " , Vector3D ( 2.1f , 2.1f , 0.f ) ) ,
m_coverflow . getVector3D ( domainSel , " cover_osc_amp " , Vector3D ( 2.f , 5.f , 0.f ) ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverPosOsc ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " cover_pos_osc_speed " ) ,
m_coverflow . getVector3D ( domain , " cover_pos_osc_amp " ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverPosOsc ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " cover_pos_osc_speed " ) ,
m_coverflow . getVector3D ( domainSel , " cover_pos_osc_amp " ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
float spacerX = smallflow ? 1.f : 0.35f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setSpacers ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " left_spacer " , Vector3D ( - spacerX , 0.f , 0.f ) ) ,
m_coverflow . getVector3D ( domain , " right_spacer " , Vector3D ( spacerX , 0.f , 0.f ) ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setSpacers ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " left_spacer " , Vector3D ( - spacerX , 0.f , 0.f ) ) ,
m_coverflow . getVector3D ( domainSel , " right_spacer " , Vector3D ( spacerX , 0.f , 0.f ) ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setDeltaAngles ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " left_delta_angle " ) ,
m_coverflow . getVector3D ( domain , " right_delta_angle " ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setDeltaAngles ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " left_delta_angle " ) ,
m_coverflow . getVector3D ( domainSel , " right_delta_angle " ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
float angleY = smallflow ? 0.f : 70.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setAngles ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " left_angle " , Vector3D ( 0.f , angleY , 0.f ) ) ,
m_coverflow . getVector3D ( domain , " right_angle " , Vector3D ( 0.f , - angleY , 0.f ) ) ,
2019-03-18 19:39:28 +01:00
m_coverflow . getVector3D ( domain , " center_angle " , Vector3D ( 0.f , 0.f , 0.f ) ) ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " row_center_angle " ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
angleY = smallflow ? 0.f : 90.f ;
float angleY1 = smallflow ? 0.f : 360.f ;
float angleX = smallflow ? 0.f : - 45.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setAngles ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " left_angle " , Vector3D ( angleX , angleY , 0.f ) ) ,
m_coverflow . getVector3D ( domainSel , " right_angle " , Vector3D ( angleX , - angleY , 0.f ) ) ,
2019-03-18 19:39:28 +01:00
m_coverflow . getVector3D ( domainSel , " center_angle " , Vector3D ( 0.f , angleY1 , 0.f ) ) ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " row_center_angle " ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
angleX = smallflow ? 0.f : 20.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setTitleAngles ( false ,
2012-04-08 17:54:34 +02:00
_getCFFloat ( domain , " text_left_angle " , - angleX , sf ) ,
_getCFFloat ( domain , " text_right_angle " , angleX , sf ) ,
2012-01-21 21:57:41 +01:00
_getCFFloat ( domain , " text_center_angle " , 0.f , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setTitleAngles ( true ,
2012-04-08 17:54:34 +02:00
_getCFFloat ( domainSel , " text_left_angle " , - angleX , sf ) ,
_getCFFloat ( domainSel , " text_right_angle " , angleX , sf ) ,
2012-01-21 21:57:41 +01:00
_getCFFloat ( domainSel , " text_center_angle " , 0.f , sf ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
def_cvr_posX = smallflow ? 2.f : 1.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setTitlePos ( false ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFV3D ( domain , " text_left_pos " , Vector3D ( - def_cvr_posX , 0.8f , 2.6f ) , sf ) ,
_getCFV3D ( domain , " text_right_pos " , Vector3D ( def_cvr_posX , 0.8f , 2.6f ) , sf ) ,
_getCFV3D ( domain , " text_center_pos " , Vector3D ( 0.f , 0.8f , 2.6f ) , sf ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
def_cvr_posX = smallflow ? .6f : 2.1f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setTitlePos ( true ,
2012-01-21 21:57:41 +01:00
_getCFV3D ( domainSel , " text_left_pos " , Vector3D ( - 4.f , 0.f , 1.3f ) , sf ) ,
_getCFV3D ( domainSel , " text_right_pos " , Vector3D ( 4.f , 0.f , 1.3f ) , sf ) ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFV3D ( domainSel , " text_center_pos " , Vector3D ( def_cvr_posX , 1.f , 1.6f ) , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setTitleWidth ( false ,
2012-01-21 21:57:41 +01:00
_getCFFloat ( domain , " text_side_wrap_width " , 500.f , sf ) ,
_getCFFloat ( domain , " text_center_wrap_width " , 500.f , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setTitleWidth ( true ,
2012-01-21 21:57:41 +01:00
_getCFFloat ( domainSel , " text_side_wrap_width " , 500.f , sf ) ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFFloat ( domainSel , " text_center_wrap_width " , 390.f , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setTitleStyle ( false ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_textStyle ( domain . c_str ( ) , " text_side_style " , FTGX_ALIGN_MIDDLE | FTGX_JUSTIFY_CENTER , true ) ,
_textStyle ( domain . c_str ( ) , " text_center_style " , FTGX_ALIGN_MIDDLE | FTGX_JUSTIFY_CENTER , true ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setTitleStyle ( true ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_textStyle ( domainSel . c_str ( ) , " text_side_style " , FTGX_ALIGN_MIDDLE | FTGX_JUSTIFY_CENTER , true ) ,
_textStyle ( domainSel . c_str ( ) , " text_center_style " , FTGX_ALIGN_TOP | FTGX_JUSTIFY_RIGHT , true ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setColors ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getColor ( domain , " color_beg " , 0xCFFFFFFF ) ,
m_coverflow . getColor ( domain , " color_end " , 0x3FFFFFFF ) ,
m_coverflow . getColor ( domain , " color_off " , 0x7FFFFFFF ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setColors ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getColor ( domainSel , " color_beg " , 0x7FFFFFFF ) ,
m_coverflow . getColor ( domainSel , " color_end " , 0x1FFFFFFF ) ,
m_coverflow . getColor ( domain , " color_off " , 0x7FFFFFFF ) ) ; // Mouse not used once a selection has been made
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
CoverFlow . setMirrorAlpha ( m_coverflow . getFloat ( domain , " mirror_alpha " , 0.15f ) , m_coverflow . getFloat ( domain , " title_mirror_alpha " , 0.03f ) ) ; // Doesn't depend on selection
2012-04-08 17:54:34 +02:00
2016-04-30 16:19:30 +02:00
CoverFlow . setMirrorBlur ( m_coverflow . getBool ( domain , " mirror_blur " , true ) ) ; // Doesn't depend on selection
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setShadowColors ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getColor ( domain , " color_shadow_center " , 0x00000000 ) ,
m_coverflow . getColor ( domain , " color_shadow_beg " , 0x00000000 ) ,
m_coverflow . getColor ( domain , " color_shadow_end " , 0x00000000 ) ,
m_coverflow . getColor ( domain , " color_shadow_off " , 0x00000000 ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setShadowColors ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getColor ( domainSel , " color_shadow_center " , 0x0000007F ) ,
m_coverflow . getColor ( domainSel , " color_shadow_beg " , 0x0000007F ) ,
m_coverflow . getColor ( domainSel , " color_shadow_end " , 0x0000007F ) ,
m_coverflow . getColor ( domainSel , " color_shadow_off " , 0x0000007F ) ) ;
2012-04-08 17:54:34 +02:00
2016-04-30 16:19:30 +02:00
CoverFlow . setShadowPos ( m_coverflow . getFloat ( domain , " shadow_scale " , 1.1f ) ,
m_coverflow . getFloat ( domain , " shadow_x " ) ,
m_coverflow . getFloat ( domain , " shadow_y " ) ) ;
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
float spacerY = smallflow ? 0.60f : 2.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setRowSpacers ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " top_spacer " , Vector3D ( 0.f , spacerY , 0.f ) ) ,
m_coverflow . getVector3D ( domain , " bottom_spacer " , Vector3D ( 0.f , - spacerY , 0.f ) ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setRowSpacers ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " top_spacer " , Vector3D ( 0.f , spacerY , 0.f ) ) ,
m_coverflow . getVector3D ( domainSel , " bottom_spacer " , Vector3D ( 0.f , - spacerY , 0.f ) ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setRowDeltaAngles ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " top_delta_angle " ) ,
m_coverflow . getVector3D ( domain , " bottom_delta_angle " ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setRowDeltaAngles ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " top_delta_angle " ) ,
m_coverflow . getVector3D ( domainSel , " bottom_delta_angle " ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setRowAngles ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " top_angle " ) ,
m_coverflow . getVector3D ( domain , " bottom_angle " ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setRowAngles ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " top_angle " ) ,
m_coverflow . getVector3D ( domainSel , " bottom_angle " ) ) ;
2012-04-08 17:54:34 +02:00
2019-03-18 19:39:28 +01:00
Vector3D def_cvr_scale = smallflow ? Vector3D ( 0.66f , 0.25f , 1.f ) : Vector3D ( 1.f , 1.f , 1.f ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverScale ( false ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domain , " left_scale " , def_cvr_scale ) ,
m_coverflow . getVector3D ( domain , " right_scale " , def_cvr_scale ) ,
m_coverflow . getVector3D ( domain , " center_scale " , def_cvr_scale ) ,
m_coverflow . getVector3D ( domain , " row_center_scale " , def_cvr_scale ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverScale ( true ,
2016-04-30 16:19:30 +02:00
m_coverflow . getVector3D ( domainSel , " left_scale " , def_cvr_scale ) ,
m_coverflow . getVector3D ( domainSel , " right_scale " , def_cvr_scale ) ,
m_coverflow . getVector3D ( domainSel , " center_scale " , def_cvr_scale ) ,
m_coverflow . getVector3D ( domainSel , " row_center_scale " , def_cvr_scale ) ) ;
2012-04-08 17:54:34 +02:00
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
float flipX = smallflow ? 360.f : 180.f ;
2012-11-11 19:28:03 +01:00
CoverFlow . setCoverFlipping (
2012-04-08 17:54:34 +02:00
_getCFV3D ( domainSel , " flip_pos " , Vector3D ( ) , sf ) ,
_getCFV3D ( domainSel , " flip_angle " , Vector3D ( 0.f , flipX , 0.f ) , sf ) ,
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
_getCFV3D ( domainSel , " flip_scale " , Vector3D ( 1.f , 1.f , 1.f ) , sf ) ) ;
2012-04-08 17:54:34 +02:00
2012-11-11 19:28:03 +01:00
CoverFlow . setBlur (
2016-04-30 16:19:30 +02:00
m_coverflow . getInt ( domain , " blur_resolution " , 1 ) ,
m_coverflow . getInt ( domain , " blur_radius " , 2 ) ,
m_coverflow . getFloat ( domain , " blur_factor " , 1.f ) ) ;
2012-01-21 21:57:41 +01:00
}
void CMenu : : _buildMenus ( void )
{
2017-09-22 00:03:41 +02:00
m_btnMgr . init ( ) ;
2022-05-07 00:55:01 +02:00
m_btnMgr . setSoundVolume ( m_cfg . getInt ( " GENERAL " , " sound_volume_gui " , 255 ) ) ;
2017-09-22 00:03:41 +02:00
m_btnMgr . setRumble ( m_cfg . getBool ( " GENERAL " , " rumble " , true ) ) ;
2012-01-21 21:57:41 +01:00
// Default fonts
2019-01-30 23:37:36 +01:00
theme . btnFont = _dfltFont ( BUTTONFONT ) ;
2012-01-21 21:57:41 +01:00
theme . btnFontColor = m_theme . getColor ( " GENERAL " , " button_font_color " , 0xD0BFDFFF ) ;
2019-01-30 23:37:36 +01:00
theme . lblFont = _dfltFont ( LABELFONT ) ;
2012-01-21 21:57:41 +01:00
theme . lblFontColor = m_theme . getColor ( " GENERAL " , " label_font_color " , 0xD0BFDFFF ) ;
2019-01-30 23:37:36 +01:00
theme . titleFont = _dfltFont ( TITLEFONT ) ;
2012-02-10 19:45:42 +01:00
theme . titleFontColor = m_theme . getColor ( " GENERAL " , " title_font_color " , 0xFFFFFFFF ) ;
2012-09-02 22:05:35 +02:00
2019-01-30 23:37:36 +01:00
theme . txtFont = _dfltFont ( TEXTFONT ) ;
2012-01-21 21:57:41 +01:00
theme . txtFontColor = m_theme . getColor ( " GENERAL " , " text_font_color " , 0xFFFFFFFF ) ;
2012-09-02 22:05:35 +02:00
2012-01-21 21:57:41 +01:00
// Default Sounds
2016-04-30 16:19:30 +02:00
theme . clickSound = _sound ( theme . soundSet , m_theme . getString ( " GENERAL " , " click_sound " , " " ) . c_str ( ) , click_wav , click_wav_size , " default_btn_click " , false ) ;
theme . hoverSound = _sound ( theme . soundSet , m_theme . getString ( " GENERAL " , " hover_sound " , " " ) . c_str ( ) , hover_wav , hover_wav_size , " default_btn_hover " , false ) ;
theme . cameraSound = _sound ( theme . soundSet , m_theme . getString ( " GENERAL " , " camera_sound " , " " ) . c_str ( ) , camera_wav , camera_wav_size , " default_camera " , false ) ;
2012-09-02 22:05:35 +02:00
2012-01-21 21:57:41 +01:00
// Default textures
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexL , fmt ( " %s/butleft.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexL = _texture ( " GENERAL " , " button_texture_left " , theme . btnTexL ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexR , fmt ( " %s/butright.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexR = _texture ( " GENERAL " , " button_texture_right " , theme . btnTexR ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexC , fmt ( " %s/butcenter.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexC = _texture ( " GENERAL " , " button_texture_center " , theme . btnTexC ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexLS , fmt ( " %s/butsleft.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexLS = _texture ( " GENERAL " , " button_texture_left_selected " , theme . btnTexLS ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexRS , fmt ( " %s/butsright.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexRS = _texture ( " GENERAL " , " button_texture_right_selected " , theme . btnTexRS ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexCS , fmt ( " %s/butscenter.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexCS = _texture ( " GENERAL " , " button_texture_center_selected " , theme . btnTexCS ) ;
2012-02-17 17:46:05 +01:00
2013-01-19 13:33:52 +01:00
/* Language Buttons */
2013-11-19 16:27:52 +01:00
u32 img_buf_size = 0 ;
u8 * img_buf = fsop_ReadFile ( fmt ( " %s/butauon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnAUOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnAUOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnAUOn = _texture ( " GENERAL " , " button_au_on " , theme . btnAUOn ) ;
theme . btnAUOff = _texture ( " GENERAL " , " button_au_off " , theme . btnAUOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butauons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnAUOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnAUOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnAUOns = _texture ( " GENERAL " , " button_au_on_selected " , theme . btnAUOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnAUOffs = _texture ( " GENERAL " , " button_au_off_selected " , theme . btnAUOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butenon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnENOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnENOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnENOn = _texture ( " GENERAL " , " button_en_on " , theme . btnENOn ) ;
theme . btnENOff = _texture ( " GENERAL " , " button_en_off " , theme . btnENOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butenons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnENOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnENOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnENOns = _texture ( " GENERAL " , " button_en_on_selected " , theme . btnENOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnENOffs = _texture ( " GENERAL " , " button_en_off_selected " , theme . btnENOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butjaon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnJAOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnJAOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnJAOn = _texture ( " GENERAL " , " button_ja_on " , theme . btnJAOn ) ;
theme . btnJAOff = _texture ( " GENERAL " , " button_ja_off " , theme . btnJAOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butjaons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnJAOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnJAOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnJAOns = _texture ( " GENERAL " , " button_ja_on_selected " , theme . btnJAOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnJAOffs = _texture ( " GENERAL " , " button_ja_off_selected " , theme . btnJAOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butfron.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnFROn , img_buf ) ;
TexHandle . fromPNG ( theme . btnFROff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnFROn = _texture ( " GENERAL " , " button_fr_on " , theme . btnFROn ) ;
theme . btnFROff = _texture ( " GENERAL " , " button_fr_off " , theme . btnFROff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butfrons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnFROns , img_buf ) ;
TexHandle . fromPNG ( theme . btnFROffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnFROns = _texture ( " GENERAL " , " button_fr_on_selected " , theme . btnFROns ) ;
2012-11-03 20:16:03 +01:00
theme . btnFROffs = _texture ( " GENERAL " , " button_fr_off_selected " , theme . btnFROffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butdeon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnDEOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnDEOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnDEOn = _texture ( " GENERAL " , " button_de_on " , theme . btnDEOn ) ;
theme . btnDEOff = _texture ( " GENERAL " , " button_de_off " , theme . btnDEOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butdeons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnDEOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnDEOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnDEOns = _texture ( " GENERAL " , " button_de_on_selected " , theme . btnDEOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnDEOffs = _texture ( " GENERAL " , " button_de_off_selected " , theme . btnDEOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/buteson.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnESOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnESOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnESOn = _texture ( " GENERAL " , " button_es_on " , theme . btnESOn ) ;
theme . btnESOff = _texture ( " GENERAL " , " button_es_off " , theme . btnESOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butesons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnESOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnESOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnESOns = _texture ( " GENERAL " , " button_es_on_selected " , theme . btnESOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnESOffs = _texture ( " GENERAL " , " button_es_off_selected " , theme . btnESOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butiton.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnITOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnITOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnITOn = _texture ( " GENERAL " , " button_it_on " , theme . btnITOn ) ;
theme . btnITOff = _texture ( " GENERAL " , " button_it_off " , theme . btnITOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butitons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnITOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnITOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnITOns = _texture ( " GENERAL " , " button_it_on_selected " , theme . btnITOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnITOffs = _texture ( " GENERAL " , " button_it_off_selected " , theme . btnITOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butnlon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnNLOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnNLOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnNLOn = _texture ( " GENERAL " , " button_nl_on " , theme . btnNLOn ) ;
theme . btnNLOff = _texture ( " GENERAL " , " button_nl_off " , theme . btnNLOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butnlons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnNLOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnNLOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnNLOns = _texture ( " GENERAL " , " button_nl_on_selected " , theme . btnNLOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnNLOffs = _texture ( " GENERAL " , " button_nl_off_selected " , theme . btnNLOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butpton.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnPTOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnPTOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnPTOn = _texture ( " GENERAL " , " button_pt_on " , theme . btnPTOn ) ;
theme . btnPTOff = _texture ( " GENERAL " , " button_pt_off " , theme . btnPTOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butptons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnPTOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnPTOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnPTOns = _texture ( " GENERAL " , " button_pt_on_selected " , theme . btnPTOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnPTOffs = _texture ( " GENERAL " , " button_pt_off_selected " , theme . btnPTOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butruon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnRUOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnRUOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnRUOn = _texture ( " GENERAL " , " button_ru_on " , theme . btnRUOn ) ;
theme . btnRUOff = _texture ( " GENERAL " , " button_ru_off " , theme . btnRUOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butruons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnRUOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnRUOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnRUOns = _texture ( " GENERAL " , " button_ru_on_selected " , theme . btnRUOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnRUOffs = _texture ( " GENERAL " , " button_ru_off_selected " , theme . btnRUOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butkoon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnKOOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnKOOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnKOOn = _texture ( " GENERAL " , " button_ko_on " , theme . btnKOOn ) ;
theme . btnKOOff = _texture ( " GENERAL " , " button_ko_off " , theme . btnKOOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butkoons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnKOOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnKOOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnKOOns = _texture ( " GENERAL " , " button_ko_on_selected " , theme . btnKOOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnKOOffs = _texture ( " GENERAL " , " button_ko_off_selected " , theme . btnKOOffs ) ;
2012-02-15 21:18:15 +01:00
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butzhcnon.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnZHCNOn , img_buf ) ;
TexHandle . fromPNG ( theme . btnZHCNOff , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
2012-11-03 20:16:03 +01:00
theme . btnZHCNOn = _texture ( " GENERAL " , " button_zhcn_on " , theme . btnZHCNOn ) ;
theme . btnZHCNOff = _texture ( " GENERAL " , " button_zhcn_off " , theme . btnZHCNOff ) ;
2013-11-19 16:27:52 +01:00
img_buf = fsop_ReadFile ( fmt ( " %s/butzhcnons.png " , m_imgsDir . c_str ( ) ) , & img_buf_size ) ;
if ( img_buf ! = NULL )
{
TexHandle . fromPNG ( theme . btnZHCNOns , img_buf ) ;
TexHandle . fromPNG ( theme . btnZHCNOffs , img_buf , GX_TF_RGBA8 , 0 , 0 , true ) ;
MEM2_free ( img_buf ) ;
}
theme . btnZHCNOns = _texture ( " GENERAL " , " button_zhcn_on_selected " , theme . btnZHCNOns ) ;
2012-11-03 20:16:03 +01:00
theme . btnZHCNOffs = _texture ( " GENERAL " , " button_zhcn_off_selected " , theme . btnZHCNOffs ) ;
2012-10-13 18:57:03 +02:00
2013-01-19 13:33:52 +01:00
/* Default textures */
2019-10-21 21:03:59 +02:00
TexHandle . fromImageFile ( theme . checkboxoff , fmt ( " %s/checkboxoff.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxoff = _texture ( " GENERAL " , " checkbox_off " , theme . checkboxoff ) ;
2019-10-21 21:03:59 +02:00
TexHandle . fromImageFile ( theme . checkboxoffs , fmt ( " %s/checkboxoffs.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxoffs = _texture ( " GENERAL " , " checkbox_off_selected " , theme . checkboxoffs ) ;
2019-10-21 21:03:59 +02:00
TexHandle . fromImageFile ( theme . checkboxon , fmt ( " %s/checkboxon.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxon = _texture ( " GENERAL " , " checkbox_on " , theme . checkboxon ) ;
2019-10-21 21:03:59 +02:00
TexHandle . fromImageFile ( theme . checkboxons , fmt ( " %s/checkboxons.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxons = _texture ( " GENERAL " , " checkbox_on_selected " , theme . checkboxons ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . checkboxHid , fmt ( " %s/checkboxhid.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxHid = _texture ( " GENERAL " , " checkbox_Hid " , theme . checkboxHid ) ;
2019-10-21 21:03:59 +02:00
TexHandle . fromImageFile ( theme . checkboxHids , fmt ( " %s/checkboxhids.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxHids = _texture ( " GENERAL " , " checkbox_Hid_selected " , theme . checkboxHids ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . checkboxReq , fmt ( " %s/checkboxreq.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxReq = _texture ( " GENERAL " , " checkbox_Req " , theme . checkboxReq ) ;
2019-10-21 21:03:59 +02:00
TexHandle . fromImageFile ( theme . checkboxReqs , fmt ( " %s/checkboxreqs.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . checkboxReqs = _texture ( " GENERAL " , " checkbox_Req_selected " , theme . checkboxReqs ) ;
2012-04-08 16:48:50 +02:00
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . pbarTexL , fmt ( " %s/pbarleft.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . pbarTexL = _texture ( " GENERAL " , " progressbar_texture_left " , theme . pbarTexL ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . pbarTexR , fmt ( " %s/pbarright.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . pbarTexR = _texture ( " GENERAL " , " progressbar_texture_right " , theme . pbarTexR ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . pbarTexC , fmt ( " %s/pbarcenter.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . pbarTexC = _texture ( " GENERAL " , " progressbar_texture_center " , theme . pbarTexC ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . pbarTexLS , fmt ( " %s/pbarlefts.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . pbarTexLS = _texture ( " GENERAL " , " progressbar_texture_left_selected " , theme . pbarTexLS ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . pbarTexRS , fmt ( " %s/pbarrights.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . pbarTexRS = _texture ( " GENERAL " , " progressbar_texture_right_selected " , theme . pbarTexRS ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . pbarTexCS , fmt ( " %s/pbarcenters.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . pbarTexCS = _texture ( " GENERAL " , " progressbar_texture_center_selected " , theme . pbarTexCS ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexPlus , fmt ( " %s/btnplus.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexPlus = _texture ( " GENERAL " , " plus_button_texture " , theme . btnTexPlus ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexPlusS , fmt ( " %s/btnpluss.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexPlusS = _texture ( " GENERAL " , " plus_button_texture_selected " , theme . btnTexPlusS ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexMinus , fmt ( " %s/btnminus.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexMinus = _texture ( " GENERAL " , " minus_button_texture " , theme . btnTexMinus ) ;
2013-11-19 16:27:52 +01:00
TexHandle . fromImageFile ( theme . btnTexMinusS , fmt ( " %s/btnminuss.png " , m_imgsDir . c_str ( ) ) ) ;
2012-11-03 20:16:03 +01:00
theme . btnTexMinusS = _texture ( " GENERAL " , " minus_button_texture_selected " , theme . btnTexMinusS ) ;
2012-09-02 22:05:35 +02:00
2012-01-21 21:57:41 +01:00
// Default background
2020-04-12 20:35:57 +02:00
TexHandle . fromImageFile ( theme . bg , fmt ( " %s/background.png " , m_imgsDir . c_str ( ) ) ) ;
TexHandle . fromImageFile ( m_mainBgLQ , fmt ( " %s/background.png " , m_imgsDir . c_str ( ) ) , GX_TF_CMPR , 64 , 64 ) ;
2012-01-21 21:57:41 +01:00
m_gameBgLQ = m_mainBgLQ ;
// Build menus
2012-11-03 20:16:03 +01:00
_initMainMenu ( ) ;
_initErrorMenu ( ) ;
_initConfigMenu ( ) ;
2016-12-14 19:47:13 +01:00
_initConfigGCMenu ( ) ;
2022-08-05 22:04:05 +02:00
_initConfigSrc ( ) ;
_initConfigHB ( ) ;
_initBoot ( ) ;
_initNandEmuMenu ( ) ;
2016-12-14 19:47:13 +01:00
_initPartitionsCfgMenu ( ) ;
2022-08-05 22:04:05 +02:00
_initPathsMenu ( ) ;
2012-11-03 20:16:03 +01:00
_initDownloadMenu ( ) ;
_initCodeMenu ( ) ;
_initCFThemeMenu ( ) ;
2022-08-05 22:04:05 +02:00
_initGameMenu ( ) ;
_initGameInfoMenu ( ) ;
_initConfigGameMenu ( ) ;
2012-11-03 20:16:03 +01:00
_initCheatSettingsMenu ( ) ;
2022-08-05 22:04:05 +02:00
_initCoverBanner ( ) ;
_initWBFSMenu ( ) ;
2012-11-03 20:16:03 +01:00
_initCategorySettingsMenu ( ) ;
_initHomeAndExitToMenu ( ) ;
2022-08-05 22:04:05 +02:00
_initAboutMenu ( ) ;
2013-06-28 00:16:30 +02:00
_initExplorer ( ) ;
2022-08-05 22:04:05 +02:00
_initWad ( ) ;
_initSourceMenu ( ) ;
_initPluginSettingsMenu ( ) ;
2020-08-25 00:58:09 +02:00
_initCheckboxesMenu ( ) ;
2012-11-03 20:16:03 +01:00
_loadCFCfg ( ) ;
2012-01-21 21:57:41 +01:00
}
2022-08-05 22:04:05 +02:00
void CMenu : : _updateText ( void )
{
_textConfig ( ) ;
_textConfigGC ( ) ;
_textConfigSrc ( ) ;
_textConfigHB ( ) ;
_textBoot ( ) ;
_textNandEmu ( ) ;
_textPartitionsCfg ( ) ;
_textPaths ( ) ;
_textDownload ( ) ;
_textCode ( ) ;
_textGame ( ) ;
_textConfigGame ( ) ;
_textCheatSettings ( ) ;
_textCoverBanner ( ) ;
_textWBFS ( ) ;
_textCategorySettings ( ) ;
_textHome ( ) ;
_textExitTo ( ) ;
_textShutdown ( ) ;
_textExplorer ( ) ;
_textWad ( ) ;
if ( m_use_source )
_textSource ( ) ;
_textPluginSettings ( ) ;
_textCheckboxesMenu ( ) ;
}
2012-01-21 21:57:41 +01:00
typedef struct
{
string ext ;
u32 min ;
u32 max ;
u32 def ;
u32 res ;
} FontHolder ;
2019-01-30 23:37:36 +01:00
SFont CMenu : : _dfltFont ( u32 fontSize , u32 lineSpacing , u32 weight , u32 index , const char * genKey )
2012-01-21 21:57:41 +01:00
{
2018-07-09 16:53:35 +02:00
/* get font info from theme.ini or use the default values */
2013-09-02 00:31:46 +02:00
string filename ;
2012-01-21 21:57:41 +01:00
FontHolder fonts [ 3 ] = { { " _size " , 6u , 300u , fontSize , 0 } , { " _line_height " , 6u , 300u , lineSpacing , 0 } , { " _weight " , 1u , 32u , weight , 0 } } ;
2019-01-30 23:37:36 +01:00
filename = m_theme . getString ( " GENERAL " , genKey , genKey ) ;
2012-01-21 21:57:41 +01:00
bool useDefault = filename = = genKey ;
2018-07-09 16:53:35 +02:00
/* get the resources - fontSize, lineSpacing, and weight */
2012-01-21 21:57:41 +01:00
for ( u32 i = 0 ; i < 3 ; i + + )
{
string defValue = genKey ;
2018-07-09 16:53:35 +02:00
defValue + = fonts [ i ] . ext ; // _size, _line_height, _weight
2019-01-30 23:37:36 +01:00
fonts [ i ] . res = ( u32 ) m_theme . getInt ( " GENERAL " , defValue ) ;
2012-01-21 21:57:41 +01:00
2013-06-29 16:48:02 +02:00
fonts [ i ] . res = min ( max ( fonts [ i ] . min , fonts [ i ] . res < = 0 ? fonts [ i ] . def : fonts [ i ] . res ) , fonts [ i ] . max ) ;
2012-01-21 21:57:41 +01:00
}
2018-07-09 16:53:35 +02:00
/* check if font is already in memory */
/* and the filename, size, spacing, and weight are the same */
/* if so return this font */
2013-09-02 00:31:46 +02:00
std : : vector < SFont > : : iterator font_itr ;
for ( font_itr = theme . fontSet . begin ( ) ; font_itr ! = theme . fontSet . end ( ) ; + + font_itr )
{
if ( strncmp ( filename . c_str ( ) , font_itr - > name , 127 ) = = 0 & & font_itr - > fSize = = fonts [ 0 ] . res & &
font_itr - > lineSpacing = = fonts [ 1 ] . res & & font_itr - > weight & & fonts [ 2 ] . res )
break ;
}
if ( font_itr ! = theme . fontSet . end ( ) ) return * font_itr ;
2012-01-21 21:57:41 +01:00
2018-07-09 16:53:35 +02:00
/* font not found in memory, load it to create a new font */
/* unless useDefault font is specified */
2012-01-21 21:57:41 +01:00
SFont retFont ;
2013-09-02 00:31:46 +02:00
if ( ! useDefault & & retFont . fromFile ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename . c_str ( ) ) , fonts [ 0 ] . res , fonts [ 1 ] . res , fonts [ 2 ] . res , index , filename . c_str ( ) ) )
2012-01-21 21:57:41 +01:00
{
// Theme Font
2013-09-02 00:31:46 +02:00
theme . fontSet . push_back ( retFont ) ;
2012-01-21 21:57:41 +01:00
return retFont ;
}
2018-07-09 16:53:35 +02:00
2018-12-26 19:07:16 +01:00
/* try default font in imgs folder */
-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 ( retFont . fromFile ( fmt ( " %s/font.ttf " , m_imgsDir . c_str ( ) ) , fonts [ 0 ] . res , fonts [ 1 ] . res , fonts [ 2 ] . res , index , filename . c_str ( ) ) )
{
// Default font
theme . fontSet . push_back ( retFont ) ;
return retFont ;
2018-12-26 19:07:16 +01:00
}
2018-07-09 16:53:35 +02:00
2012-11-03 20:16:03 +01:00
/* Fallback to default font */
2018-07-09 16:53:35 +02:00
/* default font is the wii's system font */
2013-09-02 00:31:46 +02:00
if ( retFont . fromBuffer ( m_base_font , m_base_font_size , fonts [ 0 ] . res , fonts [ 1 ] . res , fonts [ 2 ] . res , index , filename . c_str ( ) ) )
2012-01-21 21:57:41 +01:00
{
// Default font
2013-09-02 00:31:46 +02:00
theme . fontSet . push_back ( retFont ) ;
2012-01-21 21:57:41 +01:00
return retFont ;
}
return retFont ;
}
2019-01-30 23:37:36 +01:00
SFont CMenu : : _font ( const char * domain , const char * key , SFont def_font )
{
string filename ;
FontHolder fonts [ 3 ] = { { " _size " , 6u , 300u , 0 , 0 } , { " _line_height " , 6u , 300u , 0 , 0 } , { " _weight " , 1u , 32u , 0 , 0 } } ;
filename = m_theme . getString ( domain , key ) ;
if ( filename . empty ( ) )
filename = def_font . name ;
/* get the resources - fontSize, lineSpacing, and weight */
for ( u32 i = 0 ; i < 3 ; i + + )
{
string value = key ;
value + = fonts [ i ] . ext ; // _size, _line_height, _weight
fonts [ i ] . res = ( u32 ) m_theme . getInt ( domain , value ) ;
if ( fonts [ i ] . res < = 0 & & i = = 0 )
fonts [ i ] . res = def_font . fSize ;
else if ( fonts [ i ] . res < = 0 & & i = = 1 )
fonts [ i ] . res = def_font . lineSpacing ;
else if ( fonts [ i ] . res < = 0 & & i = = 2 )
fonts [ i ] . res = def_font . weight ;
fonts [ i ] . res = min ( max ( fonts [ i ] . min , fonts [ i ] . res ) , fonts [ i ] . max ) ;
}
/* check if font is already in memory */
/* and the filename, size, spacing, and weight are the same */
/* if so return this font */
std : : vector < SFont > : : iterator font_itr ;
for ( font_itr = theme . fontSet . begin ( ) ; font_itr ! = theme . fontSet . end ( ) ; + + font_itr )
{
if ( strncmp ( filename . c_str ( ) , font_itr - > name , 127 ) = = 0 & & font_itr - > fSize = = fonts [ 0 ] . res & &
font_itr - > lineSpacing = = fonts [ 1 ] . res & & font_itr - > weight & & fonts [ 2 ] . res )
break ;
}
if ( font_itr ! = theme . fontSet . end ( ) ) return * font_itr ;
/* font not found in memory, load it to create a new font */
/* unless useDefault font is specified */
SFont retFont ;
if ( retFont . fromFile ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename . c_str ( ) ) , fonts [ 0 ] . res , fonts [ 1 ] . res , fonts [ 2 ] . res , 1 , filename . c_str ( ) ) )
{
// Theme Font
theme . fontSet . push_back ( retFont ) ;
return retFont ;
}
return def_font ;
}
2012-12-28 15:19:40 +01:00
vector < TexData > CMenu : : _textures ( const char * domain , const char * key )
2012-01-21 21:57:41 +01:00
{
2012-12-28 15:19:40 +01:00
vector < TexData > textures ;
2012-01-21 21:57:41 +01:00
if ( m_theme . loaded ( ) )
{
2012-05-06 14:03:43 +02:00
vector < string > filenames = m_theme . getStrings ( domain , key ) ;
2012-01-21 21:57:41 +01:00
if ( filenames . size ( ) > 0 )
{
2012-05-06 14:03:43 +02:00
for ( vector < string > : : iterator itr = filenames . begin ( ) ; itr ! = filenames . end ( ) ; itr + + )
2012-01-21 21:57:41 +01:00
{
2012-11-03 20:16:03 +01:00
const string & filename = * itr ;
TexSet : : iterator i = theme . texSet . find ( filename ) ;
if ( i ! = theme . texSet . end ( ) )
2012-01-21 21:57:41 +01:00
textures . push_back ( i - > second ) ;
2016-04-03 02:51:40 +02:00
TexData themetex ;
if ( TexHandle . fromImageFile ( themetex , fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename . c_str ( ) ) ) = = TE_OK )
2012-01-21 21:57:41 +01:00
{
2016-04-03 02:51:40 +02:00
theme . texSet [ filename ] = themetex ;
textures . push_back ( themetex ) ;
2012-01-21 21:57:41 +01:00
}
}
}
}
return textures ;
}
2012-12-28 15:19:40 +01:00
TexData CMenu : : _texture ( const char * domain , const char * key , TexData & def , bool freeDef )
2012-01-21 21:57:41 +01:00
{
string filename ;
2012-11-03 20:16:03 +01:00
if ( m_theme . loaded ( ) )
2012-01-21 21:57:41 +01:00
{
2012-11-03 20:16:03 +01:00
/* Load from theme */
2012-01-21 21:57:41 +01:00
filename = m_theme . getString ( domain , key ) ;
2012-11-03 20:16:03 +01:00
if ( ! filename . empty ( ) )
2012-01-21 21:57:41 +01:00
{
2012-11-03 20:16:03 +01:00
TexSet : : iterator i = theme . texSet . find ( filename ) ;
if ( i ! = theme . texSet . end ( ) )
2012-01-21 21:57:41 +01:00
return i - > second ;
2012-11-03 20:16:03 +01:00
/* Load from image file */
2016-04-03 02:51:40 +02:00
TexData themetex ;
if ( TexHandle . fromImageFile ( themetex , fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename . c_str ( ) ) ) = = TE_OK )
2012-01-21 21:57:41 +01:00
{
2012-11-03 20:16:03 +01:00
if ( freeDef & & def . data ! = NULL )
{
2020-06-26 01:11:58 +02:00
MEM2_free ( def . data ) ;
2012-11-03 20:16:03 +01:00
def . data = NULL ;
}
2016-04-03 02:51:40 +02:00
theme . texSet [ filename ] = themetex ;
return themetex ;
2012-01-21 21:57:41 +01:00
}
}
}
2012-11-03 20:16:03 +01:00
/* Fallback to default */
2012-01-21 21:57:41 +01:00
return def ;
}
// Only for loading defaults and GENERAL domains!!
2016-04-30 16:19:30 +02:00
GuiSound * CMenu : : _sound ( CMenu : : SoundSet & soundSet , const char * filename , const u8 * snd , u32 len , const char * name , bool isAllocated )
2012-01-21 21:57:41 +01:00
{
2012-11-04 20:22:02 +01:00
if ( filename = = NULL | | filename [ 0 ] = = ' \0 ' )
2012-11-04 15:13:42 +01:00
filename = name ;
2012-01-21 21:57:41 +01:00
2012-11-04 20:22:02 +01:00
CMenu : : SoundSet : : iterator i = soundSet . find ( upperCase ( name ) ) ;
2012-11-04 15:13:42 +01:00
if ( i = = soundSet . end ( ) )
2012-01-21 21:57:41 +01:00
{
2013-06-29 18:54:21 +02:00
if ( filename ! = name & & fsop_FileExist ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename ) ) )
{
u32 size = 0 ;
u8 * mem = fsop_ReadFile ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename ) , & size ) ;
soundSet [ upperCase ( filename ) ] = new GuiSound ( mem , size , filename , true ) ;
}
2012-01-21 21:57:41 +01:00
else
2012-11-04 15:13:42 +01:00
soundSet [ upperCase ( filename ) ] = new GuiSound ( snd , len , filename , isAllocated ) ;
return soundSet [ upperCase ( filename ) ] ;
2012-01-21 21:57:41 +01:00
}
return i - > second ;
}
//For buttons and labels only!!
2012-11-04 15:13:42 +01:00
GuiSound * CMenu : : _sound ( CMenu : : SoundSet & soundSet , const char * domain , const char * key , const char * name )
2012-01-21 21:57:41 +01:00
{
2012-11-04 15:13:42 +01:00
const char * filename = m_theme . getString ( domain , key ) . c_str ( ) ;
2012-11-04 20:22:02 +01:00
if ( filename = = NULL | | filename [ 0 ] = = ' \0 ' )
2012-01-21 21:57:41 +01:00
{
2012-11-04 15:13:42 +01:00
if ( strrchr ( name , ' / ' ) ! = NULL )
name = strrchr ( name , ' / ' ) + 1 ;
return soundSet [ upperCase ( name ) ] ; // General/Default are already cached!
2012-01-21 21:57:41 +01:00
}
2012-11-04 15:13:42 +01:00
SoundSet : : iterator i = soundSet . find ( upperCase ( filename ) ) ;
if ( i = = soundSet . end ( ) )
2012-01-21 21:57:41 +01:00
{
2013-06-29 18:54:21 +02:00
if ( fsop_FileExist ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename ) ) )
{
u32 size = 0 ;
u8 * mem = fsop_ReadFile ( fmt ( " %s/%s " , m_themeDataDir . c_str ( ) , filename ) , & size ) ;
soundSet [ upperCase ( filename ) ] = new GuiSound ( mem , size , filename , true ) ;
}
else
soundSet [ upperCase ( filename ) ] = new GuiSound ( ) ;
2012-11-04 15:13:42 +01:00
return soundSet [ upperCase ( filename ) ] ;
2012-01-21 21:57:41 +01:00
}
return i - > second ;
}
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
u16 CMenu : : _textStyle ( const char * domain , const char * key , u16 def , bool coverflow )
2012-01-21 21:57:41 +01:00
{
u16 textStyle = 0 ;
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
string style ;
if ( coverflow )
style = m_coverflow . getString ( domain , key ) ;
else
style = m_theme . getString ( domain , key ) ;
2012-01-21 21:57:41 +01:00
if ( style . empty ( ) ) return def ;
if ( style . find_first_of ( " Cc " ) ! = string : : npos )
textStyle | = FTGX_JUSTIFY_CENTER ;
else if ( style . find_first_of ( " Rr " ) ! = string : : npos )
textStyle | = FTGX_JUSTIFY_RIGHT ;
else
textStyle | = FTGX_JUSTIFY_LEFT ;
if ( style . find_first_of ( " Mm " ) ! = string : : npos )
textStyle | = FTGX_ALIGN_MIDDLE ;
else if ( style . find_first_of ( " Bb " ) ! = string : : npos )
textStyle | = FTGX_ALIGN_BOTTOM ;
else
textStyle | = FTGX_ALIGN_TOP ;
return textStyle ;
}
2012-11-03 20:16:03 +01:00
s16 CMenu : : _addButton ( const char * domain , SFont font , const wstringEx & text , int x , int y , u32 width , u32 height , const CColor & color )
2012-01-21 21:57:41 +01:00
{
SButtonTextureSet btnTexSet ;
CColor c ( color ) ;
c = m_theme . getColor ( domain , " color " , c ) ;
2012-05-25 16:21:43 +02:00
x = m_theme . getInt ( domain , " x " , x ) ;
y = m_theme . getInt ( domain , " y " , y ) ;
2012-01-21 21:57:41 +01:00
width = m_theme . getInt ( domain , " width " , width ) ;
height = m_theme . getInt ( domain , " height " , height ) ;
2012-11-03 20:16:03 +01:00
btnTexSet . left = _texture ( domain , " texture_left " , theme . btnTexL , false ) ;
btnTexSet . right = _texture ( domain , " texture_right " , theme . btnTexR , false ) ;
btnTexSet . center = _texture ( domain , " texture_center " , theme . btnTexC , false ) ;
btnTexSet . leftSel = _texture ( domain , " texture_left_selected " , theme . btnTexLS , false ) ;
btnTexSet . rightSel = _texture ( domain , " texture_right_selected " , theme . btnTexRS , false ) ;
btnTexSet . centerSel = _texture ( domain , " texture_center_selected " , theme . btnTexCS , false ) ;
2019-01-30 23:37:36 +01:00
font = _font ( domain , " font " , font ) ;
2012-11-03 20:16:03 +01:00
GuiSound * clickSound = _sound ( theme . soundSet , domain , " click_sound " , theme . clickSound - > GetName ( ) ) ;
GuiSound * hoverSound = _sound ( theme . soundSet , domain , " hover_sound " , theme . hoverSound - > GetName ( ) ) ;
2012-02-12 02:43:31 +01:00
return m_btnMgr . addButton ( font , text , x , y , width , height , c , btnTexSet , clickSound , hoverSound ) ;
}
2012-12-28 15:19:40 +01:00
s16 CMenu : : _addPicButton ( const char * domain , TexData & texNormal , TexData & texSelected , int x , int y , u32 width , u32 height )
2012-01-21 21:57:41 +01:00
{
x = m_theme . getInt ( domain , " x " , x ) ;
y = m_theme . getInt ( domain , " y " , y ) ;
width = m_theme . getInt ( domain , " width " , width ) ;
height = m_theme . getInt ( domain , " height " , height ) ;
2012-12-28 15:19:40 +01:00
TexData tex1 = _texture ( domain , " texture_normal " , texNormal , false ) ;
TexData tex2 = _texture ( domain , " texture_selected " , texSelected , false ) ;
2012-11-03 20:16:03 +01:00
GuiSound * clickSound = _sound ( theme . soundSet , domain , " click_sound " , theme . clickSound - > GetName ( ) ) ;
GuiSound * hoverSound = _sound ( theme . soundSet , domain , " hover_sound " , theme . hoverSound - > GetName ( ) ) ;
2012-01-21 21:57:41 +01:00
return m_btnMgr . addPicButton ( tex1 , tex2 , x , y , width , height , clickSound , hoverSound ) ;
}
2012-11-03 20:16:03 +01:00
s16 CMenu : : _addLabel ( const char * domain , SFont font , const wstringEx & text , int x , int y , u32 width , u32 height , const CColor & color , s16 style )
2012-01-21 21:57:41 +01:00
{
CColor c ( color ) ;
c = m_theme . getColor ( domain , " color " , c ) ;
x = m_theme . getInt ( domain , " x " , x ) ;
y = m_theme . getInt ( domain , " y " , y ) ;
width = m_theme . getInt ( domain , " width " , width ) ;
height = m_theme . getInt ( domain , " height " , height ) ;
2019-01-30 23:37:36 +01:00
font = _font ( domain , " font " , font ) ;
2012-01-21 21:57:41 +01:00
style = _textStyle ( domain , " style " , style ) ;
return m_btnMgr . addLabel ( font , text , x , y , width , height , c , style ) ;
}
2012-12-28 15:19:40 +01:00
s16 CMenu : : _addLabel ( const char * domain , SFont font , const wstringEx & text , int x , int y , u32 width , u32 height , const CColor & color , s16 style , TexData & bg )
2012-01-21 21:57:41 +01:00
{
CColor c ( color ) ;
c = m_theme . getColor ( domain , " color " , c ) ;
x = m_theme . getInt ( domain , " x " , x ) ;
y = m_theme . getInt ( domain , " y " , y ) ;
width = m_theme . getInt ( domain , " width " , width ) ;
height = m_theme . getInt ( domain , " height " , height ) ;
2019-01-30 23:37:36 +01:00
font = _font ( domain , " font " , font ) ;
2012-12-28 15:19:40 +01:00
TexData texBg = _texture ( domain , " background_texture " , bg , false ) ;
2012-01-21 21:57:41 +01:00
style = _textStyle ( domain , " style " , style ) ;
return m_btnMgr . addLabel ( font , text , x , y , width , height , c , style , texBg ) ;
}
2012-11-03 20:16:03 +01:00
s16 CMenu : : _addProgressBar ( const char * domain , int x , int y , u32 width , u32 height )
2012-01-21 21:57:41 +01:00
{
SButtonTextureSet btnTexSet ;
x = m_theme . getInt ( domain , " x " , x ) ;
y = m_theme . getInt ( domain , " y " , y ) ;
width = m_theme . getInt ( domain , " width " , width ) ;
height = m_theme . getInt ( domain , " height " , height ) ;
2012-11-03 20:16:03 +01:00
btnTexSet . left = _texture ( domain , " texture_left " , theme . pbarTexL , false ) ;
btnTexSet . right = _texture ( domain , " texture_right " , theme . pbarTexR , false ) ;
btnTexSet . center = _texture ( domain , " texture_center " , theme . pbarTexC , false ) ;
btnTexSet . leftSel = _texture ( domain , " texture_left_selected " , theme . pbarTexLS , false ) ;
btnTexSet . rightSel = _texture ( domain , " texture_right_selected " , theme . pbarTexRS , false ) ;
btnTexSet . centerSel = _texture ( domain , " texture_center_selected " , theme . pbarTexCS , false ) ;
2012-01-21 21:57:41 +01:00
return m_btnMgr . addProgressBar ( x , y , width , height , btnTexSet ) ;
}
2012-09-13 16:54:17 +02:00
void CMenu : : _setHideAnim ( s16 id , const char * domain , int dx , int dy , float scaleX , float scaleY )
2012-01-21 21:57:41 +01:00
{
dx = m_theme . getInt ( domain , " effect_x " , dx ) ;
dy = m_theme . getInt ( domain , " effect_y " , dy ) ;
scaleX = m_theme . getFloat ( domain , " effect_scale_x " , scaleX ) ;
scaleY = m_theme . getFloat ( domain , " effect_scale_y " , scaleY ) ;
m_btnMgr . hide ( id , dx , dy , scaleX , scaleY , true ) ;
}
2012-11-03 20:16:03 +01:00
void CMenu : : _addUserLabels ( s16 * ids , u32 size , const char * domain )
2012-01-21 21:57:41 +01:00
{
2012-11-03 20:16:03 +01:00
_addUserLabels ( ids , 0 , size , domain ) ;
2012-01-21 21:57:41 +01:00
}
2012-11-03 20:16:03 +01:00
void CMenu : : _addUserLabels ( s16 * ids , u32 start , u32 size , const char * domain )
2012-01-21 21:57:41 +01:00
{
2012-07-05 15:15:23 +02:00
for ( u32 i = start ; i < start + size ; + + i )
2012-01-21 21:57:41 +01:00
{
2012-11-18 14:40:26 +01:00
string dom ( fmt ( " %s/USER%i " , domain , i + 1 ) ) ;
2012-01-21 21:57:41 +01:00
if ( m_theme . hasDomain ( dom ) )
{
2012-12-28 15:19:40 +01:00
TexData emptyTex ;
2012-11-03 20:16:03 +01:00
ids [ i ] = _addLabel ( dom . c_str ( ) , theme . lblFont , L " " , 40 , 200 , 64 , 64 , CColor ( 0xFFFFFFFF ) , 0 , emptyTex ) ;
2012-01-21 21:57:41 +01:00
_setHideAnim ( ids [ i ] , dom . c_str ( ) , - 50 , 0 , 0.f , 0.f ) ;
}
else
2012-09-13 16:54:17 +02:00
ids [ i ] = - 1 ;
2012-01-21 21:57:41 +01:00
}
}
2018-11-19 19:14:40 +01:00
bool musicPaused = false ;
2012-09-09 20:35:15 +02:00
void CMenu : : _mainLoopCommon ( bool withCF , bool adjusting )
2012-01-21 21:57:41 +01:00
{
2018-11-19 19:14:40 +01:00
if ( m_thrdWorking )
2016-12-01 01:05:39 +01:00
{
2018-11-19 19:14:40 +01:00
musicPaused = true ;
2018-11-23 22:31:04 +01:00
MusicPlayer . Pause ( ) ; //note - bg music is paused but sound thread is still running. so banner gamesound still plays
2016-12-01 01:05:39 +01:00
m_btnMgr . tick ( ) ;
m_vid . prepare ( ) ;
2020-02-02 21:25:05 +01:00
m_vid . setup2DProjection ( false , true ) ; // false = prepare() already set view port, true = no scaling - draw at 640x480
2016-12-01 01:05:39 +01:00
_updateBg ( ) ;
2020-04-20 15:16:18 +02:00
if ( CoverFlow . getRenderTex ( ) )
CoverFlow . RenderTex ( ) ;
2020-02-02 21:25:05 +01:00
m_vid . setup2DProjection ( ) ; // this time set the view port and allow scaling
2016-12-01 01:05:39 +01:00
_drawBg ( ) ;
m_btnMgr . draw ( ) ;
m_vid . render ( ) ;
return ;
2018-11-19 19:14:40 +01:00
}
if ( musicPaused & & ! m_thrdWorking )
{
musicPaused = false ;
MusicPlayer . Resume ( ) ;
}
2018-06-27 14:47:03 +02:00
/* ticks - for moving and scaling covers and gui buttons and text */
2012-06-01 08:43:37 +02:00
if ( withCF )
2012-11-11 19:28:03 +01:00
CoverFlow . tick ( ) ;
2012-01-21 21:57:41 +01:00
m_btnMgr . tick ( ) ;
2018-10-16 01:43:49 +02:00
m_fa . tick ( ) ;
2012-01-21 21:57:41 +01:00
2018-06-27 14:47:03 +02:00
/* video setup */
2012-11-11 19:28:03 +01:00
m_vid . prepare ( ) ;
2012-11-16 23:00:20 +01:00
m_vid . setup2DProjection ( false , true ) ;
2018-06-27 14:47:03 +02:00
/* background and coverflow drawing */
2012-01-21 21:57:41 +01:00
_updateBg ( ) ;
2020-04-20 15:16:18 +02:00
if ( CoverFlow . getRenderTex ( ) )
CoverFlow . RenderTex ( ) ;
2012-11-29 21:30:05 +01:00
if ( withCF & & m_lqBg ! = NULL )
2012-11-11 19:28:03 +01:00
CoverFlow . makeEffectTexture ( m_lqBg ) ;
2012-06-01 08:43:37 +02:00
if ( withCF & & m_aa > 0 )
2012-01-21 21:57:41 +01:00
{
m_vid . setAA ( m_aa , true ) ;
2012-06-01 08:43:37 +02:00
for ( int i = 0 ; i < m_aa ; + + i )
2012-01-21 21:57:41 +01:00
{
m_vid . prepareAAPass ( i ) ;
m_vid . setup2DProjection ( false , true ) ;
_drawBg ( ) ;
2012-11-11 19:28:03 +01:00
CoverFlow . draw ( ) ;
2012-01-21 21:57:41 +01:00
m_vid . setup2DProjection ( false , true ) ;
2012-11-11 19:28:03 +01:00
CoverFlow . drawEffect ( ) ;
2019-10-17 01:22:40 +02:00
if ( ! m_soundThrdBusy & & ! m_banner . GetSelectedGame ( ) & & ! m_snapshot_loaded )
2012-11-11 19:28:03 +01:00
CoverFlow . drawText ( adjusting ) ;
2012-01-21 21:57:41 +01:00
m_vid . renderAAPass ( i ) ;
}
m_vid . setup2DProjection ( ) ;
m_vid . drawAAScene ( ) ;
}
else
{
2012-11-16 23:00:20 +01:00
m_vid . setup2DProjection ( ) ;
2012-01-21 21:57:41 +01:00
_drawBg ( ) ;
2012-06-01 08:43:37 +02:00
if ( withCF )
2012-01-21 21:57:41 +01:00
{
2012-11-11 19:28:03 +01:00
CoverFlow . draw ( ) ;
2012-01-21 21:57:41 +01:00
m_vid . setup2DProjection ( ) ;
2012-11-11 19:28:03 +01:00
CoverFlow . drawEffect ( ) ;
2019-10-17 01:22:40 +02:00
if ( ! m_soundThrdBusy & & ! m_banner . GetSelectedGame ( ) & & ! m_snapshot_loaded )
2012-11-11 19:28:03 +01:00
CoverFlow . drawText ( adjusting ) ;
2012-01-21 21:57:41 +01:00
}
}
2018-06-27 14:47:03 +02:00
/* game video or banner drawing */
2014-03-18 03:39:42 +01:00
if ( m_gameSelected )
{
2018-10-16 01:43:49 +02:00
if ( m_fa . isLoaded ( ) )
m_fa . draw ( ) ;
else if ( m_video_playing )
2014-03-18 03:39:42 +01:00
{
if ( movie . Frame ! = NULL )
{
DrawTexturePos ( movie . Frame ) ;
movie . Frame - > thread = false ;
}
}
else if ( m_banner . GetSelectedGame ( ) & & ( ! m_banner . GetInGameSettings ( ) | | ( m_banner . GetInGameSettings ( ) & & m_bnr_settings ) ) )
2021-10-07 23:38:32 +02:00
{
if ( ! m_soundThrdBusy ) // banner loaded
m_banner . Draw ( ) ;
else if ( m_banner . GetZoomSetting ( ) ) // banner not loaded but in full zoom mode
DrawRectangle ( 0.0f , 0.0f , m_vid . width ( ) , m_vid . height ( ) , ( GXColor ) { 0 , 0 , 0 , 0xFF } ) ; // to prevent coverflow from showing
}
2014-03-18 03:39:42 +01:00
}
2018-06-27 14:47:03 +02:00
/* gui buttons and text drawing */
2012-01-21 21:57:41 +01:00
m_btnMgr . draw ( ) ;
2018-06-27 14:47:03 +02:00
/* reading controller inputs and drawing cursor pointers*/
2012-01-21 21:57:41 +01:00
ScanInput ( ) ;
2018-06-27 14:47:03 +02:00
/* check if we want screensaver and if its idle long enuff, if so draw full screen black square with mild alpha */
if ( ! m_cfg . getBool ( " GENERAL " , " screensaver_disabled " , true ) )
m_vid . screensaver ( NoInputTime ( ) , m_cfg . getInt ( " GENERAL " , " screensaver_idle_seconds " , 60 ) ) ;
/* render everything on screen */
m_vid . render ( ) ;
2016-06-10 01:02:40 +02:00
// check if power button is pressed and exit wiiflow
2012-09-09 20:35:15 +02:00
if ( Sys_Exiting ( ) )
2019-05-06 20:53:33 +02:00
{
if ( m_cfg . getBool ( " GENERAL " , " idle_standby " , false ) )
exitHandler ( SHUTDOWN_IDLE ) ;
else
exitHandler ( SHUTDOWN_STANDBY ) ;
}
2018-06-27 14:47:03 +02:00
2016-06-10 01:02:40 +02:00
// check if we need to start playing the game/banner sound
2017-05-15 19:50:24 +02:00
// m_gameSelected means we are on the game selected menu
// m_gamesound_changed means a new game sound is loaded and ready to play
// the previous game sound needs to stop before playing new sound
// and the bg music volume needs to be 0 before playing game sound
2021-10-07 23:38:32 +02:00
if ( ! m_soundThrdBusy & & withCF & & m_gameSelected & & m_gamesound_changed & & ! m_gameSound . IsPlaying ( ) & & MusicPlayer . GetVolume ( ) = = 0 )
2012-01-21 21:57:41 +01:00
{
2017-04-18 01:23:50 +02:00
_stopGameSoundThread ( ) ; // stop game sound loading thread
m_gameSound . Play ( m_bnrSndVol ) ; // play game sound
2012-01-21 21:57:41 +01:00
m_gamesound_changed = false ;
}
2017-04-18 01:23:50 +02:00
// stop game/banner sound from playing if we exited game selected menu or if we move to new game
2021-10-07 23:38:32 +02:00
else if ( ( ! m_soundThrdBusy & & withCF & & m_gameSelected & & m_gamesound_changed & & m_gameSound . IsPlaying ( ) ) | | ( ! m_gameSelected & & m_gameSound . IsPlaying ( ) ) )
2012-08-16 00:33:54 +02:00
m_gameSound . Stop ( ) ;
2018-06-27 14:47:03 +02:00
2017-04-18 01:23:50 +02:00
/* decrease music volume to zero if any of these are true:
2018-06-27 14:47:03 +02:00
trailer video playing or | |
game / banner sound is being loaded because we are switching to a new game or | |
game / banner sound is loaded and ready to play or | |
2017-05-15 19:50:24 +02:00
gamesound hasn ' t finished - when finishes music volume back to normal - some gamesounds don ' t loop continuously
2017-04-18 01:23:50 +02:00
also this switches to next song if current song is done */
2017-05-15 19:50:24 +02:00
MusicPlayer . Tick ( ( withCF & & ( m_video_playing | | ( m_gameSelected & & m_soundThrdBusy ) | |
2018-06-27 14:47:03 +02:00
( m_gameSelected & & m_gamesound_changed ) ) ) | | m_gameSound . IsPlaying ( ) ) ;
2016-06-10 01:02:40 +02:00
// set song title and display it if music info is allowed
2012-09-29 13:41:47 +02:00
if ( MusicPlayer . SongChanged ( ) & & m_music_info )
2012-09-16 15:41:31 +02:00
{
2018-06-11 00:55:24 +02:00
m_btnMgr . setText ( m_mainLblCurMusic , MusicPlayer . GetFileName ( ) , false ) ; // false for word wrap
2012-09-16 15:41:31 +02:00
m_btnMgr . show ( m_mainLblCurMusic ) ;
2018-10-08 13:29:08 +02:00
MusicPlayer . DisplayTime = time ( NULL ) ;
2012-09-16 15:41:31 +02:00
}
2016-06-10 01:02:40 +02:00
// hide song title if it's displaying and been >3 seconds
2018-10-08 13:29:08 +02:00
else if ( MusicPlayer . DisplayTime > 0 & & time ( NULL ) - MusicPlayer . DisplayTime > 3 )
2012-09-16 15:41:31 +02:00
{
2018-10-08 13:29:08 +02:00
MusicPlayer . DisplayTime = 0 ;
m_btnMgr . hide ( m_mainLblCurMusic ) ;
if ( MusicPlayer . OneSong ) m_music_info = false ;
2012-09-16 15:41:31 +02:00
}
2012-01-21 21:57:41 +01:00
//Take Screenshot
2013-03-31 01:57:42 +01:00
if ( WBTN_Z_PRESSED | | GBTN_Z_PRESSED )
2012-01-21 21:57:41 +01:00
{
time_t rawtime ;
2012-06-01 08:43:37 +02:00
struct tm * timeinfo ;
2012-01-21 21:57:41 +01:00
char buffer [ 80 ] ;
time ( & rawtime ) ;
timeinfo = localtime ( & rawtime ) ;
strftime ( buffer , 80 , " %b-%d-20%y-%Hh%Mm%Ss.png " , timeinfo ) ;
gprintf ( " Screenshot taken and saved to: %s/%s \n " , m_screenshotDir . c_str ( ) , buffer ) ;
2012-05-04 14:30:43 +02:00
m_vid . TakeScreenshot ( fmt ( " %s/%s " , m_screenshotDir . c_str ( ) , buffer ) ) ;
2012-11-03 20:16:03 +01:00
if ( theme . cameraSound ! = NULL )
theme . cameraSound - > Play ( 255 ) ;
2012-01-21 21:57:41 +01:00
}
2012-06-01 08:43:37 +02:00
2016-11-07 16:06:00 +01:00
if ( show_mem )
{
m_btnMgr . setText ( m_mem1FreeSize , wfmt ( L " Mem1 lo Free:%u, Mem1 Free:%u " , MEM1_lo_freesize ( ) , MEM1_freesize ( ) ) , true ) ;
m_btnMgr . setText ( m_mem2FreeSize , wfmt ( L " Mem2 Free:%u " , MEM2_freesize ( ) ) , true ) ;
}
2012-06-01 08:43:37 +02:00
# ifdef SHOWMEMGECKO
mem1 = MEM1_freesize ( ) ;
mem2 = MEM2_freesize ( ) ;
if ( mem1 ! = mem1old )
{
mem1old = mem1 ;
gprintf ( " Mem1 Free: %u \n " , mem1 ) ;
}
if ( mem2 ! = mem2old )
{
mem2old = mem2 ;
gprintf ( " Mem2 Free: %u \n " , mem2 ) ;
2014-03-18 03:39:42 +01:00
}
2012-06-01 08:43:37 +02:00
# endif
2012-01-21 21:57:41 +01:00
}
2019-11-24 00:54:38 +01:00
void CMenu : : _setBg ( const TexData & bgTex , const TexData & bglqTex )
2012-01-21 21:57:41 +01:00
{
2012-11-29 21:30:05 +01:00
/* Not setting same bg again */
2019-11-24 00:54:38 +01:00
if ( m_nextBg = = & bgTex )
2012-11-03 20:16:03 +01:00
return ;
2016-04-11 22:29:09 +02:00
m_lqBg = & bglqTex ;
2012-11-29 21:30:05 +01:00
/* before setting new next bg set previous */
if ( m_nextBg ! = NULL )
m_prevBg = m_nextBg ;
2016-04-11 22:29:09 +02:00
m_nextBg = & bgTex ;
2012-01-21 21:57:41 +01:00
m_bgCrossFade = 0xFF ;
}
void CMenu : : _updateBg ( void )
{
2012-11-29 21:30:05 +01:00
if ( m_bgCrossFade = = 0 )
return ;
m_bgCrossFade = max ( 0 , ( int ) m_bgCrossFade - 14 ) ;
2012-01-21 21:57:41 +01:00
Mtx modelViewMtx ;
GXTexObj texObj ;
GXTexObj texObj2 ;
2012-11-29 21:30:05 +01:00
/* last pass so remove previous bg */
if ( m_bgCrossFade = = 0 )
m_prevBg = NULL ;
2012-01-21 21:57:41 +01:00
GX_ClearVtxDesc ( ) ;
2012-11-29 21:30:05 +01:00
GX_SetNumTevStages ( m_prevBg = = NULL ? 1 : 2 ) ;
2012-01-21 21:57:41 +01:00
GX_SetNumChans ( 0 ) ;
GX_SetVtxDesc ( GX_VA_POS , GX_DIRECT ) ;
GX_SetVtxAttrFmt ( GX_VTXFMT0 , GX_VA_POS , GX_POS_XYZ , GX_F32 , 0 ) ;
GX_SetVtxDesc ( GX_VA_TEX0 , GX_DIRECT ) ;
GX_SetVtxAttrFmt ( GX_VTXFMT0 , GX_VA_TEX0 , GX_TEX_ST , GX_F32 , 0 ) ;
2012-11-29 21:30:05 +01:00
GX_SetNumTexGens ( m_prevBg = = NULL ? 1 : 2 ) ;
2012-01-21 21:57:41 +01:00
GX_SetTexCoordGen ( GX_TEXCOORD0 , GX_TG_MTX2x4 , GX_TG_TEX0 , GX_IDENTITY ) ;
GX_SetTexCoordGen ( GX_TEXCOORD1 , GX_TG_MTX2x4 , GX_TG_TEX0 , GX_IDENTITY ) ;
GX_SetTevKColor ( GX_KCOLOR0 , CColor ( m_bgCrossFade , 0xFF - m_bgCrossFade , 0 , 0 ) ) ;
GX_SetTevKColorSel ( GX_TEVSTAGE0 , GX_TEV_KCSEL_K0_R ) ;
GX_SetTevColorIn ( GX_TEVSTAGE0 , GX_CC_TEXC , GX_CC_ZERO , GX_CC_KONST , GX_CC_ZERO ) ;
GX_SetTevAlphaIn ( GX_TEVSTAGE0 , GX_CA_ZERO , GX_CA_ZERO , GX_CA_ZERO , GX_CA_ZERO ) ;
GX_SetTevColorOp ( GX_TEVSTAGE0 , GX_TEV_ADD , GX_TB_ZERO , GX_CS_SCALE_1 , GX_TRUE , GX_TEVPREV ) ;
GX_SetTevAlphaOp ( GX_TEVSTAGE0 , GX_TEV_ADD , GX_TB_ZERO , GX_CS_SCALE_1 , GX_TRUE , GX_TEVPREV ) ;
GX_SetTevOrder ( GX_TEVSTAGE0 , GX_TEXCOORD0 , GX_TEXMAP0 , GX_COLORNULL ) ;
GX_SetTevKColorSel ( GX_TEVSTAGE1 , GX_TEV_KCSEL_K0_G ) ;
GX_SetTevColorIn ( GX_TEVSTAGE1 , GX_CC_TEXC , GX_CC_ZERO , GX_CC_KONST , GX_CC_CPREV ) ;
GX_SetTevAlphaIn ( GX_TEVSTAGE1 , GX_CA_ZERO , GX_CA_ZERO , GX_CA_ZERO , GX_CA_ZERO ) ;
GX_SetTevColorOp ( GX_TEVSTAGE1 , GX_TEV_ADD , GX_TB_ZERO , GX_CS_SCALE_1 , GX_TRUE , GX_TEVPREV ) ;
GX_SetTevAlphaOp ( GX_TEVSTAGE1 , GX_TEV_ADD , GX_TB_ZERO , GX_CS_SCALE_1 , GX_TRUE , GX_TEVPREV ) ;
GX_SetTevOrder ( GX_TEVSTAGE1 , GX_TEXCOORD1 , GX_TEXMAP1 , GX_COLORNULL ) ;
GX_SetBlendMode ( GX_BM_NONE , GX_BL_SRCALPHA , GX_BL_INVSRCALPHA , GX_LO_CLEAR ) ;
GX_SetAlphaUpdate ( GX_FALSE ) ;
GX_SetCullMode ( GX_CULL_NONE ) ;
GX_SetZMode ( GX_DISABLE , GX_ALWAYS , GX_FALSE ) ;
guMtxIdentity ( modelViewMtx ) ;
GX_LoadPosMtxImm ( modelViewMtx , GX_PNMTX0 ) ;
2012-11-16 23:00:20 +01:00
if ( m_nextBg ! = NULL & & m_nextBg - > data ! = NULL )
{
GX_InitTexObj ( & texObj , m_nextBg - > data , m_nextBg - > width , m_nextBg - > height , m_nextBg - > format , GX_CLAMP , GX_CLAMP , GX_FALSE ) ;
GX_LoadTexObj ( & texObj , GX_TEXMAP0 ) ;
}
2012-11-29 21:30:05 +01:00
if ( m_prevBg ! = NULL & & m_prevBg - > data ! = NULL )
2012-01-21 21:57:41 +01:00
{
2012-11-29 21:30:05 +01:00
GX_InitTexObj ( & texObj2 , m_prevBg - > data , m_prevBg - > width , m_prevBg - > height , m_prevBg - > format , GX_CLAMP , GX_CLAMP , GX_FALSE ) ;
2012-01-21 21:57:41 +01:00
GX_LoadTexObj ( & texObj2 , GX_TEXMAP1 ) ;
}
GX_Begin ( GX_QUADS , GX_VTXFMT0 , 4 ) ;
GX_Position3f32 ( 0.f , 0.f , 0.f ) ;
GX_TexCoord2f32 ( 0.f , 0.f ) ;
GX_Position3f32 ( 640.f , 0.f , 0.f ) ;
GX_TexCoord2f32 ( 1.f , 0.f ) ;
GX_Position3f32 ( 640.f , 480.f , 0.f ) ;
GX_TexCoord2f32 ( 1.f , 1.f ) ;
GX_Position3f32 ( 0.f , 480.f , 0.f ) ;
GX_TexCoord2f32 ( 0.f , 1.f ) ;
GX_End ( ) ;
GX_SetNumTevStages ( 1 ) ;
m_curBg . width = 640 ;
m_curBg . height = 480 ;
m_curBg . format = GX_TF_RGBA8 ;
m_curBg . maxLOD = 0 ;
m_vid . renderToTexture ( m_curBg , true ) ;
}
void CMenu : : _drawBg ( void )
{
Mtx modelViewMtx ;
GXTexObj texObj ;
GX_ClearVtxDesc ( ) ;
GX_SetNumTevStages ( 1 ) ;
GX_SetNumChans ( 0 ) ;
GX_SetVtxDesc ( GX_VA_POS , GX_DIRECT ) ;
GX_SetVtxAttrFmt ( GX_VTXFMT0 , GX_VA_POS , GX_POS_XYZ , GX_F32 , 0 ) ;
GX_SetVtxDesc ( GX_VA_TEX0 , GX_DIRECT ) ;
GX_SetVtxAttrFmt ( GX_VTXFMT0 , GX_VA_TEX0 , GX_TEX_ST , GX_F32 , 0 ) ;
GX_SetNumTexGens ( 1 ) ;
GX_SetTevColorIn ( GX_TEVSTAGE0 , GX_CC_ZERO , GX_CC_ZERO , GX_CC_ZERO , GX_CC_TEXC ) ;
GX_SetTevAlphaIn ( GX_TEVSTAGE0 , GX_CA_ZERO , GX_CA_ZERO , GX_CA_ZERO , GX_CA_ZERO ) ;
GX_SetTevColorOp ( GX_TEVSTAGE0 , GX_TEV_ADD , GX_TB_ZERO , GX_CS_SCALE_1 , GX_TRUE , GX_TEVPREV ) ;
GX_SetTevAlphaOp ( GX_TEVSTAGE0 , GX_TEV_ADD , GX_TB_ZERO , GX_CS_SCALE_1 , GX_TRUE , GX_TEVPREV ) ;
GX_SetTexCoordGen ( GX_TEXCOORD0 , GX_TG_MTX2x4 , GX_TG_TEX0 , GX_IDENTITY ) ;
GX_SetTevOrder ( GX_TEVSTAGE0 , GX_TEXCOORD0 , GX_TEXMAP0 , GX_COLORNULL ) ;
GX_SetBlendMode ( GX_BM_NONE , GX_BL_SRCALPHA , GX_BL_INVSRCALPHA , GX_LO_CLEAR ) ;
GX_SetAlphaUpdate ( GX_FALSE ) ;
GX_SetCullMode ( GX_CULL_NONE ) ;
GX_SetZMode ( GX_DISABLE , GX_ALWAYS , GX_FALSE ) ;
guMtxIdentity ( modelViewMtx ) ;
GX_LoadPosMtxImm ( modelViewMtx , GX_PNMTX0 ) ;
2012-11-03 20:16:03 +01:00
GX_InitTexObj ( & texObj , m_curBg . data , m_curBg . width , m_curBg . height , m_curBg . format , GX_CLAMP , GX_CLAMP , GX_FALSE ) ;
2012-01-21 21:57:41 +01:00
GX_LoadTexObj ( & texObj , GX_TEXMAP0 ) ;
GX_Begin ( GX_QUADS , GX_VTXFMT0 , 4 ) ;
GX_Position3f32 ( 0.f , 0.f , 0.f ) ;
GX_TexCoord2f32 ( 0.f , 0.f ) ;
GX_Position3f32 ( 640.f , 0.f , 0.f ) ;
GX_TexCoord2f32 ( 1.f , 0.f ) ;
GX_Position3f32 ( 640.f , 480.f , 0.f ) ;
GX_TexCoord2f32 ( 1.f , 1.f ) ;
GX_Position3f32 ( 0.f , 480.f , 0.f ) ;
GX_TexCoord2f32 ( 0.f , 1.f ) ;
GX_End ( ) ;
}
const wstringEx CMenu : : _fmt ( const char * key , const wchar_t * def )
{
wstringEx ws = m_loc . getWString ( m_curLanguage , key , def ) ;
if ( checkFmt ( def , ws ) ) return ws ;
return def ;
}
2016-06-20 23:03:40 +02:00
void CMenu : : _initCF ( void )
2012-01-21 21:57:41 +01:00
{
2016-06-20 23:03:40 +02:00
Config dump ;
-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
bool dumpGameLst = m_cfg . getBool ( " GENERAL " , " dump_list " , true ) ;
if ( dumpGameLst ) dump . load ( fmt ( " %s/ " TITLES_DUMP_FILENAME , m_settingsDir . c_str ( ) ) ) ;
2016-06-20 23:03:40 +02:00
CoverFlow . clear ( ) ;
CoverFlow . reserve ( m_gameList . size ( ) ) ;
2019-12-18 16:39:27 +01:00
string requiredCats ;
string selectedCats ;
string hiddenCats ;
2019-02-11 21:55:44 +01:00
char id [ 74 ] ;
char catID [ 64 ] ;
2018-05-29 11:59:57 +02:00
2020-09-25 13:19:03 +02:00
// filter list based on categories and favorites
-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
for ( vector < dir_discHdr > : : iterator hdr = m_gameList . begin ( ) ; hdr ! = m_gameList . end ( ) ; + + hdr )
2016-06-20 23:03:40 +02:00
{
2019-12-18 16:39:27 +01:00
requiredCats = m_cat . getString ( " GENERAL " , " required_categories " , " " ) ;
selectedCats = m_cat . getString ( " GENERAL " , " selected_categories " , " " ) ;
hiddenCats = m_cat . getString ( " GENERAL " , " hidden_categories " , " " ) ;
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
const char * favDomain = " FAVORITES " ;
const char * adultDomain = " ADULTONLY " ;
2019-02-11 21:55:44 +01:00
memset ( id , 0 , 74 ) ;
memset ( catID , 0 , 64 ) ;
-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-06-20 23:03:40 +02:00
if ( m_sourceflow )
{
2020-08-25 00:58:09 +02:00
if ( m_source . getBool ( sfmt ( " button_%i " , hdr - > settings [ 0 ] ) , " hidden " , false ) = = false )
CoverFlow . addItem ( & ( * hdr ) , 0 , 0 ) ;
-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
continue ;
}
2019-02-11 21:55:44 +01:00
else if ( hdr - > type = = TYPE_HOMEBREW )
{
wcstombs ( id , hdr - > title , 63 ) ;
strcpy ( catID , id ) ;
}
else if ( hdr - > type = = TYPE_PLUGIN )
2016-06-20 23:03:40 +02:00
{
2019-12-18 16:39:27 +01:00
if ( m_cat . hasDomain ( " PLUGINS " ) ) // if using new style categories_lite.ini
{
requiredCats = m_cat . getString ( " PLUGINS " , " required_categories " , " " ) ;
selectedCats = m_cat . getString ( " PLUGINS " , " selected_categories " , " " ) ;
hiddenCats = m_cat . getString ( " PLUGINS " , " hidden_categories " , " " ) ;
}
-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 ) ;
2019-02-11 21:55:44 +01:00
if ( strrchr ( hdr - > path , ' / ' ) ! = NULL )
wcstombs ( catID , hdr - > title , 63 ) ;
else
strncpy ( catID , hdr - > path , 63 ) ; // scummvm
strcpy ( id , m_plugin . PluginMagicWord ) ;
strcat ( id , fmt ( " /%s " , catID ) ) ;
-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
favDomain = " FAVORITES_PLUGINS " ;
adultDomain = " ADULTONLY_PLUGINS " ;
2016-06-20 23:03:40 +02:00
}
2019-03-04 21:29:46 +01:00
else // wii, gc, channels
2016-06-20 23:03:40 +02:00
{
2019-02-11 21:55:44 +01:00
strcpy ( id , hdr - > id ) ;
strcpy ( catID , id ) ;
2016-06-20 23:03:40 +02:00
}
2018-05-29 11:59:57 +02:00
2019-12-18 16:39:27 +01:00
u8 numReqCats = requiredCats . length ( ) ;
u8 numSelCats = selectedCats . length ( ) ;
u8 numHidCats = hiddenCats . length ( ) ;
-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 ( ( ! m_favorites | | m_gcfg1 . getBool ( favDomain , id , false ) )
& & ( ! m_locked | | ! m_gcfg1 . getBool ( adultDomain , id , false ) ) )
2016-06-20 23:03:40 +02:00
{
2018-05-29 11:59:57 +02:00
string catDomain = " " ;
if ( hdr - > type = = TYPE_CHANNEL )
catDomain = " NAND " ;
else if ( hdr - > type = = TYPE_EMUCHANNEL )
catDomain = " CHANNELS " ;
else if ( hdr - > type = = TYPE_GC_GAME )
catDomain = " GAMECUBE " ;
else if ( hdr - > type = = TYPE_WII_GAME )
catDomain = " WII " ;
2019-02-11 21:55:44 +01:00
else if ( hdr - > type = = TYPE_HOMEBREW )
catDomain = " HOMEBREW " ;
2018-05-29 11:59:57 +02:00
else
catDomain = m_plugin . PluginMagicWord ;
2016-06-20 23:03:40 +02:00
if ( numReqCats ! = 0 | | numSelCats ! = 0 | | numHidCats ! = 0 ) // if all 0 skip checking cats and show all games
{
2019-10-27 01:45:55 +02:00
string idCats = m_cat . getString ( catDomain , catID , " " ) ;
u8 numIdCats = idCats . length ( ) ;
2018-09-26 21:49:55 +02:00
if ( numIdCats = = 0 )
2019-02-11 21:55:44 +01:00
m_cat . remove ( catDomain , catID ) ;
2016-06-20 23:03:40 +02:00
bool inaCat = false ;
bool inHiddenCat = false ;
int reqMatch = 0 ;
if ( numIdCats ! = 0 )
{
for ( u8 j = 0 ; j < numIdCats ; + + j )
{
int k = ( static_cast < int > ( idCats [ j ] ) ) - 32 ;
if ( k < = 0 )
continue ;
bool match = false ;
if ( numReqCats ! = 0 )
{
for ( u8 l = 0 ; l < numReqCats ; + + l )
{
if ( k = = ( static_cast < int > ( requiredCats [ l ] ) - 32 ) )
{
match = true ;
reqMatch + + ;
inaCat = true ;
}
}
}
if ( match )
continue ;
if ( numSelCats ! = 0 )
{
for ( u8 l = 0 ; l < numSelCats ; + + l )
{
if ( k = = ( static_cast < int > ( selectedCats [ l ] ) - 32 ) )
{
match = true ;
inaCat = true ;
}
}
}
if ( match )
continue ;
if ( numHidCats ! = 0 )
{
for ( u8 l = 0 ; l < numHidCats ; + + l )
{
if ( k = = ( static_cast < int > ( hiddenCats [ l ] ) - 32 ) )
inHiddenCat = true ;
}
}
}
}
//continue; means don't add game to list (don't show)
if ( inHiddenCat )
continue ;
if ( numReqCats ! = reqMatch )
continue ;
if ( ! inaCat )
{
if ( numHidCats = = 0 )
continue ;
else if ( numSelCats > 0 )
continue ;
}
}
2019-02-11 21:55:44 +01:00
if ( dumpGameLst & & ! NoGameID ( hdr - > type ) )
2016-06-20 23:03: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
const char * domain = NULL ;
switch ( hdr - > type )
2016-06-20 23:03: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
case TYPE_CHANNEL :
domain = " NAND " ;
break ;
case TYPE_EMUCHANNEL :
domain = " CHANNELS " ;
break ;
case TYPE_GC_GAME :
domain = " GAMECUBE " ;
break ;
default :
domain = " WII " ;
2016-06-20 23:03:40 +02:00
break ;
}
-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
dump . setWString ( domain , id , hdr - > title ) ;
2016-06-20 23:03: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
2020-07-17 22:23:42 +02:00
if ( hdr - > type = = TYPE_PLUGIN & & m_plugin . GetEnabledStatus ( m_plugin . GetPluginPosition ( hdr - > settings [ 0 ] ) ) )
-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
CoverFlow . addItem ( & ( * hdr ) , 0 , 0 ) ;
2016-06-20 23:03:40 +02:00
else
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
{
int playcount = m_gcfg1 . getInt ( " PLAYCOUNT " , id , 0 ) ;
unsigned int lastPlayed = m_gcfg1 . getUInt ( " LASTPLAYED " , id , 0 ) ;
CoverFlow . addItem ( & ( * hdr ) , playcount , lastPlayed ) ;
}
2016-06-20 23:03:40 +02:00
}
2019-02-11 21:55:44 +01:00
/* remove them if false to keep file short */
if ( ! m_gcfg1 . getBool ( favDomain , id ) )
2019-03-04 21:29:46 +01:00
m_gcfg1 . remove ( favDomain , id ) ;
2019-02-11 21:55:44 +01:00
if ( ! m_gcfg1 . getBool ( adultDomain , id ) )
2019-03-04 21:29:46 +01:00
m_gcfg1 . remove ( adultDomain , id ) ;
2016-06-20 23:03: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
2020-04-08 19:06:21 +02:00
if ( CoverFlow . empty ( ) )
{
dump . unload ( ) ;
return ;
}
2016-06-20 23:03:40 +02:00
if ( dumpGameLst )
{
dump . save ( 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
m_cfg . setBool ( " GENERAL " , " dump_list " , false ) ;
2016-06-20 23:03: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
2019-10-17 01:22:40 +02:00
/*********************** sort coverflow list ***********************/
2016-12-01 01:05:39 +01:00
CoverFlow . setSorting ( m_source_cnt > 1 ? ( Sorting ) 0 : ( Sorting ) m_cfg . getInt ( _domainFromView ( ) , " sort " , 0 ) ) ;
2019-03-04 21:29:46 +01:00
2019-10-17 01:22:40 +02:00
/*********************** set box mode and small box mode **************************/
2019-03-04 21:29:46 +01:00
if ( ! m_sourceflow )
2016-12-14 19:47:13 +01:00
{
2019-03-04 21:29:46 +01:00
if ( m_current_view = = COVERFLOW_HOMEBREW )
{
CoverFlow . setBoxMode ( m_cfg . getBool ( HOMEBREW_DOMAIN , " box_mode " , true ) ) ;
CoverFlow . setSmallBoxMode ( m_cfg . getBool ( HOMEBREW_DOMAIN , " smallbox " , false ) ) ;
}
else if ( m_current_view = = COVERFLOW_PLUGIN )
2018-09-26 20:26:01 +02:00
{
2019-07-10 16:24:44 +02:00
if ( enabledPluginsCount = = 1 ) // only one plugin enabled
2019-05-29 21:07:18 +02:00
{
2020-07-17 22:23:42 +02:00
if ( m_plugin . GetEnabledStatus ( m_plugin . GetPluginPosition ( strtoul ( " 48425257 " , NULL , 16 ) ) ) ) // homebrew plugin
2019-07-10 16:24:44 +02:00
{
CoverFlow . setBoxMode ( m_cfg . getBool ( HOMEBREW_DOMAIN , " box_mode " , true ) ) ;
CoverFlow . setSmallBoxMode ( m_cfg . getBool ( HOMEBREW_DOMAIN , " smallbox " , false ) ) ;
}
else
{
s8 bm = - 1 ;
2020-07-17 22:23:42 +02:00
for ( u8 i = 0 ; m_plugin . PluginExist ( i ) ; + + i )
2019-07-10 16:24:44 +02:00
{
2020-07-17 22:23:42 +02:00
if ( m_plugin . GetEnabledStatus ( i ) )
2019-07-10 16:24:44 +02:00
{
bm = m_plugin . GetBoxMode ( i ) ;
break ;
}
}
if ( bm < 0 ) // if negative then use default setting
CoverFlow . setBoxMode ( m_cfg . getBool ( " GENERAL " , " box_mode " , true ) ) ;
else
CoverFlow . setBoxMode ( bm = = 0 ? false : true ) ;
CoverFlow . setSmallBoxMode ( false ) ;
}
2019-05-29 21:07:18 +02:00
}
2019-07-10 16:24:44 +02:00
else // more than 1 plugin enabled
2018-09-26 20:26:01 +02:00
{
2019-07-10 16:24:44 +02:00
s8 bm1 = - 1 ;
s8 bm2 = - 1 ;
2020-07-17 22:23:42 +02:00
bool all_same = true ;
for ( u8 i = 0 ; m_plugin . PluginExist ( i ) ; + + i )
2019-03-04 21:29:46 +01:00
{
2020-07-17 22:23:42 +02:00
if ( m_plugin . GetEnabledStatus ( i ) )
2019-05-29 21:07:18 +02:00
{
2020-07-17 22:23:42 +02:00
if ( bm1 = = - 1 )
{
bm1 = m_plugin . GetBoxMode ( i ) ;
if ( bm1 < 0 )
bm1 = m_cfg . getBool ( " GENERAL " , " box_mode " , true ) ? 1 : 0 ;
}
else
{
bm2 = m_plugin . GetBoxMode ( i ) ;
if ( bm2 < 0 )
bm2 = m_cfg . getBool ( " GENERAL " , " box_mode " , true ) ? 1 : 0 ;
if ( bm2 ! = bm1 )
{
all_same = false ;
break ;
}
}
2019-05-29 21:07:18 +02:00
}
2019-03-04 21:29:46 +01:00
}
2020-07-17 22:23:42 +02:00
if ( ! all_same )
2019-07-10 16:24:44 +02:00
CoverFlow . setBoxMode ( m_cfg . getBool ( " GENERAL " , " box_mode " , true ) ) ;
2020-07-17 22:23:42 +02:00
else
2019-07-10 16:24:44 +02:00
CoverFlow . setBoxMode ( bm1 = = 0 ? false : true ) ;
2019-05-29 21:07:18 +02:00
CoverFlow . setSmallBoxMode ( false ) ;
2018-09-26 20:26:01 +02:00
}
}
else
2019-03-04 21:29:46 +01:00
{
CoverFlow . setBoxMode ( m_cfg . getBool ( " GENERAL " , " box_mode " , true ) ) ;
CoverFlow . setSmallBoxMode ( false ) ;
}
}
else // sourceflow
{
CoverFlow . setBoxMode ( m_cfg . getBool ( SOURCEFLOW_DOMAIN , " box_mode " , true ) ) ;
CoverFlow . setSmallBoxMode ( m_cfg . getBool ( SOURCEFLOW_DOMAIN , " smallbox " , false ) ) ;
2016-12-14 19:47:13 +01:00
}
2019-03-04 21:29:46 +01:00
2019-10-17 01:22:40 +02:00
/*********************** Setup coverflow covers settings ***********************/
2016-06-20 23:03:40 +02:00
CoverFlow . setBufferSize ( m_cfg . getInt ( " GENERAL " , " cover_buffer " , 20 ) ) ;
2021-09-27 16:54:16 +02:00
CoverFlow . setHQcover ( m_cfg . getBool ( " GENERAL " , " cover_use_hq " , false ) ) ;
2016-06-20 23:03:40 +02:00
CoverFlow . start ( m_imgsDir ) ;
2019-10-17 01:22:40 +02:00
/*********************** Get and set game list current item to center cover **************************/
2016-06-20 23:03:40 +02:00
if ( ! CoverFlow . empty ( ) )
{
2019-10-17 01:22:40 +02:00
/* get ID or filename or source number of center cover */
string ID = " " , filename = " " ;
u32 sourceNumber = 0 ;
2019-03-04 21:29:46 +01:00
if ( m_current_view = = COVERFLOW_PLUGIN & & ! m_sourceflow )
2018-12-02 01:39:33 +01:00
{
2020-07-17 22:23:42 +02:00
if ( ! m_plugin . GetEnabledStatus ( m_plugin . GetPluginPosition ( strtoul ( m_cfg . getString ( PLUGIN_DOMAIN , " cur_magic " , " 00000000 " ) . c_str ( ) , NULL , 16 ) ) ) )
2018-12-02 01:39:33 +01:00
{
for ( u8 i = 0 ; m_plugin . PluginExist ( i ) ; + + i )
{
2020-07-17 22:23:42 +02:00
if ( m_plugin . GetEnabledStatus ( i ) )
2018-12-02 01:39:33 +01:00
{
2020-07-17 22:23:42 +02:00
m_cfg . setString ( PLUGIN_DOMAIN , " cur_magic " , sfmt ( " %08x " , m_plugin . GetPluginMagic ( i ) ) ) ;
2018-12-02 01:39:33 +01:00
break ;
}
}
}
2020-07-17 22:23:42 +02:00
strncpy ( m_plugin . PluginMagicWord , m_cfg . getString ( PLUGIN_DOMAIN , " cur_magic " ) . c_str ( ) , 8 ) ;
2018-12-02 01:39:33 +01:00
if ( strncasecmp ( m_plugin . PluginMagicWord , " 4E47434D " , 8 ) = = 0 ) //NGCM
2019-10-17 01:22:40 +02:00
ID = m_cfg . getString ( " plugin_item " , m_plugin . PluginMagicWord , " " ) ;
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 4E574949 " , 8 ) = = 0 ) //NWII
ID = m_cfg . getString ( " plugin_item " , m_plugin . PluginMagicWord , " " ) ;
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 4E414E44 " , 8 ) = = 0 ) //NAND
ID = m_cfg . getString ( " plugin_item " , m_plugin . PluginMagicWord , " " ) ;
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 454E414E " , 8 ) = = 0 ) //EMUNAND
ID = m_cfg . getString ( " plugin_item " , m_plugin . PluginMagicWord , " " ) ;
else
2019-12-18 16:39:27 +01:00
filename = m_cfg . getString ( " plugin_item " , m_plugin . PluginMagicWord , " " ) ; // homebrew and plugins
2018-12-02 01:39:33 +01:00
}
2019-10-17 01:22:40 +02:00
else if ( m_sourceflow & & sm_numbers . size ( ) > 0 )
sourceNumber = stoi ( sm_numbers [ sm_numbers . size ( ) - 1 ] ) ;
else if ( m_current_view = = COVERFLOW_HOMEBREW | | ( m_source_cnt > 1 & & NoGameID ( m_cfg . getInt ( " MULTI " , " current_item_type " , TYPE_PLUGIN ) ) ) )
filename = m_cfg . getString ( _domainFromView ( ) , " current_item " , " " ) ;
2018-12-02 01:39:33 +01:00
else
2019-10-17 01:22:40 +02:00
ID = m_cfg . getString ( _domainFromView ( ) , " current_item " , " " ) ;
/* set center cover as coverflow current position */
if ( ! CoverFlow . _setCurPosToCurItem ( ID . c_str ( ) , filename . c_str ( ) , sourceNumber , true ) )
CoverFlow . _setCurPos ( 0 ) ; // if not found set first cover as coverflow current position
/************************** create and start the cover loader thread *************************/
2016-06-20 23:03:40 +02:00
CoverFlow . startCoverLoader ( ) ;
}
2012-01-21 21:57:41 +01:00
}
bool CMenu : : _loadList ( void )
{
-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
CoverFlow . clear ( ) ; // clears filtered list (m_items), cover list (m_covers), and cover textures and stops coverloader
2013-01-15 14:54:33 +01:00
m_gameList . clear ( ) ;
-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
vector < dir_discHdr > ( ) . swap ( m_gameList ) ;
2012-12-22 17:47:02 +01:00
NANDemuView = false ;
2016-06-06 15:52:57 +02:00
2016-06-20 23:03:40 +02:00
if ( m_sourceflow )
{
2018-09-26 17:28:01 +02:00
m_cacheList . createSFList ( m_max_source_btn , m_source , m_sourceDir ) ;
2016-06-20 23:03:40 +02:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
m_gameList . push_back ( * tmp_itr ) ;
-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_cacheList . Clear ( ) ;
2019-03-27 17:45:43 +01:00
if ( SF_cacheCovers )
{
SF_cacheCovers = false ;
cacheCovers = true ;
}
2016-06-20 23:03:40 +02:00
return true ;
}
gprintf ( " Creating Gamelist \n " ) ;
2016-12-01 01:05:39 +01:00
if ( m_current_view & COVERFLOW_PLUGIN )
2016-04-03 02:51:40 +02:00
_loadPluginList ( ) ;
2016-06-20 23:03:40 +02:00
2016-12-01 01:05:39 +01:00
if ( m_current_view & COVERFLOW_WII )
2016-04-03 02:51:40 +02:00
_loadWiiList ( ) ;
2016-06-20 23:03:40 +02:00
2016-12-01 01:05:39 +01:00
if ( m_current_view & COVERFLOW_CHANNEL )
2013-01-15 14:54:33 +01:00
_loadChannelList ( ) ;
2016-06-20 23:03:40 +02:00
2016-12-01 01:05:39 +01:00
if ( m_current_view & COVERFLOW_GAMECUBE )
2016-04-03 02:51:40 +02:00
_loadGamecubeList ( ) ;
2016-06-20 23:03:40 +02:00
2019-03-04 21:29:46 +01:00
if ( m_current_view & COVERFLOW_HOMEBREW )
_loadHomebrewList ( HOMEBREW_DIR ) ;
-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_cacheList . Clear ( ) ;
2012-01-21 21:57:41 +01:00
2013-03-28 14:02:50 +01:00
gprintf ( " Games found: %i \n " , m_gameList . size ( ) ) ;
2013-01-15 14:54:33 +01:00
return m_gameList . size ( ) > 0 ? true : false ;
2012-01-21 21:57:41 +01:00
}
2016-04-03 02:51:40 +02:00
bool CMenu : : _loadWiiList ( void )
2012-01-21 21:57:41 +01:00
{
2012-11-04 20:22:02 +01:00
currentPartition = m_cfg . getInt ( WII_DOMAIN , " partition " , USB1 ) ;
2012-09-22 15:47:52 +02:00
if ( ! DeviceHandle . IsInserted ( currentPartition ) )
2012-01-21 21:57:41 +01:00
return false ;
2018-12-24 14:42:31 +01:00
gprintf ( " Adding wii list \n " ) ;
2012-09-22 15:47:52 +02:00
DeviceHandle . OpenWBFS ( currentPartition ) ;
2013-08-06 23:31:25 +02:00
string gameDir ( fmt ( wii_games_dir , DeviceName [ currentPartition ] ) ) ;
2012-10-04 17:25:35 +02:00
string cacheDir ( fmt ( " %s/%s_wii.db " , m_listCacheDir . c_str ( ) , DeviceName [ currentPartition ] ) ) ;
2012-11-04 20:22:02 +01:00
bool updateCache = m_cfg . getBool ( WII_DOMAIN , " update_cache " ) ;
2020-05-02 00:32:23 +02:00
bool preCachedList = fsop_FileExist ( cacheDir . c_str ( ) ) ;
2019-11-27 14:28:54 +01:00
m_cacheList . CreateList ( COVERFLOW_WII , gameDir , stringToVector ( " .wbfs|.iso " , ' | ' ) , cacheDir , updateCache ) ;
2012-09-22 15:47:52 +02:00
WBFS_Close ( ) ;
2013-01-15 14:54:33 +01:00
m_cfg . remove ( WII_DOMAIN , " update_cache " ) ;
2016-06-20 23:03:40 +02:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
m_gameList . push_back ( * tmp_itr ) ;
2020-05-02 00:32:23 +02:00
if ( updateCache | | ( ! preCachedList & & fsop_FileExist ( cacheDir . c_str ( ) ) ) )
cacheCovers = true ;
2013-01-15 14:54:33 +01:00
return true ;
2012-01-21 21:57:41 +01:00
}
2019-02-08 01:34:30 +01:00
bool CMenu : : _loadHomebrewList ( const char * HB_Dir )
2012-01-21 21:57:41 +01:00
{
2012-11-04 20:22:02 +01:00
currentPartition = m_cfg . getInt ( HOMEBREW_DOMAIN , " partition " , SD ) ;
2012-09-22 15:47:52 +02:00
if ( ! DeviceHandle . IsInserted ( currentPartition ) )
2012-01-21 21:57:41 +01:00
return false ;
2018-12-24 14:42:31 +01:00
gprintf ( " Adding homebrew list \n " ) ;
2019-02-08 01:34:30 +01:00
string gameDir ( fmt ( " %s:/%s " , DeviceName [ currentPartition ] , HB_Dir ) ) ;
2019-03-27 17:45:43 +01:00
string cacheDir ( fmt ( " %s/%s_%s.db " , m_listCacheDir . c_str ( ) , DeviceName [ currentPartition ] , HB_Dir ) ) ;
bool updateCache = m_cfg . getBool ( HOMEBREW_DOMAIN , " update_cache " ) ;
2020-05-02 00:32:23 +02:00
bool preCachedList = fsop_FileExist ( cacheDir . c_str ( ) ) ;
2019-11-27 14:28:54 +01:00
m_cacheList . CreateList ( COVERFLOW_HOMEBREW , gameDir , stringToVector ( " .dol|.elf " , ' | ' ) , cacheDir , updateCache ) ;
2019-03-27 17:45:43 +01:00
m_cfg . remove ( HOMEBREW_DOMAIN , " update_cache " ) ;
2016-06-20 23:03:40 +02:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
m_gameList . push_back ( * tmp_itr ) ;
2020-05-02 00:32:23 +02:00
if ( updateCache | | ( ! preCachedList & & fsop_FileExist ( cacheDir . c_str ( ) ) ) )
cacheCovers = true ;
2013-01-15 14:54:33 +01:00
return true ;
2012-01-21 21:57:41 +01:00
}
2016-04-03 02:51:40 +02:00
bool CMenu : : _loadGamecubeList ( )
2012-01-21 22:15:45 +01:00
{
2012-11-04 20:22:02 +01:00
currentPartition = m_cfg . getInt ( GC_DOMAIN , " partition " , USB1 ) ;
2012-09-22 15:47:52 +02:00
if ( ! DeviceHandle . IsInserted ( currentPartition ) )
2012-01-21 22:15:45 +01:00
return false ;
2018-12-24 14:42:31 +01:00
gprintf ( " Adding gamecube list \n " ) ;
2016-04-03 02:31:02 +02:00
string gameDir ( fmt ( gc_games_dir , DeviceName [ currentPartition ] ) ) ;
2012-10-04 17:25:35 +02:00
string cacheDir ( fmt ( " %s/%s_gamecube.db " , m_listCacheDir . c_str ( ) , DeviceName [ currentPartition ] ) ) ;
2012-11-04 20:22:02 +01:00
bool updateCache = m_cfg . getBool ( GC_DOMAIN , " update_cache " ) ;
2020-05-02 00:32:23 +02:00
bool preCachedList = fsop_FileExist ( cacheDir . c_str ( ) ) ;
2019-11-27 14:28:54 +01:00
m_cacheList . CreateList ( COVERFLOW_GAMECUBE , gameDir , stringToVector ( " .iso|.gcm|.ciso|root " , ' | ' ) , cacheDir , updateCache ) ;
2013-01-15 14:54:33 +01:00
m_cfg . remove ( GC_DOMAIN , " update_cache " ) ;
2016-06-20 23:03:40 +02:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
2019-12-15 23:02:10 +01:00
{
if ( tmp_itr - > settings [ 0 ] = = 1 ) /* disc 2 */
continue ; // skip gc disc 2 if its still part of the cached list
2016-06-20 23:03:40 +02:00
m_gameList . push_back ( * tmp_itr ) ;
2019-12-15 23:02:10 +01:00
}
2020-05-02 00:32:23 +02:00
if ( updateCache | | ( ! preCachedList & & fsop_FileExist ( cacheDir . c_str ( ) ) ) )
cacheCovers = true ;
2016-06-20 23:03:40 +02:00
return true ;
}
bool CMenu : : _loadChannelList ( void )
{
2016-12-01 01:05:39 +01:00
u8 chantypes = m_cfg . getUInt ( CHANNEL_DOMAIN , " channels_type " , CHANNELS_REAL ) ;
if ( chantypes < CHANNELS_REAL | | chantypes > CHANNELS_BOTH )
{
m_cfg . setUInt ( CHANNEL_DOMAIN , " channels_type " , CHANNELS_REAL ) ;
chantypes = CHANNELS_REAL ;
}
2022-06-15 00:54:29 +02:00
bool updateCache = m_cfg . getBool ( CHANNEL_DOMAIN , " update_cache " ) ;
m_cfg . remove ( CHANNEL_DOMAIN , " update_cache " ) ;
2016-06-20 23:03:40 +02:00
vector < string > NullVector ;
2016-12-01 01:05:39 +01:00
if ( chantypes & CHANNELS_REAL )
2016-06-20 23:03:40 +02:00
{
2018-12-24 14:42:31 +01:00
gprintf ( " Adding real nand list \n " ) ;
2016-06-20 23:03:40 +02:00
NANDemuView = false ;
2020-04-08 19:06:21 +02:00
if ( updateCache )
cacheCovers = true ; // real nand channels list is not cached but covers may still need to be updated
2019-11-27 14:28:54 +01:00
m_cacheList . CreateList ( COVERFLOW_CHANNEL , std : : string ( ) , NullVector , std : : string ( ) , false ) ;
2016-06-20 23:03:40 +02:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
m_gameList . push_back ( * tmp_itr ) ;
}
2016-12-01 01:05:39 +01:00
if ( chantypes & CHANNELS_EMU )
2016-06-20 23:03:40 +02:00
{
NANDemuView = true ;
2018-07-09 16:53:35 +02:00
int emuPartition = _FindEmuPart ( EMU_NAND , false ) ; // check if emunand folder exist and on FAT
2016-06-20 23:03:40 +02:00
if ( emuPartition > = 0 )
{
2018-12-24 14:42:31 +01:00
gprintf ( " Adding emu nand list \n " ) ;
2016-06-20 23:03:40 +02:00
currentPartition = emuPartition ;
string cacheDir = fmt ( " %s/%s_channels.db " , m_listCacheDir . c_str ( ) , DeviceName [ currentPartition ] ) ;
2020-05-02 00:32:23 +02:00
bool preCachedList = fsop_FileExist ( cacheDir . c_str ( ) ) ;
2019-11-27 14:28:54 +01:00
m_cacheList . CreateList ( COVERFLOW_CHANNEL , std : : string ( ) , NullVector , cacheDir , updateCache ) ;
2016-06-20 23:03:40 +02:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
m_gameList . push_back ( * tmp_itr ) ;
2020-05-02 00:32:23 +02:00
if ( updateCache | | ( ! preCachedList & & fsop_FileExist ( cacheDir . c_str ( ) ) ) )
cacheCovers = true ;
2016-06-20 23:03:40 +02:00
}
}
2013-01-15 14:54:33 +01:00
return true ;
2012-01-21 22:15:45 +01:00
}
2016-04-03 02:51:40 +02:00
bool CMenu : : _loadPluginList ( )
2012-04-08 17:54:34 +02:00
{
2012-11-04 20:22:02 +01:00
bool updateCache = m_cfg . getBool ( PLUGIN_DOMAIN , " update_cache " ) ;
2019-10-28 19:43:13 +01:00
int channels_type = min ( max ( 1 , m_cfg . getInt ( CHANNEL_DOMAIN , " channels_type " , CHANNELS_REAL ) ) , ( int ) ARRAY_SIZE ( CMenu : : _ChannelsType ) ) ;
2018-12-24 14:42:31 +01:00
gprintf ( " Adding plugins list \n " ) ;
-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
for ( u8 i = 0 ; m_plugin . PluginExist ( i ) ; + + i )
2012-04-10 01:19:08 +02:00
{
2020-07-17 22:23:42 +02:00
if ( ! m_plugin . GetEnabledStatus ( i ) )
-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
continue ;
int romsPartition = m_plugin . GetRomPartition ( i ) ;
if ( romsPartition < 0 )
romsPartition = m_cfg . getInt ( PLUGIN_DOMAIN , " partition " , 0 ) ;
currentPartition = romsPartition ;
if ( ! DeviceHandle . IsInserted ( currentPartition ) )
2012-04-10 01:19:08 +02:00
continue ;
2020-07-17 22:23:42 +02:00
strncpy ( m_plugin . PluginMagicWord , fmt ( " %08x " , m_plugin . GetPluginMagic ( i ) ) , 8 ) ;
-updating wiiflow lite to beta 4.3.0
-fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever.
-fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc)
-fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back.
-favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized.
-only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1.
-now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time.
-fixed scrolling for game_info synopsis, credits, and help text.
-made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better.
-display music info now defaults to off
-screensaver_disabled now defaults to yes
-show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work.
-removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show.
-dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels.
-sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view.
-now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins)
-removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it.
-now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game.
-removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'.
-made the speed at which cover titles fade in/out almost instantly.
-removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now.
-removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me.
-disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted.
-removed Btn B and - combo to switch partitions. didn't seem useful anymore.
-redid nand emulation settings menu. looks like this now:
pg1
Select EmuNAND
EmuNAND Enulation
Select SaveNAND
SaveNAND Emulation
pg2
Extract Saves All
Missing
Extract NAND
Select Saves Partition
-no longer blocking Select Plugin menu and View icons when using source menu combined view
-now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first
-now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
const char * romDir = m_plugin . GetRomDir ( i ) ;
2021-09-15 18:45:06 +02:00
if ( strstr ( romDir , " scummvm.ini " ) = = NULL )
2012-04-10 01:19:08 +02:00
{
2019-02-08 01:34:30 +01:00
if ( strncasecmp ( m_plugin . PluginMagicWord , " 484252 " , 6 ) = = 0 ) //HBRW
2018-05-01 00:31:29 +02:00
{
2019-02-08 01:34:30 +01:00
if ( updateCache )
m_cfg . setBool ( HOMEBREW_DOMAIN , " update_cache " , true ) ;
_loadHomebrewList ( romDir ) ;
2018-05-01 00:31:29 +02:00
}
2019-02-08 01:34:30 +01:00
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 4E47434D " , 8 ) = = 0 ) //NGCM
2016-05-19 01:15:19 +02:00
{
2019-02-08 01:34:30 +01:00
if ( updateCache )
m_cfg . setBool ( GC_DOMAIN , " update_cache " , true ) ;
_loadGamecubeList ( ) ;
2016-05-19 01:15:19 +02:00
}
2019-02-08 01:34:30 +01:00
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 4E574949 " , 8 ) = = 0 ) //NWII
2016-05-19 01:15:19 +02:00
{
2019-02-08 01:34:30 +01:00
if ( updateCache )
m_cfg . setBool ( WII_DOMAIN , " update_cache " , true ) ;
_loadWiiList ( ) ;
2016-05-19 01:15:19 +02:00
}
2019-02-08 01:34:30 +01:00
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 4E414E44 " , 8 ) = = 0 ) //NAND
2016-05-19 01:15:19 +02:00
{
2019-02-08 01:34:30 +01:00
if ( updateCache )
m_cfg . setBool ( CHANNEL_DOMAIN , " update_cache " , true ) ;
m_cfg . setInt ( CHANNEL_DOMAIN , " channels_type " , CHANNELS_REAL ) ;
_loadChannelList ( ) ;
2016-05-19 01:15:19 +02:00
}
2019-02-08 01:34:30 +01:00
else if ( strncasecmp ( m_plugin . PluginMagicWord , " 454E414E " , 8 ) = = 0 ) //ENAN
2016-06-20 23:03:40 +02:00
{
2019-02-08 01:34:30 +01:00
if ( updateCache )
m_cfg . setBool ( CHANNEL_DOMAIN , " update_cache " , true ) ;
m_cfg . setInt ( CHANNEL_DOMAIN , " channels_type " , CHANNELS_EMU ) ;
_loadChannelList ( ) ;
}
else
{
2019-09-11 22:57:16 +02:00
string romsDir ( fmt ( " %s:/%s " , DeviceName [ currentPartition ] , romDir ) ) ;
string cachedListFile ( fmt ( " %s/%s_%s.db " , m_listCacheDir . c_str ( ) , DeviceName [ currentPartition ] , m_plugin . PluginMagicWord ) ) ;
2020-05-02 00:32:23 +02:00
bool preCachedList = fsop_FileExist ( cachedListFile . c_str ( ) ) ;
2019-02-08 01:34:30 +01:00
vector < string > FileTypes = stringToVector ( m_plugin . GetFileTypes ( i ) , ' | ' ) ;
m_cacheList . Color = m_plugin . GetCaseColor ( i ) ;
2020-07-20 15:07:41 +02:00
m_cacheList . Magic = m_plugin . GetPluginMagic ( i ) ;
2019-11-27 14:28:54 +01:00
m_cacheList . usePluginDBTitles = m_cfg . getBool ( PLUGIN_DOMAIN , " database_titles " , true ) ;
2019-09-11 22:57:16 +02:00
m_cacheList . CreateRomList ( m_platform , romsDir , FileTypes , cachedListFile , updateCache ) ;
2019-02-08 01:34:30 +01:00
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
m_gameList . push_back ( * tmp_itr ) ;
2020-05-02 00:32:23 +02:00
if ( updateCache | | ( ! preCachedList & & fsop_FileExist ( cachedListFile . c_str ( ) ) ) )
cacheCovers = true ;
2016-06-20 23:03:40 +02:00
}
2016-04-03 02:51:40 +02:00
}
else
{
2020-02-02 21:25:05 +01:00
string cachedListFile ( fmt ( " %s/%s_%s.db " , m_listCacheDir . c_str ( ) , DeviceName [ currentPartition ] , m_plugin . PluginMagicWord ) ) ;
2020-05-02 00:32:23 +02:00
bool preCachedList = fsop_FileExist ( cachedListFile . c_str ( ) ) ;
2019-09-11 22:57:16 +02:00
Config scummvm ;
2021-09-01 22:51:09 +02:00
if ( strchr ( romDir , ' : ' ) = = NULL | | ! fsop_FileExist ( romDir ) )
scummvm . load ( fmt ( " %s/%s " , m_pluginsDir . c_str ( ) , romDir ) ) ;
else
scummvm . load ( romDir ) ;
// should add error msg if loading scummvm fails or is not found
2019-09-11 22:57:16 +02:00
string platformName = " " ;
if ( m_platform . loaded ( ) ) /* convert plugin magic to platform name */
platformName = m_platform . getString ( " PLUGINS " , m_plugin . PluginMagicWord ) ;
2020-02-02 21:25:05 +01:00
m_cacheList . Color = m_plugin . GetCaseColor ( i ) ;
2020-07-20 15:07:41 +02:00
m_cacheList . Magic = m_plugin . GetPluginMagic ( i ) ;
2020-02-02 21:25:05 +01:00
m_cacheList . ParseScummvmINI ( scummvm , DeviceName [ currentPartition ] , m_pluginDataDir . c_str ( ) , platformName . c_str ( ) , cachedListFile , updateCache ) ;
for ( vector < dir_discHdr > : : iterator tmp_itr = m_cacheList . begin ( ) ; tmp_itr ! = m_cacheList . end ( ) ; tmp_itr + + )
2016-06-20 23:03:40 +02:00
m_gameList . push_back ( * tmp_itr ) ;
2020-05-02 00:32:23 +02:00
if ( updateCache | | ( ! preCachedList & & fsop_FileExist ( cachedListFile . c_str ( ) ) ) )
cacheCovers = true ;
2019-04-08 20:13:34 +02:00
scummvm . unload ( ) ;
2012-04-10 01:19:08 +02:00
}
}
2013-01-15 14:54:33 +01:00
m_cfg . remove ( PLUGIN_DOMAIN , " update_cache " ) ;
2019-02-08 01:34:30 +01:00
m_cfg . setInt ( CHANNEL_DOMAIN , " channels_type " , channels_type ) ;
2013-01-15 14:54:33 +01:00
return true ;
2012-04-08 17:54:34 +02:00
}
2012-01-21 21:57:41 +01:00
void CMenu : : _stopSounds ( void )
{
// Fade out sounds
2022-01-14 22:10:56 +01:00
int fade_rate = 20 ;
2012-01-21 21:57:41 +01:00
2012-09-22 15:47:52 +02:00
if ( ! MusicPlayer . IsStopped ( ) )
2012-01-21 21:57:41 +01:00
{
2012-09-22 15:47:52 +02:00
while ( MusicPlayer . GetVolume ( ) > 0 | | m_gameSound . GetVolume ( ) > 0 )
2012-01-21 21:57:41 +01:00
{
2012-09-22 15:47:52 +02:00
MusicPlayer . Tick ( true ) ;
2012-08-16 00:33:54 +02:00
if ( m_gameSound . GetVolume ( ) > 0 )
m_gameSound . SetVolume ( m_gameSound . GetVolume ( ) < fade_rate ? 0 : m_gameSound . GetVolume ( ) - fade_rate ) ;
2012-06-14 17:27:57 +02:00
VIDEO_WaitVSync ( ) ;
2012-01-21 21:57:41 +01:00
}
}
m_btnMgr . stopSounds ( ) ;
2012-11-11 19:28:03 +01:00
CoverFlow . stopSound ( ) ;
2012-08-16 00:33:54 +02:00
m_gameSound . Stop ( ) ;
2012-01-21 21:57:41 +01:00
}
2020-05-02 00:32:23 +02:00
/* wiiflow creates a map<u8, u8> _installed_cios list for slots 200 to 253 and slot 0
the first u8 is the slot and the second u8 is the base if its a d2x cios otherwise the slot number again .
slot 0 is set to 1 - first = 0 and second = 1
game config only shows the first ( slot ) or auto if first = 0 */
2012-01-21 21:57:41 +01:00
void CMenu : : _load_installed_cioses ( )
{
2018-08-01 14:27:12 +02:00
if ( isWiiVC )
return ;
2012-01-21 21:57:41 +01:00
gprintf ( " Loading cIOS map \n " ) ;
_installed_cios [ 0 ] = 1 ;
2012-07-20 14:30:18 +02:00
for ( u8 slot = 200 ; slot < 254 ; slot + + )
2012-07-16 16:05:57 +02:00
{
2012-07-20 14:30:18 +02:00
u8 base = 1 ;
2012-08-11 14:27:38 +02:00
if ( IOS_D2X ( slot , & base ) )
2012-01-21 21:57:41 +01:00
{
2012-07-20 14:30:18 +02:00
gprintf ( " Found d2x base %u in slot %u \n " , base , slot ) ;
_installed_cios [ slot ] = base ;
}
2012-08-24 00:29:15 +02:00
else if ( CustomIOS ( IOS_GetType ( slot ) ) )
2012-07-20 14:30:18 +02:00
{
gprintf ( " Found cIOS in slot %u \n " , slot ) ;
2012-07-20 22:12:25 +02:00
_installed_cios [ slot ] = slot ;
2012-01-21 21:57:41 +01:00
}
2012-05-13 17:13:33 +02:00
}
2012-01-21 21:57:41 +01:00
}
2012-01-30 15:29:40 +01:00
void CMenu : : _hideWaitMessage ( )
2012-01-21 21:57:41 +01:00
{
2012-01-30 15:29:40 +01:00
m_vid . hideWaitMessage ( ) ;
2012-01-21 21:57:41 +01:00
}
void CMenu : : _showWaitMessage ( )
{
2018-06-06 23:56:21 +02:00
m_vid . waitMessage ( 0.15f ) ;
2012-01-21 21:57:41 +01:00
}
typedef struct map_entry
{
char filename [ 8 ] ;
u8 sha1 [ 20 ] ;
2013-01-01 18:42:46 +01:00
} ATTRIBUTE_PACKED map_entry_t ;
2012-01-21 21:57:41 +01:00
2016-11-07 16:06:00 +01:00
void CMenu : : _loadDefaultFont ( void )
2012-01-21 21:57:41 +01:00
{
2012-11-12 21:12:00 +01:00
if ( m_base_font ! = NULL )
return ;
u32 size = 0 ;
2012-01-21 21:57:41 +01:00
bool retry = false ;
2012-11-12 21:12:00 +01:00
bool korean = ( CONF_GetLanguage ( ) = = CONF_LANG_KOREAN ) ;
char ISFS_Filename [ 32 ] ATTRIBUTE_ALIGN ( 32 ) ;
2012-05-13 17:13:33 +02:00
2012-01-21 21:57:41 +01:00
// Read content.map from ISFS
2012-11-12 21:12:00 +01:00
strcpy ( ISFS_Filename , " /shared1/content.map " ) ;
u8 * content = ISFS_GetFile ( ISFS_Filename , & size , - 1 ) ;
2012-05-13 19:25:26 +02:00
if ( content = = NULL )
return ;
2012-11-12 21:12:00 +01:00
u32 items = size / sizeof ( map_entry_t ) ;
2012-01-21 21:57:41 +01:00
//gprintf("Open content.map, size %d, items %d\n", size, items);
2012-11-12 21:12:00 +01:00
map_entry_t * cm = ( map_entry_t * ) content ;
2012-01-21 21:57:41 +01:00
2012-11-12 21:12:00 +01:00
retry :
2012-01-21 21:57:41 +01:00
bool kor_font = ( korean & & ! retry ) | | ( ! korean & & retry ) ;
2012-11-12 21:12:00 +01:00
for ( u32 i = 0 ; i < items ; i + + )
2012-01-21 21:57:41 +01:00
{
2012-11-12 21:12:00 +01:00
if ( m_base_font ! = NULL & & m_wbf1_font ! = NULL & & m_wbf2_font ! = NULL )
break ;
if ( memcmp ( cm [ i ] . sha1 , kor_font ? WIIFONT_HASH_KOR : WIIFONT_HASH , 20 ) = = 0 & & m_base_font = = NULL )
2012-01-21 21:57:41 +01:00
{
2012-11-12 21:12:00 +01:00
sprintf ( ISFS_Filename , " /shared1/%.8s.app " , cm [ i ] . filename ) ; //who cares about the few ticks more?
u8 * u8_font_archive = ISFS_GetFile ( ISFS_Filename , & size , - 1 ) ;
2012-07-03 18:26:49 +02:00
if ( u8_font_archive ! = NULL )
2012-01-21 21:57:41 +01:00
{
const u8 * font_file = u8_get_file_by_index ( u8_font_archive , 1 , & size ) ; // There is only one file in that app
//gprintf("Extracted font: %d\n", size);
2012-09-20 14:40:47 +02:00
m_base_font = ( u8 * ) MEM1_lo_alloc ( size ) ;
2012-09-07 20:13:04 +02:00
memcpy ( m_base_font , font_file , size ) ;
DCFlushRange ( m_base_font , size ) ;
m_base_font_size = size ;
2020-06-26 01:11:58 +02:00
MEM2_free ( u8_font_archive ) ;
2012-01-21 21:57:41 +01:00
}
}
2012-11-12 21:12:00 +01:00
else if ( memcmp ( cm [ i ] . sha1 , WFB_HASH , 20 ) = = 0 & & m_wbf1_font = = NULL & & m_wbf2_font = = NULL )
2012-07-03 18:26:49 +02:00
{
2012-11-12 21:12:00 +01:00
sprintf ( ISFS_Filename , " /shared1/%.8s.app " , cm [ i ] . filename ) ; //who cares about the few ticks more?
u8 * u8_font_archive = ISFS_GetFile ( ISFS_Filename , & size , - 1 ) ;
2012-07-03 18:26:49 +02:00
if ( u8_font_archive ! = NULL )
{
const u8 * font_file1 = u8_get_file ( u8_font_archive , " wbf1.brfna " , & size ) ;
2012-09-07 20:13:04 +02:00
m_wbf1_font = ( u8 * ) MEM1_lo_alloc ( size ) ;
memcpy ( m_wbf1_font , font_file1 , size ) ;
DCFlushRange ( m_wbf1_font , size ) ;
2012-07-03 18:26:49 +02:00
const u8 * font_file2 = u8_get_file ( u8_font_archive , " wbf2.brfna " , & size ) ;
2012-09-07 20:13:04 +02:00
m_wbf2_font = ( u8 * ) MEM1_lo_alloc ( size ) ;
memcpy ( m_wbf2_font , font_file2 , size ) ;
DCFlushRange ( m_wbf2_font , size ) ;
2012-07-03 18:26:49 +02:00
2020-06-26 01:11:58 +02:00
MEM2_free ( u8_font_archive ) ;
2012-07-03 18:26:49 +02:00
}
}
2012-01-21 21:57:41 +01:00
}
2012-11-12 21:12:00 +01:00
if ( ! retry & & m_base_font = = NULL )
2012-01-21 21:57:41 +01:00
{
retry = true ;
goto retry ;
}
2020-06-26 01:11:58 +02:00
MEM2_free ( content ) ;
2012-01-21 21:57:41 +01:00
}
void CMenu : : _cleanupDefaultFont ( )
{
2012-09-07 20:13:04 +02:00
MEM1_lo_free ( m_base_font ) ;
2012-11-12 21:12:00 +01:00
m_base_font = NULL ;
2012-01-21 21:57:41 +01:00
m_base_font_size = 0 ;
2012-09-07 20:13:04 +02:00
MEM1_lo_free ( m_wbf1_font ) ;
2012-11-12 21:12:00 +01:00
m_wbf1_font = NULL ;
2012-09-07 20:13:04 +02:00
MEM1_lo_free ( m_wbf2_font ) ;
2012-11-12 21:12:00 +01:00
m_wbf2_font = NULL ;
2012-01-21 21:57:41 +01:00
}
const char * CMenu : : _domainFromView ( )
{
2013-09-12 15:04:50 +02:00
if ( m_sourceflow )
2016-11-07 16:06:00 +01:00
return SOURCEFLOW_DOMAIN ;
2016-12-01 01:05:39 +01:00
if ( m_source_cnt > 1 )
return " MULTI " ;
2012-01-21 21:57:41 +01:00
switch ( m_current_view )
{
case COVERFLOW_CHANNEL :
2012-11-04 20:22:02 +01:00
return CHANNEL_DOMAIN ;
2012-01-21 21:57:41 +01:00
case COVERFLOW_HOMEBREW :
2012-11-04 20:22:02 +01:00
return HOMEBREW_DOMAIN ;
2016-04-02 18:00:47 +02:00
case COVERFLOW_GAMECUBE :
2012-11-04 20:22:02 +01:00
return GC_DOMAIN ;
2012-10-03 23:34:37 +02:00
case COVERFLOW_PLUGIN :
2012-11-04 20:22:02 +01:00
return PLUGIN_DOMAIN ;
2012-01-21 21:57:41 +01:00
default :
2012-11-04 20:22:02 +01:00
return WII_DOMAIN ;
2012-01-21 21:57:41 +01:00
}
return " NULL " ;
}
2012-11-01 17:39:42 +01:00
void CMenu : : RemoveCover ( const char * id )
2012-02-05 01:07:07 +01:00
{
2012-11-01 17:39:42 +01:00
const char * CoverPath = NULL ;
if ( id = = NULL )
return ;
CoverPath = fmt ( " %s/%s.png " , m_boxPicDir . c_str ( ) , id ) ;
fsop_deleteFile ( CoverPath ) ;
CoverPath = fmt ( " %s/%s.png " , m_picDir . c_str ( ) , id ) ;
fsop_deleteFile ( CoverPath ) ;
2012-12-27 21:22:40 +01:00
CoverPath = fmt ( " %s/%s.wfc " , m_cacheDir . c_str ( ) , id ) ;
2012-11-01 17:39:42 +01:00
fsop_deleteFile ( CoverPath ) ;
2012-04-26 20:43:05 +02:00
}
2012-09-05 17:52:32 +02:00
2019-05-27 18:04:46 +02:00
/* if wiiflow using IOS58 this switches to cIOS for certain functions and back to IOS58 when done. */
/* if wiiflow using cIOS no need to temp switch */
2012-11-12 21:12:00 +01:00
void CMenu : : TempLoadIOS ( int IOS )
2012-09-05 17:52:32 +02:00
{
/* Only temp reload in IOS58 mode */
2018-07-16 00:12:56 +02:00
if ( useMainIOS )
2012-09-05 17:52:32 +02:00
return ;
if ( IOS = = IOS_TYPE_NORMAL_IOS )
IOS = 58 ;
else if ( IOS = = 0 )
IOS = mainIOS ;
if ( CurrentIOS . Version ! = IOS )
{
2019-05-27 18:04:46 +02:00
loadIOS ( IOS , true ) ; // switch to new IOS
2012-12-27 21:22:40 +01:00
Sys_Init ( ) ;
2012-09-05 17:52:32 +02:00
Open_Inputs ( ) ;
2018-08-01 14:27:12 +02:00
for ( int chan = WPAD_MAX_WIIMOTES - 1 ; chan > = 0 ; chan - - )
2012-09-05 17:52:32 +02:00
WPAD_SetVRes ( chan , m_vid . width ( ) + m_cursor [ chan ] . width ( ) , m_vid . height ( ) + m_cursor [ chan ] . height ( ) ) ;
2020-08-24 01:09:13 +02:00
if ( has_enabled_providers ( ) | | m_use_wifi_gecko )
_initAsyncNetwork ( ) ;
2012-09-05 17:52:32 +02:00
}
}
2013-03-28 14:02:50 +01:00
2019-04-08 18:10:30 +02:00
static char blankCoverPath [ MAX_FAT_PATH ] ;
2013-03-28 14:02:50 +01:00
const char * CMenu : : getBlankCoverPath ( const dir_discHdr * element )
{
2019-04-08 18:10:30 +02:00
string blankCoverTitle = " wii " ;
if ( m_platform . loaded ( ) )
2013-03-28 14:02:50 +01:00
{
2019-04-08 18:10:30 +02:00
switch ( element - > type )
{
case TYPE_CHANNEL :
strncpy ( m_plugin . PluginMagicWord , " 4E414E44 " , 9 ) ;
break ;
case TYPE_EMUCHANNEL :
strncpy ( m_plugin . PluginMagicWord , " 454E414E " , 9 ) ;
break ;
case TYPE_HOMEBREW :
strncpy ( m_plugin . PluginMagicWord , " 48425257 " , 9 ) ;
break ;
case TYPE_GC_GAME :
strncpy ( m_plugin . PluginMagicWord , " 4E47434D " , 9 ) ;
break ;
case TYPE_PLUGIN :
strncpy ( m_plugin . PluginMagicWord , fmt ( " %08x " , element - > settings [ 0 ] ) , 8 ) ;
break ;
default : // wii
strncpy ( m_plugin . PluginMagicWord , " 4E574949 " , 9 ) ;
}
blankCoverTitle = m_platform . getString ( " PLUGINS " , m_plugin . PluginMagicWord , " wii " ) ;
}
2020-04-12 20:35:57 +02:00
snprintf ( blankCoverPath , sizeof ( blankCoverPath ) , " %s/blank_covers/%s.png " , m_boxPicDir . c_str ( ) , blankCoverTitle . c_str ( ) ) ;
2019-04-08 18:10:30 +02:00
if ( ! fsop_FileExist ( blankCoverPath ) )
2020-04-12 20:35:57 +02:00
snprintf ( blankCoverPath , sizeof ( blankCoverPath ) , " %s/blank_covers/%s.jpg " , m_boxPicDir . c_str ( ) , blankCoverTitle . c_str ( ) ) ;
2019-04-08 18:10:30 +02:00
return blankCoverPath ;
2013-03-28 14:02:50 +01:00
}
const char * CMenu : : getBoxPath ( const dir_discHdr * element )
{
if ( element - > type = = TYPE_PLUGIN )
{
2022-01-14 22:10:56 +01:00
const char * filename = fmt ( " %s " , element - > path ) ;
if ( strchr ( filename , ' / ' ) ! = NULL )
{
filename = fmt ( " %s " , strrchr ( element - > path , ' / ' ) + 1 ) ;
}
2013-03-28 14:02:50 +01:00
const char * coverFolder = m_plugin . GetCoverFolderName ( element - > settings [ 0 ] ) ;
2022-01-14 22:10:56 +01:00
return fmt ( " %s/%s/%s.png " , m_boxPicDir . c_str ( ) , coverFolder , filename ) ;
2013-03-28 14:02:50 +01:00
}
2020-09-01 01:23:52 +02:00
else if ( element - > type = = TYPE_HOMEBREW ) // use folder name for the png name
2019-03-27 17:45:43 +01:00
return fmt ( " %s/homebrew/%s.png " , m_boxPicDir . c_str ( ) , strrchr ( element - > path , ' / ' ) + 1 ) ;
2016-04-04 22:18:16 +02:00
else if ( element - > type = = TYPE_SOURCE ) //sourceflow
2013-09-12 15:04:50 +02:00
{
2013-09-13 17:38:23 +02:00
const char * coverImg = strrchr ( element - > path , ' / ' ) + 1 ;
2016-12-14 19:47:13 +01:00
if ( coverImg = = NULL )
2013-09-12 15:04:50 +02:00
return NULL ;
2016-12-14 19:47:13 +01:00
return fmt ( " %s/full_covers/%s " , m_sourceDir . c_str ( ) , coverImg ) ;
2013-09-12 15:04:50 +02:00
}
2013-03-28 14:02:50 +01:00
return fmt ( " %s/%s.png " , m_boxPicDir . c_str ( ) , element - > id ) ;
}
const char * CMenu : : getFrontPath ( const dir_discHdr * element )
{
if ( element - > type = = TYPE_PLUGIN )
{
const char * tempname = element - > path ;
if ( strchr ( element - > path , ' / ' ) ! = NULL )
tempname = strrchr ( element - > path , ' / ' ) + 1 ;
const char * coverFolder = m_plugin . GetCoverFolderName ( element - > settings [ 0 ] ) ;
if ( strlen ( coverFolder ) > 0 )
return fmt ( " %s/%s/%s.png " , m_picDir . c_str ( ) , coverFolder , tempname ) ;
else
return fmt ( " %s/%s.png " , m_picDir . c_str ( ) , tempname ) ;
}
else if ( element - > type = = TYPE_HOMEBREW )
2019-03-27 17:45:43 +01:00
{
if ( m_cfg . getBool ( HOMEBREW_DOMAIN , " smallbox " ) )
2020-09-01 01:23:52 +02:00
{
const char * coverPath = fmt ( " %s/homebrew_small/%s.png " , m_picDir . c_str ( ) , strrchr ( element - > path , ' / ' ) + 1 ) ;
if ( ! fsop_FileExist ( coverPath ) )
return fmt ( " %s/icon.png " , element - > path ) ;
else
return coverPath ;
}
2019-03-27 17:45:43 +01:00
else
return fmt ( " %s/homebrew/%s.png " , m_picDir . c_str ( ) , strrchr ( element - > path , ' / ' ) + 1 ) ;
}
2016-04-04 22:18:16 +02:00
else if ( element - > type = = TYPE_SOURCE ) //sourceflow
2013-09-12 15:04:50 +02:00
{
2013-09-13 17:38:23 +02:00
const char * coverImg = strrchr ( element - > path , ' / ' ) + 1 ;
if ( coverImg = = NULL )
return NULL ;
2016-12-14 19:47:13 +01:00
const char * coverPath = fmt ( " %s/front_covers/%s " , m_sourceDir . c_str ( ) , coverImg ) ;
2016-11-07 16:06:00 +01:00
if ( m_cfg . getBool ( SOURCEFLOW_DOMAIN , " smallbox " ) | | ! fsop_FileExist ( coverPath ) )
2013-09-12 15:04:50 +02:00
{
2018-11-23 22:31:04 +01:00
string themeName = m_cfg . getString ( " GENERAL " , " theme " , " default " ) ;
coverPath = fmt ( " %s/small_covers/%s/%s " , m_sourceDir . c_str ( ) , themeName . c_str ( ) , coverImg ) ;
2013-09-13 17:38:23 +02:00
if ( ! fsop_FileExist ( coverPath ) )
2018-11-23 22:31:04 +01:00
{
coverPath = fmt ( " %s/small_covers/%s " , m_sourceDir . c_str ( ) , coverImg ) ;
if ( ! fsop_FileExist ( coverPath ) )
return element - > path ;
}
2013-09-12 15:04:50 +02:00
}
2013-09-13 17:38:23 +02:00
return coverPath ;
2013-09-12 15:04:50 +02:00
}
2013-03-28 14:02:50 +01:00
return fmt ( " %s/%s.png " , m_picDir . c_str ( ) , element - > id ) ;
}