From af918f2e439521bb803843d390f7f978b55a99e6 Mon Sep 17 00:00:00 2001 From: daco65 Date: Sat, 13 Sep 2008 13:44:06 +0000 Subject: [PATCH] added the wiimote config to the dolphin.ini options. also commented out the wiimote loading. cause the plugin can't do anything yet it wont load dolphin to start the game. I also renamed the wiimote plugin. removing the test part. yes its a test but in the end its meant to become a full wiimote plugin right? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@509 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Core.cpp | 4 ++-- Source/Core/DolphinWX/Src/Config.cpp | 4 +++- Source/Core/DolphinWX/Src/Config.h | 1 + Source/Core/DolphinWX/Src/Frame.cpp | 7 +++++++ Source/Core/DolphinWX/Src/Frame.h | 1 + .../Plugins/Plugin_Wiimote_Test/Plugin_Wiimote_Test.vcproj | 7 ++++--- Source/Plugins/Plugin_Wiimote_Test/Src/SConscript | 4 ++-- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index 9257ed600a..fb86f4e327 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -132,10 +132,10 @@ bool Init(const SCoreStartupParameter _CoreParameter) PanicAlert("Failed to load video plugin %s", g_CoreStartupParameter.m_strVideoPlugin.c_str()); return false; } - if (!PluginWiimote::LoadPlugin(g_CoreStartupParameter.m_strWiimotePlugin.c_str())) { + /*if (!PluginWiimote::LoadPlugin(g_CoreStartupParameter.m_strWiimotePlugin.c_str())) { PanicAlert("Failed to load Wiimote plugin %s", g_CoreStartupParameter.m_strWiimotePlugin.c_str()); return false; - } + }*/ #ifdef _WIN32 if (PluginDSP::DllDebugger) diff --git a/Source/Core/DolphinWX/Src/Config.cpp b/Source/Core/DolphinWX/Src/Config.cpp index 4ff5832675..caa6b8b0b4 100644 --- a/Source/Core/DolphinWX/Src/Config.cpp +++ b/Source/Core/DolphinWX/Src/Config.cpp @@ -62,6 +62,7 @@ void SConfig::SaveSettings() ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin); ini.Set("Core", "DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin); ini.Set("Core", "PadPlugin", m_LocalCoreStartupParameter.m_strPadPlugin); + ini.Set("Core", "WiiMotePlugin", m_LocalCoreStartupParameter.m_strWiimotePlugin); ini.Set("Core", "HLEBios", m_LocalCoreStartupParameter.bHLEBios); ini.Set("Core", "UseDynarec", m_LocalCoreStartupParameter.bUseJIT); @@ -85,6 +86,7 @@ void SConfig::LoadSettings() ini.Get("Default", "GFXPlugin", &m_DefaultGFXPlugin); ini.Get("Default", "DSPPlugin", &m_DefaultDSPPlugin); ini.Get("Default", "PadPlugin", &m_DefaultPADPlugin); + ini.Get("Default", "WiiMotePlugin", &m_DefaultWiiMotePlugin); } // misc @@ -112,7 +114,7 @@ void SConfig::LoadSettings() ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str()); ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str()); ini.Get("Core", "PadPlugin", &m_LocalCoreStartupParameter.m_strPadPlugin, m_DefaultPADPlugin.c_str()); - + ini.Get("Core", "WiiMotePlugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin, m_DefaultWiiMotePlugin.c_str()); ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true); ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true); ini.Get("Core", "UseDualCore", &m_LocalCoreStartupParameter.bUseDualCore, false); diff --git a/Source/Core/DolphinWX/Src/Config.h b/Source/Core/DolphinWX/Src/Config.h index cdb28b2b9d..b3a61b2d3c 100644 --- a/Source/Core/DolphinWX/Src/Config.h +++ b/Source/Core/DolphinWX/Src/Config.h @@ -29,6 +29,7 @@ struct SConfig std::string m_DefaultGFXPlugin; std::string m_DefaultDSPPlugin; std::string m_DefaultPADPlugin; + std::string m_DefaultWiiMotePlugin; // name of the last used filename std::string m_LastFilename; diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index ec2b2dbbb2..25d604ae49 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -481,6 +481,13 @@ void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event)) SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin ); } +void CFrame::OnPluginWiiMote(wxCommandEvent& WXUNUSED (event)) +{ + CPluginManager::GetInstance().OpenConfig( + GetHandle(), + SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin + ); +} void CFrame::OnBrowse(wxCommandEvent& WXUNUSED (event)) { diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 2dabd76111..daa3e44ea6 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -58,6 +58,7 @@ class CFrame void OnPluginGFX(wxCommandEvent& event); void OnPluginDSP(wxCommandEvent& event); void OnPluginPAD(wxCommandEvent& event); + void OnPluginWiiMote(wxCommandEvent& event); void OnOpen(wxCommandEvent& event); void OnPlay(wxCommandEvent& event); void OnStop(wxCommandEvent& event); diff --git a/Source/Plugins/Plugin_Wiimote_Test/Plugin_Wiimote_Test.vcproj b/Source/Plugins/Plugin_Wiimote_Test/Plugin_Wiimote_Test.vcproj index 59d65cf099..b6239b07ca 100644 --- a/Source/Plugins/Plugin_Wiimote_Test/Plugin_Wiimote_Test.vcproj +++ b/Source/Plugins/Plugin_Wiimote_Test/Plugin_Wiimote_Test.vcproj @@ -2,7 +2,7 @@