mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Plugin that should eventually replace the GCPad and emulated Wiimote plugin:
It's currently only really usable on Windows. Linux/OS X will need keyboard support added in, but SDL should work for joysticks on non-Windows without too many modifications. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5254 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
#ifndef _CONEMU_WIIMOTE_H_
|
||||
#define _CONEMU_WIIMOTE_H_
|
||||
|
||||
#include "../../ControllerEmu.h"
|
||||
|
||||
#include <queue>
|
||||
|
||||
class HIDReport : public std::queue<u8>
|
||||
{
|
||||
public:
|
||||
template <typename T>
|
||||
HIDReport& operator<<( const T& t )
|
||||
{
|
||||
const u8* const e = ((u8*)&t) + sizeof(t);
|
||||
const u8* i = (u8*)&t;
|
||||
for ( ;i<e; ++i )
|
||||
push(*i);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class Wiimote : public ControllerEmu
|
||||
{
|
||||
public:
|
||||
|
||||
Wiimote( const unsigned int index );
|
||||
void Cycle();
|
||||
Wiimote& operator<<( HIDReport& );
|
||||
|
||||
std::string GetName() const;
|
||||
|
||||
private:
|
||||
|
||||
Buttons* m_buttons;
|
||||
Buttons* m_dpad;
|
||||
ControlGroup* m_rumble;
|
||||
// TODO: add forces
|
||||
// TODO: add ir
|
||||
|
||||
const unsigned int m_index;
|
||||
unsigned int m_report_mode;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user