diff --git a/out/boot.dol b/out/boot.dol index 43231c65..16b7d312 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/menu/menu_source.cpp b/source/menu/menu_source.cpp index d799fa2b..f545c6b4 100644 --- a/source/menu/menu_source.cpp +++ b/source/menu/menu_source.cpp @@ -75,10 +75,10 @@ void CMenu::_sourceFlow() { m_current_view = COVERFLOW_PLUGIN; for(k = 0; k < m_numPlugins; ++k) - m_plugin.SetEnablePlugin(m_cfg, k, 1); /* force disable */ + m_plugin.SetEnablePlugin(m_cfg, k, 1); // force disable all for(vector::iterator itr = magicNums.begin(); itr != magicNums.end(); itr++) { - s8 exist = m_plugin.GetPluginPosition(strtoul(itr->c_str(), NULL, 16)); + s16 exist = m_plugin.GetPluginPosition(strtoul(itr->c_str(), NULL, 16)); if(exist >= 0) m_plugin.SetEnablePlugin(m_cfg, exist, 2); } @@ -435,7 +435,7 @@ bool CMenu::_Source() { for(vector::iterator itr = magicNums.begin(); itr != magicNums.end(); itr++) { - s8 exist = m_plugin.GetPluginPosition(strtoul(itr->c_str(), NULL, 16));// make sure magic# is valid + s16 exist = m_plugin.GetPluginPosition(strtoul(itr->c_str(), NULL, 16));// make sure magic# is valid if(exist >= 0) m_plugin.SetEnablePlugin(m_cfg, exist, 2); } diff --git a/source/plugin/plugin.cpp b/source/plugin/plugin.cpp index eb6b55e7..a4da35bb 100644 --- a/source/plugin/plugin.cpp +++ b/source/plugin/plugin.cpp @@ -96,12 +96,12 @@ bool Plugin::AddPlugin(Config &plugin) return false; } -s8 Plugin::GetPluginPosition(u32 magic) +s16 Plugin::GetPluginPosition(u32 magic) { for(u8 pos = 0; pos < Plugins.size(); pos++) { if(magic == Plugins[pos].magic) - return pos; + return (s16)pos; } return -1; } @@ -153,7 +153,7 @@ const char *Plugin::GetRomDir(u8 pos) return Plugins[pos].romDir.c_str(); } -const string& Plugin::GetFileTypes(u8 pos) +const string& Plugin::GetFileTypes(s16 pos) { return Plugins[pos].fileTypes; } @@ -466,7 +466,7 @@ string Plugin::GetRomId(char *romPath, u32 Magic, Config &m_crc, const char *dat } else if(!strcasecmp(platform, "ATARIST")) { - s8 pos = m_plugin.GetPluginPosition(Magic); + s16 pos = m_plugin.GetPluginPosition(Magic); string FileTypes = m_plugin.GetFileTypes(pos); string path; @@ -507,7 +507,7 @@ string Plugin::GetRomId(char *romPath, u32 Magic, Config &m_crc, const char *dat } else if(!strcasecmp(platform, "DOS")) { - s8 pos = m_plugin.GetPluginPosition(Magic); + s16 pos = m_plugin.GetPluginPosition(Magic); string FileTypes = m_plugin.GetFileTypes(pos); if(strcasestr(FileTypes.c_str(), ".conf")) diff --git a/source/plugin/plugin.hpp b/source/plugin/plugin.hpp index 17b39570..7e59c2dd 100644 --- a/source/plugin/plugin.hpp +++ b/source/plugin/plugin.hpp @@ -68,10 +68,10 @@ public: string GetRomName(const char *FullPath); string GetRomId(char *romPath, u32 Magic, Config &m_crc, const char *datadir, const char *platform, const char *name); int GetRomPartition(u8 pos); - const string& GetFileTypes(u8 pos); + const string& GetFileTypes(s16 pos); wstringEx GetPluginName(u8 pos); u32 getPluginMagic(u8 pos); - s8 GetPluginPosition(u32 magic); + s16 GetPluginPosition(u32 magic); s8 GetBoxMode(u8 pos); void init(const string& m_pluginsDir); @@ -91,7 +91,7 @@ public: private: vector Plugins; vector enabledPlugins; - s8 Plugin_Pos; + s16 Plugin_Pos; string pluginsDir; bool adding; };