dolphin/Source/Plugins/Plugin_Wiimote/Src/main.h
snzgoo f6d844dac1 MAJOR and long ago overdue wiiuse and real wiimote sourcecode cleanup. Removed "recording" in old wiimote plugin and other not necessary functions(EEPROM reading, we 'll just do a reconnect instead to use default accel calibration data etc). Recording is not needed anymore(playback of recorded moves should be still working). Everything the recording feature offered, the new wiimote plugin does as well and even more. The cleanup will ease the port of the real wiimote feature into new wiimote plugin, which is still only offering emulated wiimote support. Billiard said he's now on it.:)
Wiimotes are now slighty more responsive and multiple wiimotes should harmonize now slighty better. This clean up was requested/inevitable and should have be done way more earlier. This "might" break osx/linux builds, so please test. If your aware of any "real wiimote" issues please post it in the comments as well(dont forget to state your OS).

Known wiimote issues:
1.) Possible wiimote disconnect on pressing the home button
2.) 1-2 Possible wiimote disconnects directly after starting a game
3.) Rumble causes lag. I don't think this is a wiimote plugin issue itself, I'm not sure tho. It would be interesting to know whether the lag still happens on emulated wiimotes as well, when the game tries to rumble.
4.) Connecting(pairing up and refreshing) a 2nd/3rd/4th real wiimote while having a game running/paused, might swap player slots and cause disconnects at that moment.
If u have more issues, feel free to post them, to have them all here collected once more to get a brief overview.
Apart from that, increase the wiimote read timeout @settings(20-200). If your  expecting frequent disconnects, restart dolphin, and don't open the wiimote gui before playing instead directly start games.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5788 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 02:08:30 +00:00

89 lines
2.2 KiB
C++

// Copyright (C) 2003 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef MAIN_H
#define MAIN_H
#include <iostream> // System
#include <vector>
#include "CommonTypes.h"
#include "pluginspecs_wiimote.h"
#if defined(HAVE_X11) && HAVE_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
extern Display* WMdisplay;
#endif
// Definitions and declarations
bool IsFocus();
//void InterruptDebugging(bool Emu, const void* _pData);
//void ReadDebugging(bool Emu, const void* _pData, int Size);
// Movement recording
#define RECORDING_ROWS 15
#define WM_RECORDING_WIIMOTE 0
#define WM_RECORDING_NUNCHUCK 1
#define WM_RECORDING_IR 2
struct SRecording
{
int x;
int y;
int z;
double Time;
u8 IR[12];
};
struct SRecordingAll
{
std::vector<SRecording> Recording;
int HotKeySwitch, HotKeyWiimote, HotKeyNunchuck, HotKeyIR;
int PlaybackSpeed;
int IRBytes;
};
#ifndef EXCLUDEMAIN_H
// General
extern bool g_EmulatorRunning;
extern u32 g_ISOId;
extern bool g_SearchDeviceDone;
extern bool g_RealWiiMotePresent;
extern HINSTANCE g_hInstance;
// Debugging
extern bool g_DebugAccelerometer;
extern bool g_DebugData;
extern bool g_DebugComm;
extern bool g_DebugSoundData;
extern bool g_DebugCustom;
// Update speed
extern int g_UpdateCounter;
extern double g_UpdateTime;
extern int g_UpdateWriteScreen;
extern int g_UpdateRate;
extern std::vector<int> g_UpdateTimeList;
// Movement recording
extern std::vector<SRecordingAll> VRecording;
extern PLUGIN_EMUSTATE g_EmulatorState;
#endif
#endif // MAIN_H