dolphin/Source/PluginSpecs/pluginspecs_wiimote.h
Glenn Rice c2e0c75c93 EXPERIMENTAL
Removed X event loops from GCPad and Wiimote plugins, and implemented an asynchronous check for keyboard and mouse buttons.
Also added an X event loop in core that handles events while the emulator is paused.  Prevents unexpected behavior from events that occur while the emulator is paused.
Now there is only one event loop running at a time (besides those hidden in SDL).
I will revert this commit if other devs are unhappy with it.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5048 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 20:47:23 +00:00

70 lines
2.1 KiB
C

//__________________________________________________________________________________________________
// Common wiimote plugin spec, unversioned
//
#ifndef _WIIMOTE_H_INCLUDED__
#define _WIIMOTE_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef void (*TLogv)(const char* _pMessage, int _v);
// This is called when the Wiimote sends input reports to the Core.
// Payload: an L2CAP packet.
typedef void (*TWiimoteInput)(int _number, u16 _channelID, const void* _pData, u32 _Size);
// This data is passed from the core on initialization.
typedef struct
{
HWND hWnd;
#ifdef __linux__
void *pXWindow;
#endif
u32 ISOId;
TLogv pLog;
TWiimoteInput pWiimoteInput;
} SWiimoteInitialize;
// I N T E R F A C E
// __________________________________________________________________________________________________
// Function: Wiimote_Output
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
// on the HID CONTROL channel.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_ControlChannel(int _number, u16 _channelID, const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: Wiimote_Input
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
// on the HID INTERRUPT channel.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_InterruptChannel(int _number, u16 _channelID, const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: Wiimote_Update
// Purpose: This function is called periodically by the Core.
// input: none
// output: none
//
EXPORT void CALL Wiimote_Update(int _number);
// __________________________________________________________________________________________________
// Function: PAD_GetAttachedPads
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
// input: none
// output: number of pads
//
EXPORT unsigned int CALL Wiimote_GetAttachedControllers();
#include "ExportEpilog.h"
#endif //_WIIMOTE_H_INCLUDED__