mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 09:05:06 +01:00
afdd19e591
r417 -> r417mod -Added very basic DML support (many thanks to the postloader code) -Re-added IOS reload -Added cIOS base 60, 70 and 80 as compatible ones for d2x v8+ r417mod -> r417mod2 -Fixed NTSC video mode r417mod2 -> r417mod3 -Fixed black wii game covers if no WiiTDB file exist, forcing to white now -Set default gamecube game cover to black -Added DML icon -Compressed all PNG files to save space -May fixed codedump if IOS58 games started from DVD (thanks entropy) -Allowing access to the homebrew screen while parental controls are enabled (thanks entropy) -Disable cover downloads while parental controls are enabled (thanks entropy) r417mod3 -> r417mod4 -fixed DML audio streaming if NAND emulator was enabled before -removed DVD boot from DML launch, makes boot process way faster (still needs a disc inserted) -Added base IOS58 to DVD launch list, may really fixes IOS58 games from DVD :P r417mod4 -> r417mod5 -added yellow covers for "Mario & Sonic at the London 2012 Olympic Games" PAL and NTSC-U -fixed black covers for "Pandora’s Tower: Until I Return to Your Side" and "Ikenie no Yoru" NTSC-J -removed some options in DML coverflow because they doesnt work -fixed global options in DML coverflow -fixed gametdb titles and synopsis (see http://gbatemp.net/topic/204106-wiiflow-an-open-source-gui-usb-loader/page__st__4515__p__3950858#entry3950858) -moved IOS selection to new page 4
75 lines
2.1 KiB
C++
75 lines
2.1 KiB
C++
#ifndef CACHEDLIST
|
|
#define CACHEDLIST
|
|
|
|
#include "list.hpp"
|
|
#include "cache.hpp"
|
|
#include "safe_vector.hpp"
|
|
#include "gecko.h"
|
|
|
|
using namespace std;
|
|
|
|
enum {
|
|
COVERFLOW_USB,
|
|
COVERFLOW_CHANNEL,
|
|
COVERFLOW_HOMEBREW,
|
|
COVERFLOW_DML,
|
|
COVERFLOW_MAX
|
|
};
|
|
|
|
template <typename T = dir_discHdr>
|
|
class CachedList : public safe_vector<T>
|
|
{
|
|
public:
|
|
void Init(string cachedir, string settingsDir, string curLanguage) /* Initialize Private Variables */
|
|
{
|
|
m_cacheDir = cachedir;
|
|
m_settingsDir = settingsDir;
|
|
m_curLanguage = m_lastLanguage = curLanguage;
|
|
m_channelLang = m_lastchannelLang = curLanguage;
|
|
m_loaded = false;
|
|
m_database = "";
|
|
m_update = false;
|
|
for(u32 i = 0; i < COVERFLOW_MAX; i++)
|
|
force_update[i] = false;
|
|
}
|
|
|
|
void Update(u32 view = COVERFLOW_MAX) /* Force db update on next load */
|
|
{
|
|
if(view == COVERFLOW_MAX)
|
|
for(u32 i = 0; i < COVERFLOW_MAX; i++)
|
|
force_update[i] = true;
|
|
else
|
|
force_update[view] = true;
|
|
}
|
|
|
|
void Load(string path, string containing);
|
|
void LoadChannels(string path, u32 channelType);
|
|
|
|
void Unload(){if(m_loaded) {this->clear(); m_loaded = false; m_database = "";}};
|
|
void Save() {if(m_loaded) CCache<T>(*this, m_database, SAVE);} /* Save All */
|
|
|
|
void Get(T tmp, u32 index) {if(m_loaded) CCache<T>(tmp, m_database, index, LOAD);} /* Load One */
|
|
void Set(T tmp, u32 index) {if(m_loaded) CCache<T>(tmp, m_database, index, SAVE);} /* Save One */
|
|
|
|
void Add(T tmp) {if(m_loaded) CCache<T>(*this, m_database, tmp, ADD);} /* Add One */
|
|
void Remove(u32 index) {if(m_loaded) CCache<T>(*this, m_database, index, REMOVE);} /* Remove One */
|
|
|
|
void SetLanguage(string curLanguage) { m_curLanguage = m_channelLang = curLanguage; }
|
|
private:
|
|
string make_db_name(string path);
|
|
|
|
bool m_loaded;
|
|
bool m_update;
|
|
bool m_wbfsFS;
|
|
u8 force_update[COVERFLOW_MAX];
|
|
CList<T> list;
|
|
string m_database;
|
|
string m_cacheDir;
|
|
string m_settingsDir;
|
|
string m_curLanguage;
|
|
string m_lastLanguage;
|
|
string m_channelLang;
|
|
string m_lastchannelLang;
|
|
};
|
|
|
|
#endif |