commit
1c41acaddd
|
@ -1,8 +1,8 @@
|
|||
[General]
|
||||
GCMPathes = 0
|
||||
ISOPaths = 0
|
||||
LastFilename =
|
||||
ShowLag = False
|
||||
RecursiveGCMPaths = False
|
||||
RecursiveISOPaths = False
|
||||
NANDRoot = //sdcard/dolphin-emu/Wii
|
||||
WirelessMac =
|
||||
[Core]
|
||||
|
@ -14,7 +14,7 @@ Fastmem = False
|
|||
DSPThread = False
|
||||
DSPHLE = True
|
||||
SkipIdle = True
|
||||
DefaultGCM =
|
||||
DefaultISO =
|
||||
DVDRoot =
|
||||
Apploader =
|
||||
EnableCheats = False
|
||||
|
|
|
@ -133,7 +133,7 @@ public final class FolderBrowser extends ListFragment
|
|||
|
||||
private void FolderSelected()
|
||||
{
|
||||
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
||||
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "ISOPaths", "0");
|
||||
int intDirectories = Integer.parseInt(Directories);
|
||||
|
||||
// Check to see if a path set in the Dolphin config
|
||||
|
@ -142,9 +142,9 @@ public final class FolderBrowser extends ListFragment
|
|||
boolean pathNotPresent = true;
|
||||
for (int i = 0; i < intDirectories; i++)
|
||||
{
|
||||
String gcmPath = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPath" + i, "");
|
||||
String isoPath = NativeLibrary.GetConfig("Dolphin.ini", "General", "ISOPath" + i, "");
|
||||
|
||||
if (gcmPath.equals(currentDir.getPath()))
|
||||
if (isoPath.equals(currentDir.getPath()))
|
||||
{
|
||||
pathNotPresent = false;
|
||||
}
|
||||
|
@ -157,8 +157,8 @@ public final class FolderBrowser extends ListFragment
|
|||
// User doesn't have this path in the config, so add it.
|
||||
if (pathNotPresent)
|
||||
{
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "GCMPathes", Integer.toString(intDirectories+1));
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "GCMPath" + Integer.toString(intDirectories), currentDir.getPath());
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "ISOPaths", Integer.toString(intDirectories+1));
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "ISOPath" + Integer.toString(intDirectories), currentDir.getPath());
|
||||
}
|
||||
|
||||
((GameListActivity)getActivity()).SwitchPage(0);
|
||||
|
|
|
@ -263,16 +263,16 @@ public final class GameListActivity extends Activity
|
|||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
String directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
||||
String directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "ISOPaths", "0");
|
||||
int intDirs = Integer.parseInt(directories);
|
||||
|
||||
for (int i = 0; i < intDirs; i++)
|
||||
{
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "GCMPath" + i, "");
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "ISOPath" + i, "");
|
||||
}
|
||||
|
||||
// Since we flushed all paths, we signify this in the ini.
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "General", "ISOPaths", "0");
|
||||
|
||||
// Now finally, clear the game list.
|
||||
((GameListFragment) getFragmentManager().findFragmentById(R.id.content_frame)).clearGameList();
|
||||
|
|
|
@ -63,7 +63,7 @@ public final class GameListFragment extends ListFragment
|
|||
private void fill()
|
||||
{
|
||||
List<GameListItem> fls = new ArrayList<GameListItem>();
|
||||
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
||||
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "ISOPaths", "0");
|
||||
int intDirectories = Integer.parseInt(Directories);
|
||||
|
||||
// Extensions to filter by.
|
||||
|
@ -71,7 +71,7 @@ public final class GameListFragment extends ListFragment
|
|||
|
||||
for (int a = 0; a < intDirectories; ++a)
|
||||
{
|
||||
String BrowseDir = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPath" + a, "");
|
||||
String BrowseDir = NativeLibrary.GetConfig("Dolphin.ini", "General", "ISOPath" + a, "");
|
||||
File currentDir = new File(BrowseDir);
|
||||
File[] dirs = currentDir.listFiles();
|
||||
try
|
||||
|
|
|
@ -293,9 +293,9 @@ bool CBoot::BootUp()
|
|||
{
|
||||
BS2Success = EmulatedBS2(dolWii);
|
||||
}
|
||||
else if (!VolumeHandler::IsWii() && !_StartupPara.m_strDefaultGCM.empty())
|
||||
else if (!VolumeHandler::IsWii() && !_StartupPara.m_strDefaultISO.empty())
|
||||
{
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultGCM);
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultISO);
|
||||
BS2Success = EmulatedBS2(dolWii);
|
||||
}
|
||||
|
||||
|
@ -343,9 +343,9 @@ bool CBoot::BootUp()
|
|||
{
|
||||
BS2Success = EmulatedBS2(elfWii);
|
||||
}
|
||||
else if (!VolumeHandler::IsWii() && !_StartupPara.m_strDefaultGCM.empty())
|
||||
else if (!VolumeHandler::IsWii() && !_StartupPara.m_strDefaultISO.empty())
|
||||
{
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultGCM);
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultISO);
|
||||
BS2Success = EmulatedBS2(elfWii);
|
||||
}
|
||||
|
||||
|
@ -357,10 +357,10 @@ bool CBoot::BootUp()
|
|||
VolumeHandler::SetVolumeDirectory(_StartupPara.m_strDVDRoot, elfWii);
|
||||
BS2Success = EmulatedBS2(elfWii);
|
||||
}
|
||||
else if (!_StartupPara.m_strDefaultGCM.empty())
|
||||
else if (!_StartupPara.m_strDefaultISO.empty())
|
||||
{
|
||||
NOTICE_LOG(BOOT, "Loading default ISO %s", _StartupPara.m_strDefaultGCM.c_str());
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultGCM);
|
||||
NOTICE_LOG(BOOT, "Loading default ISO %s", _StartupPara.m_strDefaultISO.c_str());
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultISO);
|
||||
}
|
||||
else VolumeHandler::SetVolumeDirectory(_StartupPara.m_strFilename, elfWii);
|
||||
|
||||
|
@ -390,8 +390,8 @@ bool CBoot::BootUp()
|
|||
// load default image or create virtual drive from directory
|
||||
if (!_StartupPara.m_strDVDRoot.empty())
|
||||
VolumeHandler::SetVolumeDirectory(_StartupPara.m_strDVDRoot, true);
|
||||
else if (!_StartupPara.m_strDefaultGCM.empty())
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultGCM);
|
||||
else if (!_StartupPara.m_strDefaultISO.empty())
|
||||
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultISO);
|
||||
|
||||
DVDInterface::SetDiscInside(VolumeHandler::IsValid());
|
||||
break;
|
||||
|
|
|
@ -178,19 +178,19 @@ void SConfig::SaveGeneralSettings(IniFile& ini)
|
|||
// Clear removed folders
|
||||
int oldPaths;
|
||||
int numPaths = (int)m_ISOFolder.size();
|
||||
general->Get("GCMPathes", &oldPaths, 0);
|
||||
general->Get("ISOPaths", &oldPaths, 0);
|
||||
for (int i = numPaths; i < oldPaths; i++)
|
||||
{
|
||||
ini.DeleteKey("General", StringFromFormat("GCMPath%i", i));
|
||||
ini.DeleteKey("General", StringFromFormat("ISOPath%i", i));
|
||||
}
|
||||
|
||||
general->Set("GCMPathes", numPaths);
|
||||
general->Set("ISOPaths", numPaths);
|
||||
for (int i = 0; i < numPaths; i++)
|
||||
{
|
||||
general->Set(StringFromFormat("GCMPath%i", i), m_ISOFolder[i]);
|
||||
general->Set(StringFromFormat("ISOPath%i", i), m_ISOFolder[i]);
|
||||
}
|
||||
|
||||
general->Set("RecursiveGCMPaths", m_RecursiveISOFolder);
|
||||
general->Set("RecursiveISOPaths", m_RecursiveISOFolder);
|
||||
general->Set("NANDRootPath", m_NANDPath);
|
||||
general->Set("WirelessMac", m_WirelessMac);
|
||||
|
||||
|
@ -292,7 +292,7 @@ void SConfig::SaveCoreSettings(IniFile& ini)
|
|||
core->Set("DSPThread", m_LocalCoreStartupParameter.bDSPThread);
|
||||
core->Set("DSPHLE", m_LocalCoreStartupParameter.bDSPHLE);
|
||||
core->Set("SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
|
||||
core->Set("DefaultGCM", m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||
core->Set("DefaultISO", m_LocalCoreStartupParameter.m_strDefaultISO);
|
||||
core->Set("DVDRoot", m_LocalCoreStartupParameter.m_strDVDRoot);
|
||||
core->Set("Apploader", m_LocalCoreStartupParameter.m_strApploader);
|
||||
core->Set("EnableCheats", m_LocalCoreStartupParameter.bEnableCheats);
|
||||
|
@ -388,19 +388,19 @@ void SConfig::LoadGeneralSettings(IniFile& ini)
|
|||
#endif
|
||||
|
||||
m_ISOFolder.clear();
|
||||
int numGCMPaths;
|
||||
int numISOPaths;
|
||||
|
||||
if (general->Get("GCMPathes", &numGCMPaths, 0))
|
||||
if (general->Get("ISOPaths", &numISOPaths, 0))
|
||||
{
|
||||
for (int i = 0; i < numGCMPaths; i++)
|
||||
for (int i = 0; i < numISOPaths; i++)
|
||||
{
|
||||
std::string tmpPath;
|
||||
general->Get(StringFromFormat("GCMPath%i", i), &tmpPath, "");
|
||||
general->Get(StringFromFormat("ISOPath%i", i), &tmpPath, "");
|
||||
m_ISOFolder.push_back(std::move(tmpPath));
|
||||
}
|
||||
}
|
||||
|
||||
general->Get("RecursiveGCMPaths", &m_RecursiveISOFolder, false);
|
||||
general->Get("RecursiveISOPaths", &m_RecursiveISOFolder, false);
|
||||
|
||||
general->Get("NANDRootPath", &m_NANDPath);
|
||||
m_NANDPath = File::GetUserPath(D_WIIROOT_IDX, m_NANDPath);
|
||||
|
@ -512,7 +512,7 @@ void SConfig::LoadCoreSettings(IniFile& ini)
|
|||
core->Get("DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true);
|
||||
core->Get("CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
|
||||
core->Get("SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
|
||||
core->Get("DefaultGCM", &m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||
core->Get("DefaultISO", &m_LocalCoreStartupParameter.m_strDefaultISO);
|
||||
core->Get("DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot);
|
||||
core->Get("Apploader", &m_LocalCoreStartupParameter.m_strApploader);
|
||||
core->Get("EnableCheats", &m_LocalCoreStartupParameter.bEnableCheats, false);
|
||||
|
|
|
@ -32,7 +32,7 @@ struct SConfig : NonCopyable
|
|||
// name of the last used filename
|
||||
std::string m_LastFilename;
|
||||
|
||||
// gcm folder
|
||||
// ISO folder
|
||||
std::vector<std::string> m_ISOFolder;
|
||||
bool m_RecursiveISOFolder;
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ struct SCoreStartupParameter
|
|||
std::string m_strFilename;
|
||||
std::string m_strBootROM;
|
||||
std::string m_strSRAM;
|
||||
std::string m_strDefaultGCM;
|
||||
std::string m_strDefaultISO;
|
||||
std::string m_strDVDRoot;
|
||||
std::string m_strApploader;
|
||||
std::string m_strUniqueID;
|
||||
|
|
|
@ -501,7 +501,7 @@ void CConfigMain::InitializeGUIValues()
|
|||
|
||||
// Paths
|
||||
RecursiveISOPath->SetValue(SConfig::GetInstance().m_RecursiveISOFolder);
|
||||
DefaultISO->SetPath(StrToWxStr(startup_params.m_strDefaultGCM));
|
||||
DefaultISO->SetPath(StrToWxStr(startup_params.m_strDefaultISO));
|
||||
DVDRoot->SetPath(StrToWxStr(startup_params.m_strDVDRoot));
|
||||
ApploaderPath->SetPath(StrToWxStr(startup_params.m_strApploader));
|
||||
NANDRoot->SetPath(StrToWxStr(SConfig::GetInstance().m_NANDPath));
|
||||
|
@ -1284,7 +1284,7 @@ void CConfigMain::RecursiveDirectoryChanged(wxCommandEvent& WXUNUSED (event))
|
|||
|
||||
void CConfigMain::DefaultISOChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM = WxStrToStr(DefaultISO->GetPath());
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = WxStrToStr(DefaultISO->GetPath());
|
||||
}
|
||||
|
||||
void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
||||
|
|
|
@ -639,10 +639,10 @@ void CFrame::BootGame(const std::string& filename)
|
|||
if (m_GameListCtrl->GetSelectedISO()->IsValid())
|
||||
bootfile = m_GameListCtrl->GetSelectedISO()->GetFileName();
|
||||
}
|
||||
else if (!StartUp.m_strDefaultGCM.empty() &&
|
||||
File::Exists(StartUp.m_strDefaultGCM))
|
||||
else if (!StartUp.m_strDefaultISO.empty() &&
|
||||
File::Exists(StartUp.m_strDefaultISO))
|
||||
{
|
||||
bootfile = StartUp.m_strDefaultGCM;
|
||||
bootfile = StartUp.m_strDefaultISO;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1831,7 +1831,7 @@ void CFrame::UpdateGUI()
|
|||
if (m_GameListCtrl->IsEnabled())
|
||||
{
|
||||
// Prepare to load Default ISO, enable play button
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.empty())
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO.empty())
|
||||
{
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
|
|
|
@ -924,7 +924,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
|||
|
||||
// First we have to decide a starting value when we append it
|
||||
if (selected_iso->GetFileName() == SConfig::GetInstance().
|
||||
m_LocalCoreStartupParameter.m_strDefaultGCM)
|
||||
m_LocalCoreStartupParameter.m_strDefaultISO)
|
||||
popupMenu->FindItem(IDM_SETDEFAULTISO)->Check();
|
||||
|
||||
popupMenu->AppendSeparator();
|
||||
|
@ -1039,14 +1039,14 @@ void CGameListCtrl::OnSetDefaultISO(wxCommandEvent& event)
|
|||
if (event.IsChecked())
|
||||
{
|
||||
// Write the new default value and save it the ini file
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM =
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO =
|
||||
iso->GetFileName();
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise blank the value and save it
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM = "";
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = "";
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue