mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Remove old silly code that pretended to support loading multiple pad plugins and multiple wiimote plugins, but actually didn't.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5666 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7c103fbc4e
commit
5fe57452af
@ -296,8 +296,8 @@ void SConfig::LoadSettings()
|
|||||||
// Plugins
|
// Plugins
|
||||||
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
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", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
||||||
ini.Get("Core", "PadPlugin", &m_LocalCoreStartupParameter.m_strPadPlugin[0], m_DefaultPADPlugin.c_str());
|
ini.Get("Core", "PadPlugin", &m_LocalCoreStartupParameter.m_strPadPlugin, m_DefaultPADPlugin.c_str());
|
||||||
ini.Get("Core", "WiiMotePlugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin[0], m_DefaultWiiMotePlugin.c_str());
|
ini.Get("Core", "WiiMotePlugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin, m_DefaultWiiMotePlugin.c_str());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||||||
PADInitialize.pRendererHasFocus = Callback_RendererHasFocus;
|
PADInitialize.pRendererHasFocus = Callback_RendererHasFocus;
|
||||||
// This is may be needed to avoid a SDL problem
|
// This is may be needed to avoid a SDL problem
|
||||||
//Plugins.FreeWiimote();
|
//Plugins.FreeWiimote();
|
||||||
Plugins.GetPad(0)->Initialize(&PADInitialize);
|
Plugins.GetPad()->Initialize(&PADInitialize);
|
||||||
|
|
||||||
// Load and Init WiimotePlugin - only if we are booting in wii mode
|
// Load and Init WiimotePlugin - only if we are booting in wii mode
|
||||||
if (_CoreParameter.bWii)
|
if (_CoreParameter.bWii)
|
||||||
@ -407,7 +407,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||||||
WiimoteInitialize.pWiimoteInterruptChannel = Callback_WiimoteInterruptChannel;
|
WiimoteInitialize.pWiimoteInterruptChannel = Callback_WiimoteInterruptChannel;
|
||||||
WiimoteInitialize.pRendererHasFocus = Callback_RendererHasFocus;
|
WiimoteInitialize.pRendererHasFocus = Callback_RendererHasFocus;
|
||||||
// Wait for Wiiuse to find the number of connected Wiimotes
|
// Wait for Wiiuse to find the number of connected Wiimotes
|
||||||
Plugins.GetWiimote(0)->Initialize((void *)&WiimoteInitialize);
|
Plugins.GetWiimote()->Initialize((void *)&WiimoteInitialize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The hardware is initialized.
|
// The hardware is initialized.
|
||||||
|
@ -21,9 +21,6 @@
|
|||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#define MAXPADS 1
|
|
||||||
#define MAXWIIMOTES 1
|
|
||||||
|
|
||||||
enum Hotkey {
|
enum Hotkey {
|
||||||
HK_FULLSCREEN,
|
HK_FULLSCREEN,
|
||||||
HK_PLAY_PAUSE,
|
HK_PLAY_PAUSE,
|
||||||
@ -121,9 +118,9 @@ struct SCoreStartupParameter
|
|||||||
|
|
||||||
// files
|
// files
|
||||||
std::string m_strVideoPlugin;
|
std::string m_strVideoPlugin;
|
||||||
std::string m_strPadPlugin[MAXPADS];
|
std::string m_strPadPlugin;
|
||||||
std::string m_strDSPPlugin;
|
std::string m_strDSPPlugin;
|
||||||
std::string m_strWiimotePlugin[MAXWIIMOTES];
|
std::string m_strWiimotePlugin;
|
||||||
|
|
||||||
std::string m_strFilename;
|
std::string m_strFilename;
|
||||||
std::string m_strBootROM;
|
std::string m_strBootROM;
|
||||||
|
@ -144,7 +144,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
|
|||||||
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 10, %02x (READ STATUS&SWITCHES)", ptr(1));
|
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 10, %02x (READ STATUS&SWITCHES)", ptr(1));
|
||||||
SPADStatus PadStatus;
|
SPADStatus PadStatus;
|
||||||
memset(&PadStatus, 0 ,sizeof(PadStatus));
|
memset(&PadStatus, 0 ,sizeof(PadStatus));
|
||||||
CPluginManager::GetInstance().GetPad(0)
|
CPluginManager::GetInstance().GetPad()
|
||||||
->PAD_GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus);
|
->PAD_GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus);
|
||||||
res[resp++] = 0x10;
|
res[resp++] = 0x10;
|
||||||
res[resp++] = 0x2;
|
res[resp++] = 0x2;
|
||||||
@ -310,7 +310,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
|
|||||||
for (i=0; i<nr_players; ++i)
|
for (i=0; i<nr_players; ++i)
|
||||||
{
|
{
|
||||||
SPADStatus PadStatus;
|
SPADStatus PadStatus;
|
||||||
CPluginManager::GetInstance().GetPad(0)
|
CPluginManager::GetInstance().GetPad()
|
||||||
->PAD_GetStatus(i, &PadStatus);
|
->PAD_GetStatus(i, &PadStatus);
|
||||||
unsigned char player_data[2] = {0,0};
|
unsigned char player_data[2] = {0,0};
|
||||||
if (PadStatus.button & PAD_BUTTON_START)
|
if (PadStatus.button & PAD_BUTTON_START)
|
||||||
@ -348,7 +348,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
|
|||||||
int slots = *jvs_io++;
|
int slots = *jvs_io++;
|
||||||
msg.addData(1);
|
msg.addData(1);
|
||||||
SPADStatus PadStatus;
|
SPADStatus PadStatus;
|
||||||
CPluginManager::GetInstance().GetPad(0)
|
CPluginManager::GetInstance().GetPad()
|
||||||
->PAD_GetStatus(0, &PadStatus);
|
->PAD_GetStatus(0, &PadStatus);
|
||||||
while (slots--)
|
while (slots--)
|
||||||
{
|
{
|
||||||
|
@ -128,7 +128,7 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
|
|||||||
{
|
{
|
||||||
SPADStatus PadStatus;
|
SPADStatus PadStatus;
|
||||||
memset(&PadStatus, 0, sizeof(PadStatus));
|
memset(&PadStatus, 0, sizeof(PadStatus));
|
||||||
Common::PluginPAD* pad = CPluginManager::GetInstance().GetPad(0);
|
Common::PluginPAD* pad = CPluginManager::GetInstance().GetPad();
|
||||||
pad->PAD_GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus);
|
pad->PAD_GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus);
|
||||||
|
|
||||||
u32 netValues[2] = {0};
|
u32 netValues[2] = {0};
|
||||||
@ -258,7 +258,7 @@ bool CSIDevice_GCController::GetData(u32& _Hi, u32& _Low)
|
|||||||
// SendCommand
|
// SendCommand
|
||||||
void CSIDevice_GCController::SendCommand(u32 _Cmd, u8 _Poll)
|
void CSIDevice_GCController::SendCommand(u32 _Cmd, u8 _Poll)
|
||||||
{
|
{
|
||||||
Common::PluginPAD* pad = CPluginManager::GetInstance().GetPad(0);
|
Common::PluginPAD* pad = CPluginManager::GetInstance().GetPad();
|
||||||
UCommand command(_Cmd);
|
UCommand command(_Cmd);
|
||||||
|
|
||||||
switch (command.Command)
|
switch (command.Command)
|
||||||
|
@ -497,7 +497,7 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update()
|
|||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
NetPlay_WiimoteUpdate(i);
|
NetPlay_WiimoteUpdate(i);
|
||||||
#endif
|
#endif
|
||||||
CPluginManager::GetInstance().GetWiimote(0)->Wiimote_Update(i);
|
CPluginManager::GetInstance().GetWiimote()->Wiimote_Update(i);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ void CWII_IPC_HLE_WiiMote::EventDisconnect()
|
|||||||
{
|
{
|
||||||
// Send disconnect message to plugin
|
// Send disconnect message to plugin
|
||||||
u8 Message = WIIMOTE_DISCONNECT;
|
u8 Message = WIIMOTE_DISCONNECT;
|
||||||
CPluginManager::GetInstance().GetWiimote(0)->Wiimote_ControlChannel(m_ConnectionHandle & 0xFF, 99, &Message, 0);
|
CPluginManager::GetInstance().GetWiimote()->Wiimote_ControlChannel(m_ConnectionHandle & 0xFF, 99, &Message, 0);
|
||||||
|
|
||||||
m_Connected = -1;
|
m_Connected = -1;
|
||||||
// Clear channel flags
|
// Clear channel flags
|
||||||
@ -264,7 +264,7 @@ void CWII_IPC_HLE_WiiMote::ExecuteL2capCmd(u8* _pData, u32 _Size)
|
|||||||
const int number = 0;
|
const int number = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Common::PluginWiimote* mote = CPluginManager::GetInstance().GetWiimote(0);
|
Common::PluginWiimote* mote = CPluginManager::GetInstance().GetWiimote();
|
||||||
if (itr != m_Channel.end())
|
if (itr != m_Channel.end())
|
||||||
{
|
{
|
||||||
SChannel& rChannel = itr->second;
|
SChannel& rChannel = itr->second;
|
||||||
|
@ -70,10 +70,8 @@ CPluginManager::CPluginManager()
|
|||||||
// Set initial values to NULL.
|
// Set initial values to NULL.
|
||||||
m_video = NULL;
|
m_video = NULL;
|
||||||
m_dsp = NULL;
|
m_dsp = NULL;
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
m_pad = NULL;
|
||||||
m_pad[i] = NULL;
|
m_wiimote = NULL;
|
||||||
for (int i = 0; i < MAXWIIMOTES; i++)
|
|
||||||
m_wiimote[i] = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will call FreeLibrary() for all plugins
|
// This will call FreeLibrary() for all plugins
|
||||||
@ -84,23 +82,17 @@ CPluginManager::~CPluginManager()
|
|||||||
delete m_PluginGlobals;
|
delete m_PluginGlobals;
|
||||||
delete m_dsp;
|
delete m_dsp;
|
||||||
|
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
if (m_pad)
|
||||||
{
|
{
|
||||||
if (m_pad[i])
|
delete m_pad;
|
||||||
{
|
m_pad = NULL;
|
||||||
delete m_pad[i];
|
|
||||||
m_pad[i] = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < MAXWIIMOTES; i++)
|
if (m_wiimote)
|
||||||
{
|
{
|
||||||
if (m_wiimote[i])
|
m_wiimote->Shutdown();
|
||||||
{
|
delete m_wiimote;
|
||||||
m_wiimote[i]->Shutdown();
|
m_wiimote = NULL;
|
||||||
delete m_wiimote[i];
|
|
||||||
m_wiimote[i] = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete m_video;
|
delete m_video;
|
||||||
@ -131,40 +123,27 @@ bool CPluginManager::InitPlugins()
|
|||||||
PanicAlert("Can't init DSP Plugin");
|
PanicAlert("Can't init DSP Plugin");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check if we get at least one pad or wiimote
|
|
||||||
bool pad = false;
|
|
||||||
bool wiimote = false;
|
|
||||||
|
|
||||||
// Init pad
|
// Init pad
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
// Check that the plugin has a name
|
||||||
|
if (!m_params->m_strPadPlugin.empty())
|
||||||
|
GetPad();
|
||||||
|
|
||||||
|
// Check that GetPad succeeded
|
||||||
|
if (!m_pad)
|
||||||
{
|
{
|
||||||
// Check that the plugin has a name
|
PanicAlert("Can't init PAD Plugin");
|
||||||
if (!m_params->m_strPadPlugin[i].empty())
|
|
||||||
GetPad(i);
|
|
||||||
// Check that GetPad succeeded
|
|
||||||
if (m_pad[i] != NULL)
|
|
||||||
pad = true;
|
|
||||||
}
|
|
||||||
if (!pad)
|
|
||||||
{
|
|
||||||
PanicAlert("Can't init any PAD Plugins");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init wiimote
|
// Init wiimote
|
||||||
if (m_params->bWii)
|
if (m_params->bWii)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAXWIIMOTES; i++)
|
if (!m_params->m_strWiimotePlugin.empty())
|
||||||
|
GetWiimote();
|
||||||
|
if (!m_wiimote)
|
||||||
{
|
{
|
||||||
if (!m_params->m_strWiimotePlugin[i].empty())
|
PanicAlert("Can't init Wiimote Plugin");
|
||||||
GetWiimote(i);
|
|
||||||
|
|
||||||
if (m_wiimote[i] != NULL)
|
|
||||||
wiimote = true;
|
|
||||||
}
|
|
||||||
if (!wiimote)
|
|
||||||
{
|
|
||||||
PanicAlert("Can't init any Wiimote Plugins");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,22 +156,16 @@ bool CPluginManager::InitPlugins()
|
|||||||
// for an explanation about the current LoadLibrary() and FreeLibrary() behavior.
|
// for an explanation about the current LoadLibrary() and FreeLibrary() behavior.
|
||||||
void CPluginManager::ShutdownPlugins()
|
void CPluginManager::ShutdownPlugins()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
if (m_pad)
|
||||||
{
|
{
|
||||||
if (m_pad[i])
|
m_pad->Shutdown();
|
||||||
{
|
FreePad();
|
||||||
m_pad[i]->Shutdown();
|
|
||||||
FreePad(i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < MAXWIIMOTES; i++)
|
if (m_wiimote)
|
||||||
{
|
{
|
||||||
if (m_wiimote[i])
|
m_wiimote->Shutdown();
|
||||||
{
|
FreeWiimote();
|
||||||
m_wiimote[i]->Shutdown();
|
|
||||||
FreeWiimote(i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dsp)
|
if (m_dsp)
|
||||||
@ -381,34 +354,34 @@ void CPluginManager::ScanForPlugins()
|
|||||||
if it's not valid.
|
if it's not valid.
|
||||||
*/
|
*/
|
||||||
// ------------
|
// ------------
|
||||||
Common::PluginPAD *CPluginManager::GetPad(int controller)
|
Common::PluginPAD *CPluginManager::GetPad()
|
||||||
{
|
{
|
||||||
if (m_pad[controller] != NULL)
|
if (m_pad != NULL)
|
||||||
{
|
{
|
||||||
if (m_pad[controller]->GetFilename() == m_params->m_strPadPlugin[controller])
|
if (m_pad->GetFilename() == m_params->m_strPadPlugin)
|
||||||
return m_pad[controller];
|
return m_pad;
|
||||||
else
|
else
|
||||||
FreePad(controller);
|
FreePad();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Else load a new plugin
|
// Else load a new plugin
|
||||||
m_pad[controller] = (Common::PluginPAD*)LoadPlugin(m_params->m_strPadPlugin[controller].c_str());
|
m_pad = (Common::PluginPAD*)LoadPlugin(m_params->m_strPadPlugin.c_str());
|
||||||
return m_pad[controller];
|
return m_pad;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::PluginWiimote *CPluginManager::GetWiimote(int controller)
|
Common::PluginWiimote *CPluginManager::GetWiimote()
|
||||||
{
|
{
|
||||||
if (m_wiimote[controller] != NULL)
|
if (m_wiimote != NULL)
|
||||||
{
|
{
|
||||||
if (m_wiimote[controller]->GetFilename() == m_params->m_strWiimotePlugin[controller])
|
if (m_wiimote->GetFilename() == m_params->m_strWiimotePlugin)
|
||||||
return m_wiimote[controller];
|
return m_wiimote;
|
||||||
else
|
else
|
||||||
FreeWiimote(controller);
|
FreeWiimote();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Else load a new plugin
|
// Else load a new plugin
|
||||||
m_wiimote[controller] = (Common::PluginWiimote*)LoadPlugin(m_params->m_strWiimotePlugin[controller].c_str());
|
m_wiimote = (Common::PluginWiimote*)LoadPlugin(m_params->m_strWiimotePlugin.c_str());
|
||||||
return m_wiimote[controller];
|
return m_wiimote;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::PluginDSP *CPluginManager::GetDSP()
|
Common::PluginDSP *CPluginManager::GetDSP()
|
||||||
@ -462,22 +435,16 @@ void CPluginManager::FreeDSP()
|
|||||||
m_dsp = NULL;
|
m_dsp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::FreePad(u32 Pad)
|
void CPluginManager::FreePad()
|
||||||
{
|
{
|
||||||
if (Pad < MAXPADS)
|
delete m_pad;
|
||||||
{
|
m_pad = NULL;
|
||||||
delete m_pad[Pad];
|
|
||||||
m_pad[Pad] = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::FreeWiimote(u32 Wiimote)
|
void CPluginManager::FreeWiimote()
|
||||||
{
|
{
|
||||||
if (Wiimote < MAXWIIMOTES)
|
delete m_wiimote;
|
||||||
{
|
m_wiimote = NULL;
|
||||||
delete m_wiimote[Wiimote];
|
|
||||||
m_wiimote[Wiimote] = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::EmuStateChange(PLUGIN_EMUSTATE newState)
|
void CPluginManager::EmuStateChange(PLUGIN_EMUSTATE newState)
|
||||||
@ -488,8 +455,8 @@ void CPluginManager::EmuStateChange(PLUGIN_EMUSTATE newState)
|
|||||||
// Would we need to call all plugins?
|
// Would we need to call all plugins?
|
||||||
// If yes, how would one check if the plugin was not
|
// If yes, how would one check if the plugin was not
|
||||||
// just created by GetXxx(idx) because there was none?
|
// just created by GetXxx(idx) because there was none?
|
||||||
GetPad(0)->EmuStateChange(newState);
|
GetPad()->EmuStateChange(newState);
|
||||||
GetWiimote(0)->EmuStateChange(newState);
|
GetWiimote()->EmuStateChange(newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -515,10 +482,10 @@ void CPluginManager::OpenConfig(void* _Parent, const char *_rFilename, PLUGIN_TY
|
|||||||
GetDSP()->Config((HWND)_Parent);
|
GetDSP()->Config((HWND)_Parent);
|
||||||
break;
|
break;
|
||||||
case PLUGIN_TYPE_PAD:
|
case PLUGIN_TYPE_PAD:
|
||||||
GetPad(0)->Config((HWND)_Parent);
|
GetPad()->Config((HWND)_Parent);
|
||||||
break;
|
break;
|
||||||
case PLUGIN_TYPE_WIIMOTE:
|
case PLUGIN_TYPE_WIIMOTE:
|
||||||
GetWiimote(0)->Config((HWND)_Parent);
|
GetWiimote()->Config((HWND)_Parent);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlert("Type %d config not supported in plugin %s", Type, _rFilename);
|
PanicAlert("Type %d config not supported in plugin %s", Type, _rFilename);
|
||||||
|
@ -51,13 +51,13 @@ public:
|
|||||||
|
|
||||||
Common::PluginVideo *GetVideo();
|
Common::PluginVideo *GetVideo();
|
||||||
Common::PluginDSP *GetDSP();
|
Common::PluginDSP *GetDSP();
|
||||||
Common::PluginPAD *GetPad(int controller);
|
Common::PluginPAD *GetPad();
|
||||||
Common::PluginWiimote *GetWiimote(int controller);
|
Common::PluginWiimote *GetWiimote();
|
||||||
|
|
||||||
void FreeVideo();
|
void FreeVideo();
|
||||||
void FreeDSP();
|
void FreeDSP();
|
||||||
void FreePad(u32 Pad);
|
void FreePad();
|
||||||
void FreeWiimote(u32 Wiimote);
|
void FreeWiimote();
|
||||||
|
|
||||||
void EmuStateChange(PLUGIN_EMUSTATE newState);
|
void EmuStateChange(PLUGIN_EMUSTATE newState);
|
||||||
|
|
||||||
@ -69,6 +69,7 @@ public:
|
|||||||
void OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show);
|
void OpenDebug(void* _Parent, const char *_rFilename, PLUGIN_TYPE Type, bool Show);
|
||||||
const CPluginInfos& GetPluginInfos() {return(m_PluginInfos);}
|
const CPluginInfos& GetPluginInfos() {return(m_PluginInfos);}
|
||||||
PLUGIN_GLOBALS* GetGlobals();
|
PLUGIN_GLOBALS* GetGlobals();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static CPluginManager* m_Instance;
|
static CPluginManager* m_Instance;
|
||||||
|
|
||||||
@ -76,8 +77,8 @@ private:
|
|||||||
PLUGIN_GLOBALS *m_PluginGlobals;
|
PLUGIN_GLOBALS *m_PluginGlobals;
|
||||||
Common::PluginVideo *m_video;
|
Common::PluginVideo *m_video;
|
||||||
Common::PluginDSP *m_dsp;
|
Common::PluginDSP *m_dsp;
|
||||||
Common::PluginPAD *m_pad[4];
|
Common::PluginPAD *m_pad;
|
||||||
Common::PluginWiimote *m_wiimote[4];
|
Common::PluginWiimote *m_wiimote;
|
||||||
|
|
||||||
SCoreStartupParameter * m_params;
|
SCoreStartupParameter * m_params;
|
||||||
CPluginManager();
|
CPluginManager();
|
||||||
|
@ -92,9 +92,9 @@ void DoState(PointerWrap &p)
|
|||||||
CPluginManager &pm = CPluginManager::GetInstance();
|
CPluginManager &pm = CPluginManager::GetInstance();
|
||||||
pm.GetVideo()->DoState(p.GetPPtr(), p.GetMode());
|
pm.GetVideo()->DoState(p.GetPPtr(), p.GetMode());
|
||||||
pm.GetDSP()->DoState(p.GetPPtr(), p.GetMode());
|
pm.GetDSP()->DoState(p.GetPPtr(), p.GetMode());
|
||||||
pm.GetPad(0)->DoState(p.GetPPtr(), p.GetMode());
|
pm.GetPad()->DoState(p.GetPPtr(), p.GetMode());
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (Core::g_CoreStartupParameter.bWii)
|
||||||
pm.GetWiimote(0)->DoState(p.GetPPtr(), p.GetMode());
|
pm.GetWiimote()->DoState(p.GetPPtr(), p.GetMode());
|
||||||
PowerPC::DoState(p);
|
PowerPC::DoState(p);
|
||||||
HW::DoState(p);
|
HW::DoState(p);
|
||||||
CoreTiming::DoState(p);
|
CoreTiming::DoState(p);
|
||||||
|
@ -319,10 +319,8 @@ void CConfigMain::InitializeGUIValues()
|
|||||||
// Plugins
|
// Plugins
|
||||||
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
|
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
|
||||||
FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
|
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);
|
||||||
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[i]);
|
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
|
||||||
for (int i=0; i < MAXWIIMOTES; i++)
|
|
||||||
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigMain::InitializeGUITooltips()
|
void CConfigMain::InitializeGUITooltips()
|
||||||
@ -1144,10 +1142,8 @@ void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
|
|||||||
// Update plugin filenames
|
// Update plugin filenames
|
||||||
GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
|
GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
|
||||||
GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
|
GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
GetFilename(PADSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
|
||||||
GetFilename(PADSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[i]);
|
GetFilename(WiimoteSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
|
||||||
for (int i = 0; i < MAXWIIMOTES; i++)
|
|
||||||
GetFilename(WiimoteSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigMain::OnConfig(wxCommandEvent& event)
|
void CConfigMain::OnConfig(wxCommandEvent& event)
|
||||||
|
@ -882,8 +882,8 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Send the keyboard status to the Input plugins
|
// Send the keyboard status to the Input plugins
|
||||||
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
|
CPluginManager::GetInstance().GetPad()->PAD_Input(event.GetKeyCode(), 1); // 1 = Down
|
||||||
CPluginManager::GetInstance().GetWiimote(0)->Wiimote_Input(event.GetKeyCode(), 1); // 1 = Down
|
CPluginManager::GetInstance().GetWiimote()->Wiimote_Input(event.GetKeyCode(), 1); // 1 = Down
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
event.Skip();
|
event.Skip();
|
||||||
@ -894,8 +894,8 @@ void CFrame::OnKeyUp(wxKeyEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
if(Core::GetState() != Core::CORE_UNINITIALIZED) {
|
if(Core::GetState() != Core::CORE_UNINITIALIZED) {
|
||||||
CPluginManager::GetInstance().GetPad(0)->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
|
CPluginManager::GetInstance().GetPad()->PAD_Input(event.GetKeyCode(), 0); // 0 = Up
|
||||||
CPluginManager::GetInstance().GetWiimote(0)->Wiimote_Input(event.GetKeyCode(), 0); // 0 = Up
|
CPluginManager::GetInstance().GetWiimote()->Wiimote_Input(event.GetKeyCode(), 0); // 0 = Up
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -944,7 +944,7 @@ void CFrame::OnPluginPAD(wxCommandEvent& WXUNUSED (event))
|
|||||||
{
|
{
|
||||||
CPluginManager::GetInstance().OpenConfig(
|
CPluginManager::GetInstance().OpenConfig(
|
||||||
GetHandle(),
|
GetHandle(),
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[0].c_str(),
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin.c_str(),
|
||||||
PLUGIN_TYPE_PAD
|
PLUGIN_TYPE_PAD
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -952,7 +952,7 @@ void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
|
|||||||
{
|
{
|
||||||
CPluginManager::GetInstance().OpenConfig(
|
CPluginManager::GetInstance().OpenConfig(
|
||||||
GetHandle(),
|
GetHandle(),
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[0].c_str(),
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin.c_str(),
|
||||||
PLUGIN_TYPE_WIIMOTE
|
PLUGIN_TYPE_WIIMOTE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -354,20 +354,12 @@ bool DolphinApp::OnInit()
|
|||||||
std::string(audioPluginFilename.mb_str());
|
std::string(audioPluginFilename.mb_str());
|
||||||
|
|
||||||
if (selectPadPlugin && padPluginFilename != wxEmptyString)
|
if (selectPadPlugin && padPluginFilename != wxEmptyString)
|
||||||
{
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin =
|
||||||
int k;
|
std::string(padPluginFilename.mb_str());
|
||||||
for(k=0;k<MAXPADS;k++)
|
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[k] =
|
|
||||||
std::string(padPluginFilename.mb_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectWiimotePlugin && wiimotePluginFilename != wxEmptyString)
|
if (selectWiimotePlugin && wiimotePluginFilename != wxEmptyString)
|
||||||
{
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin =
|
||||||
int k;
|
std::string(wiimotePluginFilename.mb_str());
|
||||||
for(k=0;k<MAXWIIMOTES;k++)
|
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[k] =
|
|
||||||
std::string(wiimotePluginFilename.mb_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable the PNG image handler
|
// Enable the PNG image handler
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
|
Loading…
Reference in New Issue
Block a user