dolphin/Source/Plugins/Plugin_GCPadNew/Src/ControllerEmu/Wiimote/Wiimote.h
Jordan Woyak f51d8fffa0 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
2010-03-30 19:14:11 +00:00

46 lines
757 B
C++

#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