Warp back to 1983!!! (rev 1983, that is, not the year :P)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1997 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-01-23 21:28:55 +00:00
parent 7ecf884f9a
commit 70bc8167f8
29 changed files with 294 additions and 504 deletions

View File

@ -22,7 +22,6 @@
#include <vector>
#include "Core.h" // Core
#include "ConsoleWindow.h" // Core
#include "Globals.h" // Local
#include "ConfigMain.h"
@ -682,23 +681,18 @@ void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = DVDRoot->GetPath().ToAscii();
}
// ==========================
// =======================================================
// Plugins settings
// -------------
// Update plugin filenames
void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
{
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]);
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]);
}
void CConfigMain::OnConfig(wxCommandEvent& event)
@ -722,25 +716,15 @@ void CConfigMain::OnConfig(wxCommandEvent& event)
break;
}
}
// ==========================
void CConfigMain::CallConfig(wxChoice* _pChoice)
{
int Index = _pChoice->GetSelection();
Console::Print("CallConfig: %i\n", Index);
if (Index >= 0)
{
const CPluginInfo* pInfo = static_cast<CPluginInfo*>(_pChoice->GetClientData(Index));
if (pInfo != NULL)
CPluginManager::GetInstance().OpenConfig((HWND) this->GetHandle(), pInfo->GetFileName().c_str(), pInfo->GetPluginInfo().Type);
}
}
// =======================================================
// Plugins settings
// -------------
void CConfigMain::FillChoiceBox(wxChoice* _pChoice, int _PluginType, const std::string& _SelectFilename)
{
Console::Print("FillChoiceBox\n");
_pChoice->Clear();
int Index = -1;
@ -766,16 +750,31 @@ void CConfigMain::FillChoiceBox(wxChoice* _pChoice, int _PluginType, const std::
_pChoice->Select(Index);
}
bool CConfigMain::GetFilename(wxChoice* _pChoice, std::string& _rFilename)
{
_rFilename.clear();
void CConfigMain::CallConfig(wxChoice* _pChoice)
{
int Index = _pChoice->GetSelection();
if (Index >= 0)
{
const CPluginInfo* pInfo = static_cast<CPluginInfo*>(_pChoice->GetClientData(Index));
if (pInfo != NULL)
CPluginManager::GetInstance().OpenConfig((HWND) this->GetHandle(), pInfo->GetFileName().c_str());
}
}
bool CConfigMain::GetFilename(wxChoice* _pChoice, std::string& _rFilename)
{
_rFilename.clear();
int Index = _pChoice->GetSelection();
printf("%i\n", Index);
if (Index >= 0)
{
const CPluginInfo* pInfo = static_cast<CPluginInfo*>(_pChoice->GetClientData(Index));
_rFilename = pInfo->GetFileName();
Console::Print("GetFilename: %i %s\n", Index, _rFilename.c_str());
printf("%s\n", _rFilename.c_str());
return(true);
}

View File

@ -435,7 +435,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
else
{
if(Core::GetState() != Core::CORE_UNINITIALIZED)
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
CPluginManager::GetInstance().GetPAD(0)->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
event.Skip();
}
}
@ -443,7 +443,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
void CFrame::OnKeyUp(wxKeyEvent& event)
{
if(Core::GetState() != Core::CORE_UNINITIALIZED)
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
CPluginManager::GetInstance().GetPAD(0)->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
event.Skip();
}
@ -453,7 +453,7 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
double GetDoubleTime()
{
wxDateTime datetime = wxDateTime::UNow(); // Get timestamp
u64 TmpSeconds = Common::Timer::GetTimeSinceJan1970(); // Get continuous timestamp
u64 TmpSeconds = Common::Timer::GetTimeSinceJan1970(); // Get continous timestamp
/* Remove a few years. We only really want enough seconds to make sure that we are
detecting actual actions, perhaps 60 seconds is enough really, but I leave a

View File

@ -539,8 +539,7 @@ void CFrame::OnPluginGFX(wxCommandEvent& WXUNUSED (event))
{
CPluginManager::GetInstance().OpenConfig(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str(),
PLUGIN_TYPE_VIDEO
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin.c_str()
);
}
@ -549,8 +548,7 @@ void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event))
{
CPluginManager::GetInstance().OpenConfig(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str(),
PLUGIN_TYPE_DSP
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str()
);
}
@ -558,16 +556,14 @@ void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))
{
CPluginManager::GetInstance().OpenConfig(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[0].c_str(),
PLUGIN_TYPE_PAD
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[0].c_str()
);
}
void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
{
CPluginManager::GetInstance().OpenConfig(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[0].c_str(),
PLUGIN_TYPE_WIIMOTE
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[0].c_str()
);
}