Moved WiimoteNew into Dolphin and eliminated the old wiimote plugin. Removed wiimote plugin support. Moved input dialog related InputUICommon stuff into DolphinWX. Removed now unused InputCommon files. UDPWiimote stuff is temporarily disabled until it is reorganized so Core won't depend on wx. Real wiimotes are now initialized on first need(wiimote diag open or game start) and left initialized until Dolphin exit.(maybe this will work better for Linux/OS X) (scons probably needs some fixes)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6270 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak
2010-10-12 19:42:29 +00:00
parent de3ad37299
commit 7e08fc19fc
116 changed files with 661 additions and 14529 deletions

View File

@ -57,12 +57,14 @@ Core::GetWindowHandle().
#include "HW/DVDInterface.h"
#include "HW/ProcessorInterface.h"
#include "HW/GCPad.h"
#include "HW/Wiimote.h"
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
#include "State.h"
#include "VolumeHandler.h"
#include "NANDContentLoader.h"
#include "WXInputBase.h"
#include "../../InputUICommon/Src/ConfigDiag.h"
#include "WiimoteConfigDiag.h"
#include "InputConfigDiag.h"
#include <wx/datetime.h> // wxWidgets
@ -1024,42 +1026,50 @@ void CFrame::OnPluginDSP(wxCommandEvent& WXUNUSED (event))
void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))
{
InputPlugin *pad_plugin = PAD_GetPlugin();
InputPlugin *const pad_plugin = Pad::GetPlugin();
bool was_init = false;
if ( pad_plugin->controller_interface.IsInit() ) // check if game is running
if (g_controller_interface.IsInit()) // check if game is running
was_init = true;
else
{
#if defined(HAVE_X11) && HAVE_X11
Window win = X11Utils::XWindowFromHandle(GetHandle());
GCPad_Init((void *)win);
Pad::Initialize((void *)win);
#else
GCPad_Init(GetHandle());
Pad::Initialize(GetHandle());
#endif
}
InputConfigDialog* m_ConfigFrame = new InputConfigDialog(this, *pad_plugin, "Dolphin GCPad Configuration");
InputConfigDialog *const m_ConfigFrame = new InputConfigDialog(this, *pad_plugin, "Dolphin GCPad Configuration");
m_ConfigFrame->ShowModal();
m_ConfigFrame->Destroy();
if (!was_init) // if game isn't running
{
GCPad_Deinit();
Pad::Shutdown();
}
}
void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
{
#ifdef _WIN32
Disable(); // Fake a modal dialog
#endif
CPluginManager::GetInstance().OpenConfig(
this,
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin.c_str(),
PLUGIN_TYPE_WIIMOTE
);
#ifdef _WIN32
Enable();
Raise();
#endif
InputPlugin *const wiimote_plugin = Wiimote::GetPlugin();
bool was_init = false;
if (g_controller_interface.IsInit()) // check if game is running
was_init = true;
else
{
#if defined(HAVE_X11) && HAVE_X11
Window win = X11Utils::XWindowFromHandle(GetHandle());
Wiimote::Initialize((void *)win);
#else
Wiimote::Initialize(GetHandle());
#endif
}
WiimoteConfigDiag *const m_ConfigFrame = new WiimoteConfigDiag(this, *wiimote_plugin);
m_ConfigFrame->ShowModal();
m_ConfigFrame->Destroy();
if (!was_init) // if game isn't running
{
Wiimote::Shutdown();
}
}
void CFrame::OnHelp(wxCommandEvent& event)