2009-09-02 21:00:45 +00:00
|
|
|
|
2009-01-17 08:21:49 +00:00
|
|
|
//________________________________________________________________________________________
|
|
|
|
// File description: Common plugin spec, version #1.0 maintained by F|RES
|
2009-09-02 21:00:45 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
#ifndef _PLUGINS_H_INCLUDED__
|
|
|
|
#define _PLUGINS_H_INCLUDED__
|
|
|
|
|
2009-01-17 08:21:49 +00:00
|
|
|
// Includes
|
|
|
|
// ------------
|
2010-01-19 19:28:27 +00:00
|
|
|
// TODO: See if we can get rid of the windows.h include.
|
2008-12-08 04:46:09 +00:00
|
|
|
#ifdef _WIN32
|
2011-01-31 01:28:32 +00:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
2008-12-08 04:46:09 +00:00
|
|
|
#endif
|
2010-07-10 21:17:08 +00:00
|
|
|
#include "Common.h"
|
2009-01-17 08:21:49 +00:00
|
|
|
#include "CommonTypes.h"
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2010-01-19 19:28:27 +00:00
|
|
|
// Plugin communication. I place this here rather in Common.h to rebuild less if any of this is changed
|
2009-02-07 03:16:41 +00:00
|
|
|
// -----------------
|
|
|
|
enum PLUGIN_COMM
|
|
|
|
{
|
|
|
|
// Begin at 10 in case there is already messages with wParam = 0, 1, 2 and so on
|
2010-02-09 00:34:27 +00:00
|
|
|
WM_USER_PAUSE = 10,
|
|
|
|
WM_USER_STOP,
|
2009-11-15 07:46:43 +00:00
|
|
|
WM_USER_CREATE,
|
2010-04-12 01:33:10 +00:00
|
|
|
WM_USER_SETCURSOR,
|
2009-11-15 07:46:43 +00:00
|
|
|
WM_USER_KEYDOWN,
|
2009-12-27 19:31:02 +00:00
|
|
|
WIIMOTE_DISCONNECT, // Disconnect Wiimote
|
2009-09-07 12:40:43 +00:00
|
|
|
INPUT_FRAME_COUNTER // Wind back the frame counter for rerecording
|
2009-02-07 03:16:41 +00:00
|
|
|
};
|
|
|
|
|
2009-01-17 08:32:44 +00:00
|
|
|
// System specific declarations and definitions
|
|
|
|
// ------------
|
2009-01-17 18:34:25 +00:00
|
|
|
|
2011-01-31 01:28:32 +00:00
|
|
|
// TODO: get rid of this i think
|
|
|
|
#if !defined(_WIN32) && !defined(TRUE)
|
|
|
|
#define TRUE 1
|
|
|
|
#define FALSE 0
|
2008-12-08 04:46:09 +00:00
|
|
|
#endif
|
2009-01-17 08:32:44 +00:00
|
|
|
|
|
|
|
// Global values
|
|
|
|
// ------------
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2011-01-31 01:28:32 +00:00
|
|
|
//enum STATE_MODE
|
|
|
|
//{
|
|
|
|
// STATE_MODE_READ = 1,
|
|
|
|
// STATE_MODE_WRITE,
|
|
|
|
// STATE_MODE_MEASURE,
|
|
|
|
//};
|
2008-12-08 04:46:09 +00:00
|
|
|
|
Now you can switch between Emulated and Real WiiMotes, connect more Real Wiimotes and even pair them up (if you have MS BT Stack) during gameplay!
All you gotta do is Pause the emulation! That's useful for when your batteries run out during gameplay, for example...
But if you change the WiiMote source (between Emulated, Real or Inactive) you must disconnect and reconnect (Menu Tools -> Connect WiiMote) the WiiMotes affected by the change...
Thanks to jack.fr0st who did all the emulation state notification work!
Now every plugin has a way to know the current emulation state (paused, stopped or playing)
@ayuanx: I thought about doing a PostMessage(g_WiimoteInitialize.hWnd, WM_USER, WIIMOTE_DISCONNECT, current_number); so that the user gets asked to reconnect that WiiMote, trying to avoid having to disconnect and reconnect, but it didn't work because shooting that message only asks to reconnect, doesn't do a disconnect... Do you have any ideas on how to accomplish that?
Also, if anyone could check if Issue 1916 is finally fixed... Or at least when is the cursor being hidden or not...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4789 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-06 19:26:52 +00:00
|
|
|
// used for notification on emulation state
|
2011-01-31 01:28:32 +00:00
|
|
|
enum PLUGIN_EMUSTATE
|
|
|
|
{
|
Now you can switch between Emulated and Real WiiMotes, connect more Real Wiimotes and even pair them up (if you have MS BT Stack) during gameplay!
All you gotta do is Pause the emulation! That's useful for when your batteries run out during gameplay, for example...
But if you change the WiiMote source (between Emulated, Real or Inactive) you must disconnect and reconnect (Menu Tools -> Connect WiiMote) the WiiMotes affected by the change...
Thanks to jack.fr0st who did all the emulation state notification work!
Now every plugin has a way to know the current emulation state (paused, stopped or playing)
@ayuanx: I thought about doing a PostMessage(g_WiimoteInitialize.hWnd, WM_USER, WIIMOTE_DISCONNECT, current_number); so that the user gets asked to reconnect that WiiMote, trying to avoid having to disconnect and reconnect, but it didn't work because shooting that message only asks to reconnect, doesn't do a disconnect... Do you have any ideas on how to accomplish that?
Also, if anyone could check if Issue 1916 is finally fixed... Or at least when is the cursor being hidden or not...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4789 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-06 19:26:52 +00:00
|
|
|
PLUGIN_EMUSTATE_PLAY = 1,
|
|
|
|
PLUGIN_EMUSTATE_PAUSE,
|
|
|
|
PLUGIN_EMUSTATE_STOP,
|
|
|
|
};
|
2009-01-17 08:32:44 +00:00
|
|
|
|
2009-01-17 08:21:49 +00:00
|
|
|
#endif // _PLUGINS_H_INCLUDED__
|