1. Circumvent the IDirectInputDevice2::SetDataFormat() error when opening the configuration window to.

2. Fixed the Allow out of focus input option again

3. Allow changing of the mapped pads while a game is running

4. Prevented crashes or problems from any combination of having the configuration window open when a game is started or stopped

5. Fixed a crash that would occur after nJoy was started with a connected pad, then stopped, and all pads disconnected, then started again

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2215 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-11 10:30:02 +00:00
parent 5ba51ed789
commit 68f39cb287
18 changed files with 271 additions and 136 deletions

View File

@ -30,14 +30,15 @@
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __NJOY_h__
#define __NJOY_h__
//////////////////////////////////////////////////////////////////////////////////////////
// Settings
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Set this if you want to use the rumble 'hack' for controller one
//#define USE_RUMBLE_DINPUT_HACK
// Show a status window with the detected axes, buttons and so on
//#define SHOW_PAD_STATUS
//////////////////////////
@ -125,8 +126,10 @@ extern std::vector<u8> Keys;
extern std::vector<InputCommon::CONTROLLER_INFO> joyinfo;
extern InputCommon::CONTROLLER_STATE PadState[4];
extern InputCommon::CONTROLLER_MAPPING PadMapping[4];
extern HWND m_hWnd; // Handle to window
extern int NumPads, NumGoodPads; // Number of goods pads
#ifdef _WIN32
extern HWND m_hWnd, m_hConsole; // Handle to window
#endif
extern int NumPads, NumGoodPads, LastPad; // Number of goods pads
#endif
@ -137,8 +140,12 @@ bool Search_Devices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_N
void DEBUG_INIT();
void DEBUG_QUIT();
bool IsFocus();
bool ReloadDLL();
void Pad_Use_Rumble(u8 _numPAD, SPADStatus* _pPADStatus); // Rumble
//void SaveConfig();
//void LoadConfig();
#endif __NJOY_h__