From 7f66344b64696cef82ef5aa1e040a1ff9883226f Mon Sep 17 00:00:00 2001 From: Stevoisiak Date: Mon, 20 Oct 2014 17:49:33 -0400 Subject: [PATCH 1/2] Updated GCM references to ISO --- Source/Core/Core/Boot/Boot.cpp | 18 +++++++++--------- Source/Core/Core/ConfigManager.cpp | 24 ++++++++++++------------ Source/Core/Core/ConfigManager.h | 2 +- Source/Core/Core/CoreParameter.h | 2 +- Source/Core/DolphinWX/ConfigMain.cpp | 4 ++-- Source/Core/DolphinWX/FrameTools.cpp | 8 ++++---- Source/Core/DolphinWX/GameListCtrl.cpp | 6 +++--- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 75013a44b6..6f318288ed 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -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; diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 3a35b4ff20..a18af93913 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -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); diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index 9f44b884c6..8e4ca7fce2 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -32,7 +32,7 @@ struct SConfig : NonCopyable // name of the last used filename std::string m_LastFilename; - // gcm folder + // ISO folder std::vector m_ISOFolder; bool m_RecursiveISOFolder; diff --git a/Source/Core/Core/CoreParameter.h b/Source/Core/Core/CoreParameter.h index 23376c9799..a2838e464c 100644 --- a/Source/Core/Core/CoreParameter.h +++ b/Source/Core/Core/CoreParameter.h @@ -221,7 +221,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; diff --git a/Source/Core/DolphinWX/ConfigMain.cpp b/Source/Core/DolphinWX/ConfigMain.cpp index 925803d2af..bc391286d4 100644 --- a/Source/Core/DolphinWX/ConfigMain.cpp +++ b/Source/Core/DolphinWX/ConfigMain.cpp @@ -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)); @@ -1272,7 +1272,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)) diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 08c1c3fd7c..ff20f6b778 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -635,10 +635,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 { @@ -1801,7 +1801,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); diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index b801199d84..81ce47865e 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -877,7 +877,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(); @@ -992,14 +992,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(); } } From d937c072a56657b66010fc8e5121773bf294fb16 Mon Sep 17 00:00:00 2001 From: Stevoisiak Date: Sun, 2 Nov 2014 12:22:36 -0500 Subject: [PATCH 2/2] Updated android GCM references to ISO --- Source/Android/assets/Dolphin.ini | 6 +++--- .../dolphinemu/folderbrowser/FolderBrowser.java | 10 +++++----- .../dolphinemu/gamelist/GameListActivity.java | 6 +++--- .../dolphinemu/gamelist/GameListFragment.java | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/Android/assets/Dolphin.ini b/Source/Android/assets/Dolphin.ini index 944bbf75bb..2dbfe2ba35 100644 --- a/Source/Android/assets/Dolphin.ini +++ b/Source/Android/assets/Dolphin.ini @@ -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 diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java index 1985249718..97400c23b8 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowser.java @@ -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); diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListActivity.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListActivity.java index 96020ff0e6..adade82145 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListActivity.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListActivity.java @@ -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(); diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java index 60e10a3561..7dd5d0e14d 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListFragment.java @@ -63,7 +63,7 @@ public final class GameListFragment extends ListFragment private void fill() { List fls = new ArrayList(); - 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