mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
New Wiimote Plugin: Added a "Hybrid Wiimote" input source type. This allows a real wiimote to be used with an emulated extension.(and in the future, real wiimote with emulated motion plus) If the emulated extension is set to "None", a real extension can be used. Real/Emulated buttons are combined. Real acceleration data is used. Currently, emulated IR data is used.(might change this to allow both) Switching between an emulated and a real extension in-game is a bit testy right now, but if you switch the emu-extension to "None" before connecting a real extension, it usually works.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6082 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -3,9 +3,9 @@
|
||||
#include "pluginspecs_wiimote.h"
|
||||
|
||||
#include "WiimoteReal/WiimoteReal.h"
|
||||
#include "WiimoteEmu/WiimoteEmu.h"
|
||||
|
||||
#include "ControllerInterface/ControllerInterface.h"
|
||||
#include "WiimoteEmu/WiimoteEmu.h"
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
#include "WiimoteConfigDiag.h"
|
||||
@ -127,15 +127,11 @@ void InitPlugin( void* const hwnd )
|
||||
//
|
||||
void Wiimote_ControlChannel(int _number, u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
switch (g_wiimote_sources[_number])
|
||||
{
|
||||
case WIIMOTE_SRC_REAL :
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)g_plugin.controllers[_number])->ControlChannel(_channelID, _pData, _Size);
|
||||
|
||||
if (WIIMOTE_SRC_REAL & g_wiimote_sources[_number])
|
||||
WiimoteReal::ControlChannel(_number, _channelID, _pData, _Size);
|
||||
break;
|
||||
case WIIMOTE_SRC_EMU :
|
||||
((WiimoteEmu::Wiimote*)g_plugin.controllers[ _number ])->ControlChannel( _channelID, _pData, _Size );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
@ -169,15 +165,10 @@ unsigned int Wiimote_UnPairWiimotes(void)
|
||||
//
|
||||
void Wiimote_InterruptChannel(int _number, u16 _channelID, const void* _pData, u32 _Size)
|
||||
{
|
||||
switch (g_wiimote_sources[_number])
|
||||
{
|
||||
case WIIMOTE_SRC_REAL :
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)g_plugin.controllers[_number])->InterruptChannel(_channelID, _pData, _Size);
|
||||
else
|
||||
WiimoteReal::InterruptChannel(_number, _channelID, _pData, _Size);
|
||||
break;
|
||||
case WIIMOTE_SRC_EMU :
|
||||
((WiimoteEmu::Wiimote*)g_plugin.controllers[ _number ])->InterruptChannel( _channelID, _pData, _Size );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
@ -201,15 +192,10 @@ void Wiimote_Update(int _number)
|
||||
}
|
||||
_last_number = _number;
|
||||
|
||||
switch (g_wiimote_sources[_number])
|
||||
{
|
||||
case WIIMOTE_SRC_REAL :
|
||||
WiimoteReal::Update(_number);
|
||||
break;
|
||||
case WIIMOTE_SRC_EMU :
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)g_plugin.controllers[_number])->Update();
|
||||
break;
|
||||
}
|
||||
else
|
||||
WiimoteReal::Update(_number);
|
||||
|
||||
g_plugin.controls_crit.Leave();
|
||||
}
|
||||
|
Reference in New Issue
Block a user