Merge GCPadNew into Dolphin. This takes place in three segments: Core, InputCommon, and InputUICommon. From now on it can be referred to just as "GCPad".
Switch to Billiard's IniFile implementation throughout Dolphin (it's faster!!). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5579 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="0"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\Plugins\InputUICommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="false"
|
||||
RuntimeLibrary="0"
|
||||
@@ -174,7 +174,7 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="false"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\Plugins\InputUICommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@@ -286,7 +286,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\Plugins\InputUICommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -397,7 +397,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\Plugins\InputUICommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@@ -510,7 +510,7 @@
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\Plugins\InputUICommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
PreprocessorDefinitions="DEBUGFAST;WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
@@ -626,7 +626,7 @@
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DebuggerWX\src;..\DebuggerUICommon\src;..\DiscIO\Src;..\InputCommon\Src;..\..\Plugins\InputUICommon\Src;..\..\PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\SFML\include"
|
||||
PreprocessorDefinitions="DEBUGFAST;WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
|
||||
@@ -113,10 +113,11 @@ bool BootCore(const std::string& _rFilename)
|
||||
if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str()))
|
||||
{
|
||||
// General settings
|
||||
game_ini.Get("Core", "CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
||||
game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
|
||||
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
|
||||
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
|
||||
Section& core = game_ini["Core"];
|
||||
core.Get("CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
||||
core.Get("SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
|
||||
core.Get("EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
|
||||
core.Get("TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
|
||||
// Wii settings
|
||||
if (StartUp.bWii)
|
||||
{
|
||||
|
||||
@@ -110,8 +110,6 @@ EVT_CHOICE(ID_GRAPHIC_CB, CConfigMain::OnSelectionChanged)
|
||||
EVT_BUTTON(ID_GRAPHIC_CONFIG, CConfigMain::OnConfig)
|
||||
EVT_CHOICE(ID_DSP_CB, CConfigMain::OnSelectionChanged)
|
||||
EVT_BUTTON(ID_DSP_CONFIG, CConfigMain::OnConfig)
|
||||
EVT_CHOICE(ID_PAD_CB, CConfigMain::OnSelectionChanged)
|
||||
EVT_BUTTON(ID_PAD_CONFIG, CConfigMain::OnConfig)
|
||||
EVT_CHOICE(ID_WIIMOTE_CB, CConfigMain::OnSelectionChanged)
|
||||
EVT_BUTTON(ID_WIIMOTE_CONFIG, CConfigMain::OnConfig)
|
||||
|
||||
@@ -168,7 +166,6 @@ void CConfigMain::UpdateGUI()
|
||||
|
||||
GraphicSelection->Disable();
|
||||
DSPSelection->Disable();
|
||||
PADSelection->Disable();
|
||||
WiimoteSelection->Disable();
|
||||
}
|
||||
}
|
||||
@@ -282,8 +279,6 @@ void CConfigMain::InitializeGUIValues()
|
||||
// Plugins
|
||||
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
|
||||
FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
|
||||
for (int i = 0; i < MAXPADS; i++)
|
||||
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[i]);
|
||||
for (int i=0; i < MAXWIIMOTES; i++)
|
||||
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[i]);
|
||||
}
|
||||
@@ -675,10 +670,6 @@ void CConfigMain::CreateGUIControls()
|
||||
DSPSelection = new wxChoice(PluginPage, ID_DSP_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
|
||||
DSPConfig = new wxButton(PluginPage, ID_DSP_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
sbPadPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Gamecube Pad"));
|
||||
PADSelection = new wxChoice(PluginPage, ID_PAD_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
|
||||
PADConfig = new wxButton(PluginPage, ID_PAD_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
sbWiimotePlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Wiimote"));
|
||||
WiimoteSelection = new wxChoice(PluginPage, ID_WIIMOTE_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
|
||||
WiimoteConfig = new wxButton(PluginPage, ID_WIIMOTE_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
@@ -693,10 +684,6 @@ void CConfigMain::CreateGUIControls()
|
||||
sbDSPPlugin->Add(DSPConfig, 0, wxALL, 5);
|
||||
sPlugins->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
|
||||
|
||||
sbPadPlugin->Add(PADSelection, 1, wxEXPAND|wxALL, 5);
|
||||
sbPadPlugin->Add(PADConfig, 0, wxALL, 5);
|
||||
sPlugins->Add(sbPadPlugin, 0, wxEXPAND|wxALL, 5);
|
||||
|
||||
sbWiimotePlugin->Add(WiimoteSelection, 1, wxEXPAND|wxALL, 5);
|
||||
sbWiimotePlugin->Add(WiimoteConfig, 0, wxALL, 5);
|
||||
sPlugins->Add(sbWiimotePlugin, 0, wxEXPAND|wxALL, 5);
|
||||
@@ -1079,9 +1066,6 @@ void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
// Update plugin filenames
|
||||
GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
|
||||
GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
|
||||
for (int i = 0; i < MAXPADS; i++)
|
||||
GetFilename(PADSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[i]);
|
||||
for (int i = 0; i < MAXWIIMOTES; i++)
|
||||
GetFilename(WiimoteSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[i]);
|
||||
}
|
||||
@@ -1096,9 +1080,6 @@ void CConfigMain::OnConfig(wxCommandEvent& event)
|
||||
case ID_DSP_CONFIG:
|
||||
CallConfig(DSPSelection);
|
||||
break;
|
||||
case ID_PAD_CONFIG:
|
||||
CallConfig(PADSelection);
|
||||
break;
|
||||
case ID_WIIMOTE_CONFIG:
|
||||
CallConfig(WiimoteSelection);
|
||||
break;
|
||||
|
||||
@@ -99,7 +99,6 @@ private:
|
||||
wxBoxSizer* sPlugins;
|
||||
wxStaticBoxSizer* sbGraphicsPlugin;
|
||||
wxStaticBoxSizer* sbDSPPlugin;
|
||||
wxStaticBoxSizer* sbPadPlugin;
|
||||
wxStaticBoxSizer* sbWiimotePlugin;
|
||||
|
||||
wxNotebook *Notebook;
|
||||
@@ -138,9 +137,6 @@ private:
|
||||
wxStaticText* ApploaderPathText;
|
||||
wxFilePickerCtrl* ApploaderPath;
|
||||
|
||||
wxStaticText* PADText;
|
||||
wxButton* PADConfig;
|
||||
wxChoice* PADSelection;
|
||||
wxButton* DSPConfig;
|
||||
wxStaticText* DSPText;
|
||||
wxChoice* DSPSelection;
|
||||
@@ -239,10 +235,6 @@ private:
|
||||
ID_WIIMOTE_CONFIG,
|
||||
ID_WIIMOTE_TEXT,
|
||||
ID_WIIMOTE_CB,
|
||||
ID_PAD_TEXT,
|
||||
ID_PAD_ABOUT ,
|
||||
ID_PAD_CONFIG,
|
||||
ID_PAD_CB,
|
||||
ID_DSP_ABOUT,
|
||||
ID_DSP_CONFIG,
|
||||
ID_DSP_TEXT,
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
||||
#include "State.h"
|
||||
#include "VolumeHandler.h"
|
||||
#include "HW/GCPad.h"
|
||||
|
||||
#include <wx/datetime.h> // wxWidgets
|
||||
|
||||
@@ -251,7 +252,7 @@ EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
||||
EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain)
|
||||
EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnPluginGFX)
|
||||
EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnPluginDSP)
|
||||
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD)
|
||||
EVT_MENU(IDM_CONFIG_GCPAD, CFrame::OnPluginGCPad)
|
||||
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote)
|
||||
|
||||
EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnToolBar)
|
||||
@@ -441,7 +442,7 @@ CFrame::CFrame(wxFrame* parent,
|
||||
{
|
||||
IniFile ini; int winpos;
|
||||
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||
ini.Get("LogWindow", "pos", &winpos, 2);
|
||||
ini["LogWindow"].Get("pos", &winpos, 2);
|
||||
|
||||
m_Mgr->GetPane(wxT("Pane 0")).Show().PaneBorder(false).CaptionVisible(false).Layer(0).Center();
|
||||
m_Mgr->GetPane(wxT("Pane 1")).Hide().PaneBorder(false).CaptionVisible(true).Layer(0)
|
||||
@@ -712,12 +713,6 @@ void CFrame::OnCustomHostMessage(int Id)
|
||||
{
|
||||
DoRemovePage(Win, false);
|
||||
|
||||
CPluginManager::GetInstance().OpenDebug(
|
||||
GetHandle(),
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str(),
|
||||
PLUGIN_TYPE_DSP, false
|
||||
);
|
||||
|
||||
//Win->Reparent(NULL);
|
||||
//g_pCodeWindow->OnToggleDLLWindow(false, 0);
|
||||
GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(false);
|
||||
@@ -883,7 +878,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
#endif
|
||||
|
||||
// Send the keyboard status to the Input plugin
|
||||
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
|
||||
PAD_Input(event.GetKeyCode(), 1); // 1 = Down
|
||||
}
|
||||
else
|
||||
event.Skip();
|
||||
@@ -894,7 +889,7 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
|
||||
event.Skip();
|
||||
|
||||
if(Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
|
||||
PAD_Input(event.GetKeyCode(), 0); // 0 = Up*/
|
||||
}
|
||||
|
||||
// --------
|
||||
|
||||
@@ -320,7 +320,7 @@ class CFrame : public CRenderFrame
|
||||
void OnConfigMain(wxCommandEvent& event); // Options
|
||||
void OnPluginGFX(wxCommandEvent& event);
|
||||
void OnPluginDSP(wxCommandEvent& event);
|
||||
void OnPluginPAD(wxCommandEvent& event);
|
||||
void OnPluginGCPad(wxCommandEvent& event);
|
||||
void OnPluginWiimote(wxCommandEvent& event);
|
||||
|
||||
void OnToggleFullscreen(wxCommandEvent& event);
|
||||
|
||||
@@ -772,8 +772,9 @@ void CFrame::SetSimplePaneSize()
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||
ini.Get("LogWindow", "x", &x, Size);
|
||||
ini.Get("LogWindow", "y", &y, Size);
|
||||
Section& logwin = ini["LogWindow"];
|
||||
logwin.Get("x", &x, Size);
|
||||
logwin.Get("y", &y, Size);
|
||||
|
||||
// Update size
|
||||
m_Mgr->GetPane(wxT("Pane 0")).BestSize(x, y).MinSize(x, y).MaxSize(x, y);
|
||||
@@ -894,8 +895,9 @@ void CFrame::SaveLocal()
|
||||
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
ini.Get("Perspectives", "Perspectives", &_Perspectives, "");
|
||||
ini.Get("Perspectives", "Active", &ActivePerspective, 5);
|
||||
Section& perspectives = ini["Perspectives"];
|
||||
perspectives.Get("Perspectives", &_Perspectives, "");
|
||||
perspectives.Get("Active", &ActivePerspective, 5);
|
||||
SplitString(_Perspectives, ",", VPerspectives);
|
||||
|
||||
for (u32 i = 0; i < VPerspectives.size(); i++)
|
||||
@@ -908,10 +910,10 @@ void CFrame::SaveLocal()
|
||||
if (Tmp.Name == "") continue;
|
||||
//if (!ini.Exists(_Section.c_str(), "Width")) continue;
|
||||
|
||||
_Section = StringFromFormat("P - %s", Tmp.Name.c_str());
|
||||
ini.Get(_Section.c_str(), "Perspective", &_Perspective, "");
|
||||
ini.Get(_Section.c_str(), "Width", &_Width, "");
|
||||
ini.Get(_Section.c_str(), "Height", &_Height, "");
|
||||
Section& section = ini[StringFromFormat("P - %s", Tmp.Name.c_str())];
|
||||
section.Get("Perspective", &_Perspective, "");
|
||||
section.Get("Width", &_Width, "");
|
||||
section.Get("Height", &_Height, "");
|
||||
|
||||
Tmp.Perspective = wxString::FromAscii(_Perspective.c_str());
|
||||
|
||||
@@ -946,8 +948,8 @@ void CFrame::Save()
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
std::string _Section = StringFromFormat("P - %s", Perspectives.at(ActivePerspective).Name.c_str());
|
||||
ini.Set(_Section.c_str(), "Perspective", m_Mgr->SavePerspective().mb_str());
|
||||
Section& section = ini[StringFromFormat("P - %s", Perspectives.at(ActivePerspective).Name.c_str())];
|
||||
section.Set("Perspective", m_Mgr->SavePerspective().mb_str());
|
||||
|
||||
std::string SWidth = "", SHeight = "";
|
||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||
@@ -962,8 +964,8 @@ void CFrame::Save()
|
||||
// Remove the ending ","
|
||||
SWidth = SWidth.substr(0, SWidth.length()-1); SHeight = SHeight.substr(0, SHeight.length()-1);
|
||||
|
||||
ini.Set(_Section.c_str(), "Width", SWidth.c_str());
|
||||
ini.Set(_Section.c_str(), "Height", SHeight.c_str());
|
||||
section.Set("Width", SWidth.c_str());
|
||||
section.Set("Height", SHeight.c_str());
|
||||
|
||||
// Save perspective names
|
||||
std::string STmp = "";
|
||||
@@ -972,8 +974,9 @@ void CFrame::Save()
|
||||
STmp += Perspectives.at(i).Name + ",";
|
||||
}
|
||||
STmp = STmp.substr(0, STmp.length()-1);
|
||||
ini.Set("Perspectives", "Perspectives", STmp.c_str());
|
||||
ini.Set("Perspectives", "Active", ActivePerspective);
|
||||
Section& perspectives = ini["Perspectives"];
|
||||
perspectives.Set("Perspectives", STmp.c_str());
|
||||
perspectives.Set("Active", ActivePerspective);
|
||||
ini.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
// Save notebook affiliations
|
||||
|
||||
@@ -27,42 +27,44 @@ window handle that is returned by CreateWindow() can be accessed from
|
||||
Core::GetWindowHandle().
|
||||
*/
|
||||
|
||||
// Common
|
||||
#include <Common.h>
|
||||
#include <Setup.h>
|
||||
#include <FileUtil.h>
|
||||
#include <FileSearch.h>
|
||||
#include <Timer.h>
|
||||
|
||||
#include "Setup.h" // Common
|
||||
#include <Core.h>
|
||||
#include <ConfigManager.h>
|
||||
#include <OnFrame.h>
|
||||
#include <IPC_HLE/WII_IPC_HLE_Device_usb.h>
|
||||
#include <HW/CPU.h>
|
||||
#include <HW/DVDInterface.h>
|
||||
#include <HW/ProcessorInterface.h>
|
||||
#include <PowerPC/PowerPC.h>
|
||||
#include <State.h>
|
||||
#include <PluginManager.h>
|
||||
|
||||
#include <VolumeHandler.h>
|
||||
#include <NANDContentLoader.h>
|
||||
|
||||
#include <WXInputBase.h>
|
||||
#include <ConfigDiag.h>
|
||||
|
||||
#include <wx/datetime.h>
|
||||
|
||||
#include "NetWindow.h"
|
||||
#include "Common.h" // Common
|
||||
#include "FileUtil.h"
|
||||
#include "FileSearch.h"
|
||||
#include "Timer.h"
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "Globals.h"
|
||||
#include "Frame.h"
|
||||
#include "ConfigMain.h"
|
||||
#include "PluginManager.h"
|
||||
#include "MemcardManager.h"
|
||||
#include "CheatsWindow.h"
|
||||
#include "LuaWindow.h"
|
||||
#include "AboutDolphin.h"
|
||||
#include "GameListCtrl.h"
|
||||
#include "BootManager.h"
|
||||
#include "LogWindow.h"
|
||||
#include "WxUtils.h"
|
||||
|
||||
#include "ConfigManager.h" // Core
|
||||
#include "Core.h"
|
||||
#include "OnFrame.h"
|
||||
#include "HW/CPU.h"
|
||||
#include "PowerPC/PowerPC.h"
|
||||
#include "HW/DVDInterface.h"
|
||||
#include "HW/ProcessorInterface.h"
|
||||
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
||||
#include "State.h"
|
||||
#include "VolumeHandler.h"
|
||||
#include "NANDContentLoader.h"
|
||||
#include "WXInputBase.h"
|
||||
|
||||
#include <wx/datetime.h> // wxWidgets
|
||||
#include "BootManager.h"
|
||||
|
||||
|
||||
// Resources
|
||||
@@ -170,7 +172,7 @@ void CFrame::CreateMenu()
|
||||
pOptionsMenu->AppendSeparator();
|
||||
pOptionsMenu->Append(IDM_CONFIG_GFX_PLUGIN, _T("&Graphics Settings"));
|
||||
pOptionsMenu->Append(IDM_CONFIG_DSP_PLUGIN, _T("&DSP Settings"));
|
||||
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _T("&Gamecube Pad Settings"));
|
||||
pOptionsMenu->Append(IDM_CONFIG_GCPAD, _T("&GCPad Settings"));
|
||||
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _T("&Wiimote Settings"));
|
||||
if (g_pCodeWindow)
|
||||
{
|
||||
@@ -332,8 +334,10 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
|
||||
ToolBar->AddTool(wxID_PREFERENCES, _T("Config"), m_Bitmaps[Toolbar_PluginOptions], _T("Configure..."));
|
||||
ToolBar->AddTool(IDM_CONFIG_GFX_PLUGIN, _T("Graphics"), m_Bitmaps[Toolbar_PluginGFX], _T("Graphics settings"));
|
||||
ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _T("DSP"), m_Bitmaps[Toolbar_PluginDSP], _T("DSP settings"));
|
||||
ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _T("GCPad"), m_Bitmaps[Toolbar_PluginPAD], _T("Gamecube Pad settings"));
|
||||
ToolBar->AddTool(IDM_CONFIG_GCPAD, _T("GCPad"), m_Bitmaps[Toolbar_PluginPAD], _T("GCPad settings"));
|
||||
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _T("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _T("Wiimote settings"));
|
||||
ToolBar->AddSeparator();
|
||||
ToolBar->AddTool(wxID_ABOUT, _T("About"), m_Bitmaps[Toolbar_Help], _T("About Dolphin"));
|
||||
|
||||
// after adding the buttons to the toolbar, must call Realize() to reflect
|
||||
// the changes
|
||||
@@ -940,14 +944,25 @@ void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event))
|
||||
);
|
||||
}
|
||||
|
||||
void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))
|
||||
extern Plugin g_GCPad; //TODOSHUFFLE
|
||||
void CFrame::OnPluginGCPad(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
CPluginManager::GetInstance().OpenConfig(
|
||||
GetHandle(),
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[0].c_str(),
|
||||
PLUGIN_TYPE_PAD
|
||||
);
|
||||
bool was_init = false;
|
||||
|
||||
if ( g_GCPad.controller_interface.IsInit() ) // check if game is running
|
||||
was_init = true;
|
||||
else
|
||||
PAD_Init();
|
||||
|
||||
ConfigDialog* configDiag = new ConfigDialog( this, g_GCPad, g_GCPad.gui_name, was_init );
|
||||
|
||||
configDiag->ShowModal();
|
||||
configDiag->Destroy();
|
||||
|
||||
if ( !was_init ) // if game isn't running
|
||||
PAD_Shutdown();
|
||||
}
|
||||
|
||||
void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
CPluginManager::GetInstance().OpenConfig(
|
||||
|
||||
@@ -357,7 +357,7 @@ void CGameListCtrl::OnPaintDrawImages(wxPaintEvent& event)
|
||||
m_imageListSmall->Draw(m_FlagImageIndex[rISOFile.GetCountry()], dc, flagOffset, itemY);
|
||||
|
||||
ini.Load((std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + (rISOFile.GetUniqueID()) + ".ini").c_str());
|
||||
ini.Get("EmuState", "EmulationStateId", &nState);
|
||||
ini["EmuState"].Get("EmulationStateId", &nState);
|
||||
m_imageListSmall->Draw(m_EmuStateImageIndex[nState], dc, stateOffset, itemY);
|
||||
}
|
||||
}
|
||||
@@ -701,9 +701,9 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
|
||||
std::string GameIni2 = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + iso2->GetUniqueID() + ".ini";
|
||||
|
||||
ini.Load(GameIni1.c_str());
|
||||
ini.Get("EmuState", "EmulationStateId", &nState1);
|
||||
ini["EmuState"].Get("EmulationStateId", &nState1);
|
||||
ini.Load(GameIni2.c_str());
|
||||
ini.Get("EmuState", "EmulationStateId", &nState2);
|
||||
ini["EmuState"].Get("EmulationStateId", &nState2);
|
||||
|
||||
if(nState1 > nState2) return 1 *t;
|
||||
if(nState1 < nState2) return -1 *t;
|
||||
@@ -809,8 +809,9 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event)
|
||||
std::string emuState[5] = {"Broken", "Intro", "In-Game", "Playable", "Perfect"}, issues;
|
||||
|
||||
int nState;
|
||||
ini.Get("EmuState", "EmulationStateId", &nState);
|
||||
ini.Get("EmuState", "EmulationIssues", &issues, "");
|
||||
Section& emustate = ini["EmuState"];
|
||||
emustate.Get("EmulationStateId", &nState);
|
||||
emustate.Get("EmulationIssues", &issues, "");
|
||||
|
||||
// Get item Coords then convert from wxWindow coord to Screen coord
|
||||
wxRect Rect;
|
||||
|
||||
@@ -121,7 +121,7 @@ enum
|
||||
|
||||
IDM_CONFIG_GFX_PLUGIN,
|
||||
IDM_CONFIG_DSP_PLUGIN,
|
||||
IDM_CONFIG_PAD_PLUGIN,
|
||||
IDM_CONFIG_GCPAD,
|
||||
IDM_CONFIG_WIIMOTE_PLUGIN,
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -782,77 +782,57 @@ void CISOProperties::SetRefresh(wxCommandEvent& event)
|
||||
|
||||
void CISOProperties::LoadGameConfig()
|
||||
{
|
||||
bool bTemp;
|
||||
int iTemp;
|
||||
std::string sTemp;
|
||||
|
||||
if (GameIni.Get("Core", "CPUThread", &bTemp))
|
||||
CPUThread->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
CPUThread->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
Section& core = GameIni["Core"];
|
||||
Section& wii = GameIni["Wii"];
|
||||
Section& video = GameIni["Video"];
|
||||
Section& emustate = GameIni["EmuState"];
|
||||
|
||||
if (GameIni.Get("Core", "SkipIdle", &bTemp))
|
||||
SkipIdle->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
SkipIdle->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
core.Get("CPUThread", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
CPUThread->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Core", "TLBHack", &bTemp))
|
||||
TLBHack->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
TLBHack->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
core.Get("SkipIdle", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
SkipIdle->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Wii", "ProgressiveScan", &bTemp))
|
||||
EnableProgressiveScan->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
EnableProgressiveScan->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
core.Get("TLBHack", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
TLBHack->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Wii", "Widescreen", &bTemp))
|
||||
EnableWideScreen->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
EnableWideScreen->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
wii.Get("ProgressiveScan", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
EnableProgressiveScan->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "ForceFiltering", &bTemp))
|
||||
ForceFiltering->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
ForceFiltering->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
wii.Get("Widescreen", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
EnableWideScreen->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "EFBCopyDisable", &bTemp))
|
||||
EFBCopyDisable->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
EFBCopyDisable->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
video.Get("ForceFiltering", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
ForceFiltering->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "EFBToTextureEnable", &bTemp))
|
||||
EFBToTextureEnable->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
EFBToTextureEnable->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
video.Get("EFBCopyDisable", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
EFBCopyDisable->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "SafeTextureCache", &bTemp))
|
||||
SafeTextureCache->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
SafeTextureCache->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
video.Get("EFBToTextureEnable", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
EFBToTextureEnable->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "DstAlphaPass", &bTemp))
|
||||
DstAlphaPass->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
DstAlphaPass->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
video.Get("SafeTextureCache", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
SafeTextureCache->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "UseXFB", &bTemp))
|
||||
UseXFB->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
UseXFB->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
video.Get("DstAlphaPass", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
DstAlphaPass->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
if (GameIni.Get("Video", "FIFOBPHack", &bTemp))
|
||||
BPHack->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
BPHack->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
video.Get("UseXFB", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
UseXFB->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
GameIni.Get("Video", "ProjectionHack", &iTemp, -1);
|
||||
video.Get("FIFOBPHack", &iTemp, (int)wxCHK_UNDETERMINED);
|
||||
BPHack->Set3StateValue((wxCheckBoxState)iTemp);
|
||||
|
||||
video.Get("ProjectionHack", &iTemp, -1);
|
||||
Hack->SetSelection(iTemp);
|
||||
|
||||
GameIni.Get("EmuState", "EmulationStateId", &iTemp, -1);
|
||||
emustate.Get("EmulationStateId", &iTemp, -1);
|
||||
EmuState->SetSelection(iTemp);
|
||||
|
||||
GameIni.Get("EmuState", "EmulationIssues", &sTemp);
|
||||
emustate.Get("EmulationIssues", &sTemp);
|
||||
if (!sTemp.empty())
|
||||
{
|
||||
EmuIssues->SetValue(wxString(sTemp.c_str(), *wxConvCurrent));
|
||||
@@ -866,77 +846,29 @@ void CISOProperties::LoadGameConfig()
|
||||
|
||||
bool CISOProperties::SaveGameConfig()
|
||||
{
|
||||
if (CPUThread->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "CPUThread");
|
||||
else
|
||||
GameIni.Set("Core", "CPUThread", CPUThread->Get3StateValue());
|
||||
Section& core = GameIni["Core"];
|
||||
Section& wii = GameIni["Wii"];
|
||||
Section& video = GameIni["Video"];
|
||||
Section& emustate = GameIni["EmuState"];
|
||||
|
||||
if (SkipIdle->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "SkipIdle");
|
||||
else
|
||||
GameIni.Set("Core", "SkipIdle", SkipIdle->Get3StateValue());
|
||||
core.Set("CPUThread", CPUThread->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
core.Set("SkipIdle", SkipIdle->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
core.Set("TLBHack", TLBHack->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
|
||||
if (TLBHack->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "TLBHack");
|
||||
else
|
||||
GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue());
|
||||
wii.Set("ProgressiveScan", EnableProgressiveScan->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
wii.Set("Widescreen", EnableWideScreen->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
|
||||
if (EnableProgressiveScan->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Wii", "ProgressiveScan");
|
||||
else
|
||||
GameIni.Set("Wii", "ProgressiveScan", EnableProgressiveScan->Get3StateValue());
|
||||
video.Set("ForceFiltering", ForceFiltering->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("EFBCopyDisable", EFBCopyDisable->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("EFBToTextureEnable", EFBToTextureEnable->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("SafeTextureCache", SafeTextureCache->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("DstAlphaPass", DstAlphaPass->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("UseXFB", UseXFB->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("FIFOBPHack", BPHack->Get3StateValue(), wxCHK_UNDETERMINED);
|
||||
video.Set("ProjectionHack", Hack->GetSelection(), wxCHK_UNDETERMINED);
|
||||
|
||||
if (EnableWideScreen->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Wii", "Widescreen");
|
||||
else
|
||||
GameIni.Set("Wii", "Widescreen", EnableWideScreen->Get3StateValue());
|
||||
|
||||
if (ForceFiltering->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "ForceFiltering");
|
||||
else
|
||||
GameIni.Set("Video", "ForceFiltering", ForceFiltering->Get3StateValue());
|
||||
|
||||
if (EFBCopyDisable->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "EFBCopyDisable");
|
||||
else
|
||||
GameIni.Set("Video", "EFBCopyDisable", EFBCopyDisable->Get3StateValue());
|
||||
|
||||
if (EFBToTextureEnable->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "EFBToTextureEnable");
|
||||
else
|
||||
GameIni.Set("Video", "EFBToTextureEnable", EFBToTextureEnable->Get3StateValue());
|
||||
|
||||
if (SafeTextureCache->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "SafeTextureCache");
|
||||
else
|
||||
GameIni.Set("Video", "SafeTextureCache", SafeTextureCache->Get3StateValue());
|
||||
|
||||
if (DstAlphaPass->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "DstAlphaPass");
|
||||
else
|
||||
GameIni.Set("Video", "DstAlphaPass", DstAlphaPass->Get3StateValue());
|
||||
|
||||
if (UseXFB->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "UseXFB");
|
||||
else
|
||||
GameIni.Set("Video", "UseXFB", UseXFB->Get3StateValue());
|
||||
|
||||
if (BPHack->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "FIFOBPHack");
|
||||
else
|
||||
GameIni.Set("Video", "FIFOBPHack", BPHack->Get3StateValue());
|
||||
|
||||
if (Hack->GetSelection() == -1)
|
||||
GameIni.DeleteKey("Video", "ProjectionHack");
|
||||
else
|
||||
GameIni.Set("Video", "ProjectionHack", Hack->GetSelection());
|
||||
|
||||
if (EmuState->GetSelection() == -1)
|
||||
GameIni.DeleteKey("EmuState", "EmulationStateId");
|
||||
else
|
||||
GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection());
|
||||
|
||||
GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent));
|
||||
emustate.Set("EmulationStateId", EmuState->GetSelection());
|
||||
emustate.Set("EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent));
|
||||
|
||||
PatchList_Save();
|
||||
ActionReplayList_Save();
|
||||
@@ -1018,6 +950,7 @@ void CISOProperties::PatchList_Load()
|
||||
void CISOProperties::PatchList_Save()
|
||||
{
|
||||
std::vector<std::string> lines;
|
||||
lines.clear();
|
||||
u32 index = 0;
|
||||
for (std::vector<PatchEngine::Patch>::const_iterator onFrame_it = onFrame.begin(); onFrame_it != onFrame.end(); ++onFrame_it)
|
||||
{
|
||||
@@ -1032,8 +965,7 @@ void CISOProperties::PatchList_Save()
|
||||
}
|
||||
++index;
|
||||
}
|
||||
GameIni.SetLines("OnFrame", lines);
|
||||
lines.clear();
|
||||
GameIni["OnFrame"].SetLines(lines);
|
||||
}
|
||||
|
||||
void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
|
||||
@@ -1104,7 +1036,7 @@ void CISOProperties::ActionReplayList_Save()
|
||||
}
|
||||
++index;
|
||||
}
|
||||
GameIni.SetLines("ActionReplay", lines);
|
||||
GameIni["ActionReplay"].SetLines(lines);
|
||||
}
|
||||
|
||||
void CISOProperties::ActionReplayButtonClicked(wxCommandEvent& event)
|
||||
|
||||
@@ -168,16 +168,22 @@ void CLogWindow::OnClose(wxCloseEvent& event)
|
||||
void CLogWindow::SaveSettings()
|
||||
{
|
||||
IniFile ini;
|
||||
ini.Set("LogWindow", "x", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth());
|
||||
ini.Set("LogWindow", "y", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight());
|
||||
ini.Set("LogWindow", "pos", Parent->m_Mgr->GetPane(wxT("Pane 1")).dock_direction);
|
||||
ini.Set("Options", "Verbosity", m_verbosity->GetSelection() + 1);
|
||||
ini.Set("Options", "Font", m_FontChoice->GetSelection());
|
||||
ini.Set("Options", "WriteToFile", m_writeFile);
|
||||
ini.Set("Options", "WriteToConsole", m_writeConsole);
|
||||
ini.Set("Options", "WriteToWindow", m_writeWindow);
|
||||
|
||||
Section& logwin = ini["LogWindow"];
|
||||
logwin.Set("x", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth());
|
||||
logwin.Set("y", Parent->m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight());
|
||||
logwin.Set("pos", Parent->m_Mgr->GetPane(wxT("Pane 1")).dock_direction);
|
||||
|
||||
Section& options = ini["Options"];
|
||||
options.Set("Verbosity", m_verbosity->GetSelection() + 1);
|
||||
options.Set("Font", m_FontChoice->GetSelection());
|
||||
options.Set("WriteToFile", m_writeFile);
|
||||
options.Set("WriteToConsole", m_writeConsole);
|
||||
options.Set("WriteToWindow", m_writeWindow);
|
||||
|
||||
Section& logs = ini["Logs"];
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
||||
ini.Set("Logs", m_LogManager->getShortName((LogTypes::LOG_TYPE)i), m_checks->IsChecked(i));
|
||||
logs.Set(m_LogManager->getShortName((LogTypes::LOG_TYPE)i), m_checks->IsChecked(i));
|
||||
ini.Save(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||
}
|
||||
|
||||
@@ -185,25 +191,28 @@ void CLogWindow::LoadSettings()
|
||||
{
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
|
||||
Section& options = ini["Options"];
|
||||
int verbosity,font;
|
||||
ini.Get("Options", "Verbosity", &verbosity, 0);
|
||||
options.Get("Verbosity", &verbosity, 0);
|
||||
if (verbosity < 1) verbosity = 1;
|
||||
if (verbosity > MAX_LOGLEVEL) verbosity = MAX_LOGLEVEL;
|
||||
m_verbosity->SetSelection(verbosity - 1);
|
||||
ini.Get("Options", "Font", &font, 0);
|
||||
options.Get("Font", &font, 0);
|
||||
m_FontChoice->SetSelection(font);
|
||||
if (m_FontChoice->GetSelection() < (int)Font.size())
|
||||
m_Log->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, Font.at(m_FontChoice->GetSelection())));
|
||||
ini.Get("Options", "WriteToFile", &m_writeFile, true);
|
||||
options.Get("WriteToFile", &m_writeFile, true);
|
||||
m_writeFileCB->SetValue(m_writeFile);
|
||||
ini.Get("Options", "WriteToConsole", &m_writeConsole, true);
|
||||
options.Get("WriteToConsole", &m_writeConsole, true);
|
||||
m_writeConsoleCB->SetValue(m_writeConsole);
|
||||
ini.Get("Options", "WriteToWindow", &m_writeWindow, true);
|
||||
options.Get("WriteToWindow", &m_writeWindow, true);
|
||||
m_writeWindowCB->SetValue(m_writeWindow);
|
||||
|
||||
Section& logs = ini["Logs"];
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i)
|
||||
{
|
||||
bool enable;
|
||||
ini.Get("Logs", m_LogManager->getShortName((LogTypes::LOG_TYPE)i), &enable, true);
|
||||
logs.Get(m_LogManager->getShortName((LogTypes::LOG_TYPE)i), &enable, true);
|
||||
|
||||
if (m_writeWindow && enable)
|
||||
m_LogManager->addListener((LogTypes::LOG_TYPE)i, this);
|
||||
|
||||
@@ -95,7 +95,6 @@ bool DolphinApp::OnInit()
|
||||
bool LoadElf = false;
|
||||
bool selectVideoPlugin = false;
|
||||
bool selectAudioPlugin = false;
|
||||
bool selectPadPlugin = false;
|
||||
bool selectWiimotePlugin = false;
|
||||
|
||||
wxString ElfFile;
|
||||
@@ -130,10 +129,6 @@ bool DolphinApp::OnInit()
|
||||
wxCMD_LINE_OPTION, "A", "audio_plugin","Specify an audio plugin",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, "P", "pad_plugin","Specify a pad plugin",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, "W", "wiimote_plugin","Specify a wiimote plugin",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
@@ -168,10 +163,6 @@ bool DolphinApp::OnInit()
|
||||
wxCMD_LINE_OPTION, _("A"), _("audio_plugin"), wxT("Specify an audio plugin"),
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, _("P"), _("pad_plugin"), wxT("Specify a pad plugin"),
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, _("W"), _("wiimote_plugin"), wxT("Specify a wiimote plugin"),
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
@@ -201,12 +192,10 @@ bool DolphinApp::OnInit()
|
||||
#if wxCHECK_VERSION(2, 9, 0)
|
||||
selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename);
|
||||
selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename);
|
||||
selectPadPlugin = parser.Found("pad_plugin", &padPluginFilename);
|
||||
selectWiimotePlugin = parser.Found("wiimote_plugin", &wiimotePluginFilename);
|
||||
#else
|
||||
selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
|
||||
selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
|
||||
selectPadPlugin = parser.Found(_T("pad_plugin"), &padPluginFilename);
|
||||
selectWiimotePlugin = parser.Found(_T("wiimote_plugin"), &wiimotePluginFilename);
|
||||
#endif
|
||||
#endif // wxUSE_CMDLINE_PARSER
|
||||
@@ -342,7 +331,6 @@ bool DolphinApp::OnInit()
|
||||
#endif
|
||||
|
||||
LogManager::Init();
|
||||
EventHandler::Init();
|
||||
SConfig::Init();
|
||||
CPluginManager::Init();
|
||||
|
||||
@@ -354,14 +342,6 @@ bool DolphinApp::OnInit()
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin =
|
||||
std::string(audioPluginFilename.mb_str());
|
||||
|
||||
if (selectPadPlugin && padPluginFilename != wxEmptyString)
|
||||
{
|
||||
int k;
|
||||
for(k=0;k<MAXPADS;k++)
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[k] =
|
||||
std::string(padPluginFilename.mb_str());
|
||||
}
|
||||
|
||||
if (selectWiimotePlugin && wiimotePluginFilename != wxEmptyString)
|
||||
{
|
||||
int k;
|
||||
@@ -465,7 +445,6 @@ int DolphinApp::OnExit()
|
||||
{
|
||||
CPluginManager::Shutdown();
|
||||
SConfig::Shutdown();
|
||||
EventHandler::Shutdown();
|
||||
LogManager::Shutdown();
|
||||
|
||||
return wxApp::OnExit();
|
||||
|
||||
@@ -379,7 +379,6 @@ int main(int argc, char* argv[])
|
||||
updateMainFrameEvent.Init();
|
||||
|
||||
LogManager::Init();
|
||||
EventHandler::Init();
|
||||
SConfig::Init();
|
||||
CPluginManager::Init();
|
||||
|
||||
@@ -402,7 +401,6 @@ int main(int argc, char* argv[])
|
||||
|
||||
CPluginManager::Shutdown();
|
||||
SConfig::Shutdown();
|
||||
EventHandler::Shutdown();
|
||||
LogManager::Shutdown();
|
||||
|
||||
cmdline_parser_free (&args_info);
|
||||
|
||||
@@ -110,10 +110,11 @@ CMemcardManager::CMemcardManager(wxWindow* parent, wxWindowID id, const wxString
|
||||
memoryCard[SLOT_B]=NULL;
|
||||
if (MemcardManagerIni.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX)))
|
||||
{
|
||||
MemcardManagerIni.Get("MemcardManager", "Items per page", &itemsPerPage, 16);
|
||||
MemcardManagerIni.Get("MemcardManager", "DefaultMemcardA", &(DefaultMemcard[SLOT_A]), ".");
|
||||
MemcardManagerIni.Get("MemcardManager", "DefaultMemcardB", &(DefaultMemcard[SLOT_B]), ".");
|
||||
MemcardManagerIni.Get("MemcardManager", "DefaultIOFolder", &DefaultIOPath, "/Users/GC");
|
||||
Section& mm = MemcardManagerIni["MemcardManager"];
|
||||
mm.Get("Items per page", &itemsPerPage, 16);
|
||||
mm.Get("DefaultMemcardA", &(DefaultMemcard[SLOT_A]), ".");
|
||||
mm.Get("DefaultMemcardB", &(DefaultMemcard[SLOT_B]), ".");
|
||||
mm.Get("DefaultIOFolder", &DefaultIOPath, "/Users/GC");
|
||||
}
|
||||
else itemsPerPage = 16;
|
||||
maxPages = (128 / itemsPerPage) - 1;
|
||||
@@ -144,16 +145,12 @@ CMemcardManager::~CMemcardManager()
|
||||
}
|
||||
#endif
|
||||
MemcardManagerIni.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
MemcardManagerIni.Set("MemcardManager", "Items per page", itemsPerPage);
|
||||
Section& mm = MemcardManagerIni["MemcardManager"];
|
||||
mm.Set("Items per page", itemsPerPage);
|
||||
|
||||
mm.Set("DefaultMemcardA", DefaultMemcard[SLOT_A], ".");
|
||||
mm.Set("DefaultMemcardB", DefaultMemcard[SLOT_B], ".");
|
||||
|
||||
if (!DefaultMemcard[SLOT_A].empty() && (strcmp(DefaultMemcard[SLOT_A].c_str(), ".")))
|
||||
MemcardManagerIni.Set("MemcardManager", "DefaultMemcardA", DefaultMemcard[SLOT_A]);
|
||||
else
|
||||
MemcardManagerIni.DeleteKey("MemcardManager", "DefaultMemcardA");
|
||||
if (!DefaultMemcard[SLOT_B].empty() && (strcmp(DefaultMemcard[SLOT_B].c_str(), ".")))
|
||||
MemcardManagerIni.Set("MemcardManager", "DefaultMemcardB", DefaultMemcard[SLOT_B]);
|
||||
else
|
||||
MemcardManagerIni.DeleteKey("MemcardManager", "DefaultMemcardB");
|
||||
MemcardManagerIni.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
}
|
||||
|
||||
@@ -162,15 +159,16 @@ CMemcardManager::CMemcardListCtrl::CMemcardListCtrl(wxWindow* parent, const wxWi
|
||||
{
|
||||
if (MemcardManagerIni.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX)))
|
||||
{
|
||||
MemcardManagerIni.Get("MemcardManager", "Use Pages", &usePages, true);
|
||||
MemcardManagerIni.Get("MemcardManager", "cBanner", &column[COLUMN_BANNER], true);
|
||||
MemcardManagerIni.Get("MemcardManager", "cTitle", &column[COLUMN_TITLE], true);
|
||||
MemcardManagerIni.Get("MemcardManager", "cComment", &column[COLUMN_COMMENT], true);
|
||||
MemcardManagerIni.Get("MemcardManager", "cIcon", &column[COLUMN_ICON], true);
|
||||
MemcardManagerIni.Get("MemcardManager", "cBlocks", &column[COLUMN_BLOCKS], true);
|
||||
MemcardManagerIni.Get("MemcardManager", "cFirst Block", &column[COLUMN_FIRSTBLOCK], true);
|
||||
Section& mm = MemcardManagerIni["MemcardManager"];
|
||||
mm.Get("Use Pages", &usePages, true);
|
||||
mm.Get("cBanner", &column[COLUMN_BANNER], true);
|
||||
mm.Get("cTitle", &column[COLUMN_TITLE], true);
|
||||
mm.Get("cComment", &column[COLUMN_COMMENT], true);
|
||||
mm.Get("cIcon", &column[COLUMN_ICON], true);
|
||||
mm.Get("cBlocks", &column[COLUMN_BLOCKS], true);
|
||||
mm.Get("cFirst Block", &column[COLUMN_FIRSTBLOCK], true);
|
||||
#ifdef DEBUG_MCM
|
||||
MemcardManagerIni.Get("MemcardManager", "cDebug", &column[NUMBER_OF_COLUMN], false);
|
||||
mm.Get("cDebug", &column[NUMBER_OF_COLUMN], false);
|
||||
#else
|
||||
column[NUMBER_OF_COLUMN] = false;
|
||||
#endif
|
||||
@@ -197,16 +195,17 @@ CMemcardManager::CMemcardListCtrl::CMemcardListCtrl(wxWindow* parent, const wxWi
|
||||
CMemcardManager::CMemcardListCtrl::~CMemcardListCtrl()
|
||||
{
|
||||
MemcardManagerIni.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
Section& mm = MemcardManagerIni["MemcardManager"];
|
||||
|
||||
MemcardManagerIni.Set("MemcardManager", "Use Pages", usePages);
|
||||
MemcardManagerIni.Set("MemcardManager", "cBanner", column[COLUMN_BANNER]);
|
||||
MemcardManagerIni.Set("MemcardManager", "cTitle", column[COLUMN_TITLE]);
|
||||
MemcardManagerIni.Set("MemcardManager", "cComment", column[COLUMN_COMMENT]);
|
||||
MemcardManagerIni.Set("MemcardManager", "cIcon", column[COLUMN_ICON]);
|
||||
MemcardManagerIni.Set("MemcardManager", "cBlocks", column[COLUMN_BLOCKS]);
|
||||
MemcardManagerIni.Set("MemcardManager", "cFirst Block", column[COLUMN_FIRSTBLOCK]);
|
||||
mm.Set("Use Pages", usePages);
|
||||
mm.Set("cBanner", column[COLUMN_BANNER]);
|
||||
mm.Set("cTitle", column[COLUMN_TITLE]);
|
||||
mm.Set("cComment", column[COLUMN_COMMENT]);
|
||||
mm.Set("cIcon", column[COLUMN_ICON]);
|
||||
mm.Set("cBlocks", column[COLUMN_BLOCKS]);
|
||||
mm.Set("cFirst Block", column[COLUMN_FIRSTBLOCK]);
|
||||
#ifdef DEBUG_MCM
|
||||
MemcardManagerIni.Set("MemcardManager", "cDebug", column[NUMBER_OF_COLUMN]);
|
||||
mm.Set("cDebug", column[NUMBER_OF_COLUMN]);
|
||||
#endif
|
||||
MemcardManagerIni.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
}
|
||||
|
||||
@@ -212,6 +212,10 @@ bool NetPlay::GetNetPads(const u8 pad_nb, const SPADStatus* const pad_status, Ne
|
||||
// called from ---CPU--- thread
|
||||
void NetPlay::WiimoteInput(int _number, u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
// warning removing, like a boss
|
||||
_number = _channelID;
|
||||
_Size = (u32)_pData;
|
||||
|
||||
//m_crit.players.Enter(); // lock players
|
||||
|
||||
//// in game mapping for this local wiimote
|
||||
@@ -353,7 +357,8 @@ u8 CSIDevice_GCController::NetPlay_GetPadNum(u8 numPAD)
|
||||
// wiimote update / used for frame counting
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305::NetPlay_WiimoteUpdate(int _number)
|
||||
{
|
||||
CritLocker crit(::crit_netplay_ptr);
|
||||
_number;;
|
||||
//CritLocker crit(::crit_netplay_ptr);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define _WINSOCK2API_
|
||||
#include <SFML/Network.hpp>
|
||||
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "HW/GCPad.h"
|
||||
#include "svnrev.h"
|
||||
|
||||
//#include <wx/wx.h>
|
||||
|
||||
Reference in New Issue
Block a user